decidim-debates 0.28.6 → 0.29.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/commands/decidim/debates/admin/close_debate.rb +6 -41
- data/app/commands/decidim/debates/admin/create_debate.rb +16 -42
- data/app/commands/decidim/debates/admin/update_debate.rb +7 -35
- data/app/commands/decidim/debates/create_debate.rb +28 -43
- data/app/commands/decidim/debates/update_debate.rb +12 -42
- data/app/controllers/decidim/debates/debates_controller.rb +1 -1
- data/app/controllers/decidim/debates/versions_controller.rb +1 -1
- data/app/events/decidim/debates/create_debate_event.rb +1 -1
- data/app/forms/decidim/debates/admin/close_debate_form.rb +1 -1
- data/app/forms/decidim/debates/admin/debate_form.rb +4 -4
- data/app/models/decidim/debates/debate.rb +6 -1
- data/app/permissions/decidim/debates/permissions.rb +0 -2
- data/app/views/decidim/debates/admin/debates/_form.html.erb +2 -2
- data/app/views/decidim/debates/admin/debates/index.html.erb +1 -1
- data/app/views/decidim/debates/debates/_debates.html.erb +1 -1
- data/app/views/decidim/debates/debates/index.html.erb +0 -9
- data/app/views/decidim/debates/debates/new.html.erb +0 -1
- data/app/views/decidim/debates/debates/show.html.erb +1 -1
- data/config/locales/ar.yml +1 -2
- data/config/locales/bg.yml +3 -0
- data/config/locales/ca.yml +1 -1
- data/config/locales/cs.yml +7 -7
- data/config/locales/de.yml +2 -2
- data/config/locales/el.yml +3 -1
- data/config/locales/en.yml +1 -1
- data/config/locales/es-MX.yml +1 -1
- data/config/locales/es-PY.yml +1 -1
- data/config/locales/es.yml +1 -1
- data/config/locales/eu.yml +26 -26
- data/config/locales/fi-plain.yml +2 -2
- data/config/locales/fi.yml +5 -5
- data/config/locales/fr-CA.yml +1 -1
- data/config/locales/fr.yml +1 -1
- data/config/locales/ga-IE.yml +2 -2
- data/config/locales/gl.yml +1 -2
- data/config/locales/hu.yml +3 -1
- data/config/locales/id-ID.yml +1 -2
- data/config/locales/is-IS.yml +1 -5
- data/config/locales/it.yml +5 -4
- data/config/locales/ja.yml +2 -2
- data/config/locales/lb.yml +5 -2
- data/config/locales/lt.yml +4 -1
- data/config/locales/lv.yml +1 -2
- data/config/locales/nl.yml +4 -2
- data/config/locales/no.yml +4 -3
- data/config/locales/pl.yml +4 -1
- data/config/locales/pt-BR.yml +3 -7
- data/config/locales/pt.yml +1 -24
- data/config/locales/ro-RO.yml +37 -37
- data/config/locales/ru.yml +2 -6
- data/config/locales/sk.yml +1 -2
- data/config/locales/sl.yml +1 -0
- data/config/locales/sv.yml +38 -53
- data/config/locales/tr-TR.yml +4 -3
- data/config/locales/uk.yml +1 -5
- data/config/locales/zh-CN.yml +1 -2
- data/config/locales/zh-TW.yml +3 -1
- data/decidim-debates.gemspec +2 -3
- data/lib/decidim/api/debate_type.rb +0 -6
- data/lib/decidim/api/debates_type.rb +3 -1
- data/lib/decidim/debates/test/factories.rb +0 -6
- data/lib/decidim/debates/version.rb +1 -1
- metadata +15 -32
- data/config/locales/bn-BD.yml +0 -1
- data/config/locales/bs-BA.yml +0 -1
- data/config/locales/ca-IT.yml +0 -224
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c682db594758ac0c952f730441f2045d97cc3a554f8a0697fcc3df4aa093f9f
|
4
|
+
data.tar.gz: a65c9d155fe1f94b1f0bde4e1911f08ec05a37e9bb7da4ef903a6e0fcb67045c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc001f2b6a6ca4f3176db1f6f3ae2d71976945659ae5e13e09dcde996858f54c350f755d0adddf618a16e0f3b781040f5072deb387377e6699626c4ab4c2f571
|
7
|
+
data.tar.gz: 6ae0b994eb7f795b329e6c91cf2423a90c8e12e6548d61bb7d3a0656c12d0a93923eeec9bdc22eaf0b94993867e5942035419c43e9faf089718e26f94fb8dda3
|
@@ -4,49 +4,14 @@ module Decidim
|
|
4
4
|
module Debates
|
5
5
|
module Admin
|
6
6
|
# A command with all the business logic when an admin closes a debate.
|
7
|
-
class CloseDebate < Decidim::
|
8
|
-
# Public: Initializes the command.
|
9
|
-
#
|
10
|
-
# form - A form object with the params.
|
11
|
-
def initialize(form)
|
12
|
-
@form = form
|
13
|
-
end
|
14
|
-
|
15
|
-
# Executes the command. Broadcasts these events:
|
16
|
-
#
|
17
|
-
# - :ok when everything is valid, together with the debate.
|
18
|
-
# - :invalid if the form was not valid and we could not proceed.
|
19
|
-
#
|
20
|
-
# Returns nothing.
|
21
|
-
def call
|
22
|
-
return broadcast(:invalid) if form.invalid?
|
23
|
-
|
24
|
-
close_debate
|
25
|
-
broadcast(:ok, debate)
|
26
|
-
end
|
27
|
-
|
7
|
+
class CloseDebate < Decidim::Debates::CloseDebate
|
28
8
|
private
|
29
9
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
form.debate,
|
36
|
-
form.current_user
|
37
|
-
) do
|
38
|
-
form.debate.update!(
|
39
|
-
conclusions: form.conclusions,
|
40
|
-
closed_at: form.closed_at
|
41
|
-
)
|
42
|
-
end
|
43
|
-
|
44
|
-
Decidim::EventsManager.publish(
|
45
|
-
event: "decidim.events.debates.debate_closed",
|
46
|
-
event_class: Decidim::Debates::CloseDebateEvent,
|
47
|
-
resource: debate,
|
48
|
-
followers: debate.followers
|
49
|
-
)
|
10
|
+
def attributes
|
11
|
+
{
|
12
|
+
conclusions: form.conclusions,
|
13
|
+
closed_at: form.closed_at
|
14
|
+
}
|
50
15
|
end
|
51
16
|
end
|
52
17
|
end
|
@@ -5,59 +5,33 @@ module Decidim
|
|
5
5
|
module Admin
|
6
6
|
# This command is executed when the user creates a Debate from the admin
|
7
7
|
# panel.
|
8
|
-
class CreateDebate < Decidim::
|
9
|
-
|
10
|
-
@form = form
|
11
|
-
end
|
12
|
-
|
13
|
-
# Creates the debate if valid.
|
14
|
-
#
|
15
|
-
# Broadcasts :ok if successful, :invalid otherwise.
|
16
|
-
def call
|
17
|
-
return broadcast(:invalid) if form.invalid?
|
8
|
+
class CreateDebate < Decidim::Commands::CreateResource
|
9
|
+
fetch_form_attributes :category, :component, :information_updates, :instructions, :scope, :start_time, :end_time, :comments_enabled
|
18
10
|
|
19
|
-
|
20
|
-
create_debate
|
21
|
-
send_notification_to_space_followers
|
22
|
-
end
|
23
|
-
broadcast(:ok)
|
24
|
-
end
|
11
|
+
protected
|
25
12
|
|
26
|
-
|
13
|
+
def resource_class = Decidim::Debates::Debate
|
27
14
|
|
28
|
-
|
15
|
+
def extra_params = { visibility: "all" }
|
29
16
|
|
30
|
-
def
|
17
|
+
def attributes
|
31
18
|
parsed_title = Decidim::ContentProcessor.parse_with_processor(:hashtag, form.title, current_organization: form.current_organization).rewrite
|
32
19
|
parsed_description = Decidim::ContentProcessor.parse_with_processor(:hashtag, form.description, current_organization: form.current_organization).rewrite
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
start_time: (form.start_time if form.finite),
|
41
|
-
scope: form.scope,
|
42
|
-
component: form.current_component,
|
43
|
-
author: form.current_organization,
|
44
|
-
comments_enabled: form.comments_enabled
|
45
|
-
}
|
46
|
-
|
47
|
-
@debate = Decidim.traceability.create!(
|
48
|
-
Debate,
|
49
|
-
form.current_user,
|
50
|
-
params,
|
51
|
-
visibility: "all"
|
52
|
-
)
|
20
|
+
super.merge({
|
21
|
+
author: form.current_organization,
|
22
|
+
title: parsed_title,
|
23
|
+
description: parsed_description,
|
24
|
+
end_time: (form.end_time if form.finite),
|
25
|
+
start_time: (form.start_time if form.finite)
|
26
|
+
})
|
53
27
|
end
|
54
28
|
|
55
|
-
def
|
29
|
+
def run_after_hooks
|
56
30
|
Decidim::EventsManager.publish(
|
57
31
|
event: "decidim.events.debates.debate_created",
|
58
32
|
event_class: Decidim::Debates::CreateDebateEvent,
|
59
|
-
resource
|
60
|
-
followers: form.
|
33
|
+
resource:,
|
34
|
+
followers: form.component.participatory_space.followers,
|
61
35
|
extra: {
|
62
36
|
type: "participatory_space"
|
63
37
|
}
|
@@ -5,47 +5,19 @@ module Decidim
|
|
5
5
|
module Admin
|
6
6
|
# This command is executed when the user changes a Debate from the admin
|
7
7
|
# panel.
|
8
|
-
class UpdateDebate < Decidim::
|
9
|
-
|
10
|
-
#
|
11
|
-
# form - The form from which to get the data.
|
12
|
-
# debate - The current instance of the page to be updated.
|
13
|
-
def initialize(form, debate)
|
14
|
-
@form = form
|
15
|
-
@debate = debate
|
16
|
-
end
|
17
|
-
|
18
|
-
# Updates the debate if valid.
|
19
|
-
#
|
20
|
-
# Broadcasts :ok if successful, :invalid otherwise.
|
21
|
-
def call
|
22
|
-
return broadcast(:invalid) if form.invalid?
|
23
|
-
|
24
|
-
update_debate
|
25
|
-
broadcast(:ok)
|
26
|
-
end
|
8
|
+
class UpdateDebate < Decidim::Commands::UpdateResource
|
9
|
+
fetch_form_attributes :category, :information_updates, :instructions, :scope, :start_time, :end_time, :comments_enabled
|
27
10
|
|
28
11
|
private
|
29
12
|
|
30
|
-
|
31
|
-
|
32
|
-
def update_debate
|
13
|
+
def attributes
|
33
14
|
parsed_title = Decidim::ContentProcessor.parse_with_processor(:hashtag, form.title, current_organization: form.current_organization).rewrite
|
34
15
|
parsed_description = Decidim::ContentProcessor.parse_with_processor(:hashtag, form.description, current_organization: form.current_organization).rewrite
|
35
16
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
title: parsed_title,
|
41
|
-
description: parsed_description,
|
42
|
-
information_updates: form.information_updates,
|
43
|
-
instructions: form.instructions,
|
44
|
-
end_time: form.end_time,
|
45
|
-
start_time: form.start_time,
|
46
|
-
scope: form.scope,
|
47
|
-
comments_enabled: form.comments_enabled
|
48
|
-
)
|
17
|
+
super.merge({
|
18
|
+
title: parsed_title,
|
19
|
+
description: parsed_description
|
20
|
+
})
|
49
21
|
end
|
50
22
|
end
|
51
23
|
end
|
@@ -4,33 +4,30 @@ module Decidim
|
|
4
4
|
module Debates
|
5
5
|
# This command is executed when the user creates a Debate from the public
|
6
6
|
# views.
|
7
|
-
class CreateDebate < Decidim::
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
class CreateDebate < Decidim::Commands::CreateResource
|
8
|
+
fetch_form_attributes :category, :scope
|
9
|
+
|
10
|
+
private
|
11
11
|
|
12
|
-
|
13
|
-
#
|
14
|
-
# Broadcasts :ok if successful, :invalid otherwise.
|
15
|
-
def call
|
16
|
-
return broadcast(:invalid) if form.invalid?
|
12
|
+
def resource_class = Decidim::Debates::Debate
|
17
13
|
|
14
|
+
def extra_params = { visibility: "public-only" }
|
15
|
+
|
16
|
+
def create_resource
|
18
17
|
with_events(with_transaction: true) do
|
19
|
-
|
18
|
+
super
|
20
19
|
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def run_after_hooks
|
21
23
|
send_notification_to_author_followers
|
22
24
|
send_notification_to_space_followers
|
23
25
|
follow_debate
|
24
|
-
broadcast(:ok, debate)
|
25
26
|
end
|
26
27
|
|
27
|
-
private
|
28
|
-
|
29
|
-
attr_reader :debate, :form
|
30
|
-
|
31
28
|
def event_arguments
|
32
29
|
{
|
33
|
-
resource
|
30
|
+
resource:,
|
34
31
|
extra: {
|
35
32
|
event_author: form.current_user,
|
36
33
|
locale:
|
@@ -38,37 +35,25 @@ module Decidim
|
|
38
35
|
}
|
39
36
|
end
|
40
37
|
|
41
|
-
def
|
38
|
+
def attributes
|
42
39
|
parsed_title = Decidim::ContentProcessor.parse_with_processor(:hashtag, form.title, current_organization: form.current_organization).rewrite
|
43
40
|
parsed_description = Decidim::ContentProcessor.parse_with_processor(:hashtag, form.description, current_organization: form.current_organization).rewrite
|
44
|
-
params = {
|
45
|
-
author: form.current_user,
|
46
|
-
decidim_user_group_id: form.user_group_id,
|
47
|
-
category: form.category,
|
48
|
-
title: {
|
49
|
-
I18n.locale => parsed_title
|
50
|
-
},
|
51
|
-
description: {
|
52
|
-
I18n.locale => parsed_description
|
53
|
-
},
|
54
|
-
scope: form.scope,
|
55
|
-
component: form.current_component
|
56
|
-
}
|
57
41
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
42
|
+
super.merge({
|
43
|
+
author: form.current_user,
|
44
|
+
decidim_user_group_id: form.user_group_id,
|
45
|
+
title: { I18n.locale => parsed_title },
|
46
|
+
description: { I18n.locale => parsed_description },
|
47
|
+
component: form.current_component
|
48
|
+
})
|
64
49
|
end
|
65
50
|
|
66
51
|
def send_notification_to_author_followers
|
67
52
|
Decidim::EventsManager.publish(
|
68
53
|
event: "decidim.events.debates.debate_created",
|
69
54
|
event_class: Decidim::Debates::CreateDebateEvent,
|
70
|
-
resource
|
71
|
-
followers:
|
55
|
+
resource:,
|
56
|
+
followers: resource.author.followers,
|
72
57
|
extra: {
|
73
58
|
type: "user"
|
74
59
|
}
|
@@ -79,8 +64,8 @@ module Decidim
|
|
79
64
|
Decidim::EventsManager.publish(
|
80
65
|
event: "decidim.events.debates.debate_created",
|
81
66
|
event_class: Decidim::Debates::CreateDebateEvent,
|
82
|
-
resource
|
83
|
-
followers:
|
67
|
+
resource:,
|
68
|
+
followers: resource.participatory_space.followers,
|
84
69
|
extra: {
|
85
70
|
type: "participatory_space"
|
86
71
|
}
|
@@ -89,9 +74,9 @@ module Decidim
|
|
89
74
|
|
90
75
|
def follow_debate
|
91
76
|
follow_form = Decidim::FollowForm
|
92
|
-
.from_params(followable_gid:
|
93
|
-
.with_context(current_user:
|
94
|
-
Decidim::CreateFollow.call(follow_form
|
77
|
+
.from_params(followable_gid: resource.to_signed_global_id.to_s)
|
78
|
+
.with_context(current_user: resource.author)
|
79
|
+
Decidim::CreateFollow.call(follow_form)
|
95
80
|
end
|
96
81
|
end
|
97
82
|
end
|
@@ -3,38 +3,20 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Debates
|
5
5
|
# A command with all the business logic when a user updates a debate.
|
6
|
-
class UpdateDebate < Decidim::
|
7
|
-
|
8
|
-
#
|
9
|
-
# form - A form object with the params.
|
10
|
-
def initialize(form)
|
11
|
-
@form = form
|
12
|
-
end
|
6
|
+
class UpdateDebate < Decidim::Commands::UpdateResource
|
7
|
+
fetch_form_attributes :category, :scope
|
13
8
|
|
14
|
-
|
15
|
-
#
|
16
|
-
# - :ok when everything is valid, together with the debate.
|
17
|
-
# - :invalid if the form was not valid and we could not proceed.
|
18
|
-
#
|
19
|
-
# Returns nothing.
|
20
|
-
def call
|
21
|
-
return broadcast(:invalid) if form.invalid?
|
22
|
-
return broadcast(:invalid) unless form.debate.editable_by?(form.current_user)
|
9
|
+
private
|
23
10
|
|
11
|
+
def update_resource
|
24
12
|
with_events(with_transaction: true) do
|
25
|
-
|
13
|
+
super
|
26
14
|
end
|
27
|
-
|
28
|
-
broadcast(:ok, @debate)
|
29
15
|
end
|
30
16
|
|
31
|
-
private
|
32
|
-
|
33
|
-
attr_reader :form
|
34
|
-
|
35
17
|
def event_arguments
|
36
18
|
{
|
37
|
-
resource
|
19
|
+
resource:,
|
38
20
|
extra: {
|
39
21
|
event_author: form.current_user,
|
40
22
|
locale:
|
@@ -42,28 +24,16 @@ module Decidim
|
|
42
24
|
}
|
43
25
|
end
|
44
26
|
|
45
|
-
def
|
46
|
-
@debate = Decidim.traceability.update!(
|
47
|
-
@form.debate,
|
48
|
-
@form.current_user,
|
49
|
-
attributes,
|
50
|
-
visibility: "public-only"
|
51
|
-
)
|
52
|
-
end
|
27
|
+
def extra_params = { visibility: "public-only" }
|
53
28
|
|
54
29
|
def attributes
|
55
30
|
parsed_title = Decidim::ContentProcessor.parse_with_processor(:hashtag, form.title, current_organization: form.current_organization).rewrite
|
56
31
|
parsed_description = Decidim::ContentProcessor.parse_with_processor(:hashtag, form.description, current_organization: form.current_organization).rewrite
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
description: {
|
63
|
-
I18n.locale => parsed_description
|
64
|
-
},
|
65
|
-
scope: form.scope
|
66
|
-
}
|
32
|
+
|
33
|
+
super.merge({
|
34
|
+
title: { I18n.locale => parsed_title },
|
35
|
+
description: { I18n.locale => parsed_description }
|
36
|
+
})
|
67
37
|
end
|
68
38
|
end
|
69
39
|
end
|
@@ -54,7 +54,7 @@ module Decidim
|
|
54
54
|
|
55
55
|
@form = form(DebateForm).from_params(params)
|
56
56
|
|
57
|
-
UpdateDebate.call(@form) do
|
57
|
+
UpdateDebate.call(@form, debate) do
|
58
58
|
on(:ok) do |debate|
|
59
59
|
flash[:notice] = I18n.t("debates.update.success", scope: "decidim.debates")
|
60
60
|
redirect_to Decidim::ResourceLocatorPresenter.new(debate).path
|
@@ -9,7 +9,7 @@ module Decidim
|
|
9
9
|
include Decidim::ResourceVersionsConcern
|
10
10
|
|
11
11
|
def versioned_resource
|
12
|
-
@versioned_resource ||= present(Debate.where(component: current_component).
|
12
|
+
@versioned_resource ||= present(Debate.where(component: current_component).find(params[:debate_id]))
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -7,7 +7,7 @@ module Decidim
|
|
7
7
|
#
|
8
8
|
# "user" - The event is being sent to the followers of the debate
|
9
9
|
# author
|
10
|
-
# "participatory_space" - The event is being
|
10
|
+
# "participatory_space" - The event is being sent to the followers
|
11
11
|
# of the event's participatory space.
|
12
12
|
class CreateDebateEvent < Decidim::Events::SimpleEvent
|
13
13
|
include Decidim::Events::AuthorEvent
|
@@ -9,7 +9,7 @@ module Decidim
|
|
9
9
|
|
10
10
|
mimic :debate
|
11
11
|
|
12
|
-
translatable_attribute :conclusions, Decidim::Attributes::
|
12
|
+
translatable_attribute :conclusions, Decidim::Attributes::CleanString do |translated_attribute, locale|
|
13
13
|
validates translated_attribute, presence: true, if: ->(record) { record.default_locale?(locale) }
|
14
14
|
validates translated_attribute, length: { minimum: 10, maximum: 10_000 }, if: ->(record) { record.default_locale?(locale) }
|
15
15
|
end
|
@@ -8,9 +8,9 @@ module Decidim
|
|
8
8
|
include TranslatableAttributes
|
9
9
|
|
10
10
|
translatable_attribute :title, String
|
11
|
-
translatable_attribute :description,
|
12
|
-
translatable_attribute :instructions,
|
13
|
-
translatable_attribute :information_updates,
|
11
|
+
translatable_attribute :description, String
|
12
|
+
translatable_attribute :instructions, String
|
13
|
+
translatable_attribute :information_updates, String
|
14
14
|
attribute :start_time, Decidim::Attributes::TimeWithZone
|
15
15
|
attribute :end_time, Decidim::Attributes::TimeWithZone
|
16
16
|
attribute :decidim_category_id, Integer
|
@@ -43,7 +43,7 @@ module Decidim
|
|
43
43
|
@category ||= current_component.categories.find_by(id: decidim_category_id)
|
44
44
|
end
|
45
45
|
|
46
|
-
# Finds the Scope from the given decidim_scope_id, uses the
|
46
|
+
# Finds the Scope from the given decidim_scope_id, uses the component scope if missing.
|
47
47
|
#
|
48
48
|
# Returns a Decidim::Scope
|
49
49
|
def scope
|
@@ -74,6 +74,11 @@ module Decidim
|
|
74
74
|
end_time
|
75
75
|
end
|
76
76
|
|
77
|
+
# Public: Overrides the `reported_content_url` Reportable concern method.
|
78
|
+
def reported_content_url
|
79
|
+
ResourceLocatorPresenter.new(self).url
|
80
|
+
end
|
81
|
+
|
77
82
|
# Public: Overrides the `reported_attributes` Reportable concern method.
|
78
83
|
def reported_attributes
|
79
84
|
[:title, :description]
|
@@ -81,7 +86,7 @@ module Decidim
|
|
81
86
|
|
82
87
|
# Public: Overrides the `reported_searchable_content_extras` Reportable concern method.
|
83
88
|
def reported_searchable_content_extras
|
84
|
-
[
|
89
|
+
[author_name]
|
85
90
|
end
|
86
91
|
|
87
92
|
# Public: Calculates whether the current debate is an AMA-styled one or not.
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<div class="form__wrapper">
|
2
2
|
<div class="card pt-4">
|
3
3
|
<div class="card-section debate-fields">
|
4
|
-
<div class="row column
|
4
|
+
<div class="row column">
|
5
5
|
<%= form.translated :text_field, :title, autofocus: true, class: "js-hashtags", hashtaggable: true, aria: { label: :title } %>
|
6
6
|
</div>
|
7
7
|
|
8
|
-
<div class="row column
|
8
|
+
<div class="row column">
|
9
9
|
<%= form.translated :editor, :description, hashtaggable: true, aria: { label: :description } %>
|
10
10
|
</div>
|
11
11
|
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<th><%= t("models.debate.fields.start_time", scope: "decidim.debates") %></th>
|
17
17
|
<th><%= t("models.debate.fields.end_time", scope: "decidim.debates") %></th>
|
18
18
|
<%= th_resource_scope_label %>
|
19
|
-
<th
|
19
|
+
<th><%= t("actions.title", scope: "decidim.debates") %></th>
|
20
20
|
</tr>
|
21
21
|
</thead>
|
22
22
|
<tbody>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% if debates.empty? %>
|
2
2
|
<%= cell("decidim/announcement", params[:filter].present? ? t(".empty_filters") : t(".empty")) %>
|
3
3
|
<% else %>
|
4
|
-
<h2 class="h5 md:h3 decorator"
|
4
|
+
<h2 class="h5 md:h3 decorator"><%= t("debates_count", scope: "decidim.debates.debates.count", count: paginated_debates.total_count) %></h2>
|
5
5
|
|
6
6
|
<%= order_selector available_orders, i18n_scope: "decidim.debates.debates.orders" %>
|
7
7
|
|
@@ -1,12 +1,3 @@
|
|
1
|
-
<% add_decidim_meta_tags(
|
2
|
-
description: translated_attribute(current_participatory_space.short_description),
|
3
|
-
title: t("decidim.components.pagination.page_title",
|
4
|
-
component_name:,
|
5
|
-
current_page: paginated_debates.current_page,
|
6
|
-
total_pages: paginated_debates.total_pages ),
|
7
|
-
url: debates_url,
|
8
|
-
resource: current_component) %>
|
9
|
-
|
10
1
|
<% content_for :aside do %>
|
11
2
|
<h1 class="title-decorator"><%= component_name %></h1>
|
12
3
|
|
@@ -30,7 +30,7 @@ edit_link(
|
|
30
30
|
<div class="layout-author">
|
31
31
|
<%= cell "decidim/author", debate_presenter.author, skip_profile_link: true %>
|
32
32
|
<% if debate.closed? %>
|
33
|
-
<span class="success label
|
33
|
+
<span class="success label">
|
34
34
|
<%= t("debate_closed", scope: "decidim.debates.debates.show") %>
|
35
35
|
</span>
|
36
36
|
<% end %>
|
data/config/locales/ar.yml
CHANGED
@@ -88,7 +88,6 @@ ar:
|
|
88
88
|
origin: الأصل
|
89
89
|
participants: المشاركون
|
90
90
|
search: بحث
|
91
|
-
user_group: الفِرَق
|
92
91
|
form:
|
93
92
|
select_a_category: الرجاء تحديد الفئة
|
94
93
|
index:
|
@@ -96,8 +95,8 @@ ar:
|
|
96
95
|
new:
|
97
96
|
back: الى الخلف
|
98
97
|
create: إنشاء
|
98
|
+
title: نقاش جديد
|
99
99
|
show:
|
100
|
-
edit_debate: تحرير النقاش
|
101
100
|
groups_count: الفِرَق
|
102
101
|
participants_count: المشاركون
|
103
102
|
models:
|
data/config/locales/bg.yml
CHANGED
@@ -80,6 +80,8 @@ bg:
|
|
80
80
|
update:
|
81
81
|
invalid: Възникна проблем при актуализирането на този дебат.
|
82
82
|
success: Дебатът беше актуализиран успешно.
|
83
|
+
exports:
|
84
|
+
comments: Коментари
|
83
85
|
admin_log:
|
84
86
|
debate:
|
85
87
|
close: "%{user_name} затвори дебата %{resource_name} в пространството %{space_name}"
|
@@ -132,6 +134,7 @@ bg:
|
|
132
134
|
new:
|
133
135
|
back: Назад
|
134
136
|
create: Създаване
|
137
|
+
title: Нов дебат
|
135
138
|
orders:
|
136
139
|
commented: Най-коментирани
|
137
140
|
label: Подреждане на дебатите по
|
data/config/locales/ca.yml
CHANGED
data/config/locales/cs.yml
CHANGED
@@ -23,10 +23,10 @@ cs:
|
|
23
23
|
activerecord:
|
24
24
|
models:
|
25
25
|
decidim/debates/debate:
|
26
|
-
one:
|
26
|
+
one: Rozprava
|
27
27
|
few: Debaty
|
28
|
-
many:
|
29
|
-
other:
|
28
|
+
many: Debaty
|
29
|
+
other: Debaty
|
30
30
|
decidim:
|
31
31
|
components:
|
32
32
|
debates:
|
@@ -121,7 +121,7 @@ cs:
|
|
121
121
|
category: Kategorie
|
122
122
|
category_prompt: Vyberte kategorii
|
123
123
|
commented: Okomentováno
|
124
|
-
my_debates: Moje
|
124
|
+
my_debates: Moje rozpravy
|
125
125
|
official: Oficiální
|
126
126
|
origin: Původ
|
127
127
|
participants: Účastníci
|
@@ -138,10 +138,10 @@ cs:
|
|
138
138
|
new:
|
139
139
|
back: Zpět
|
140
140
|
create: Vytvořit
|
141
|
-
title:
|
141
|
+
title: Nová debata
|
142
142
|
orders:
|
143
143
|
commented: Nejvíce komentované
|
144
|
-
label: Řazení
|
144
|
+
label: Řazení rozprav podle
|
145
145
|
random: Náhodné pořadí
|
146
146
|
recent: Nejnovější
|
147
147
|
updated: Naposledy aktualizované
|
@@ -155,7 +155,7 @@ cs:
|
|
155
155
|
open: Otevřená diskuse
|
156
156
|
participants_count: Účastníci
|
157
157
|
update:
|
158
|
-
invalid: Při aktualizaci
|
158
|
+
invalid: Při aktualizaci rozpravy došlo k chybě.
|
159
159
|
success: Debata byla úspěšně aktualizována.
|
160
160
|
last_activity:
|
161
161
|
debate_updated: 'Debata aktualizována:'
|