decidim-debates 0.28.1 → 0.29.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- 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 +2 -1
- data/app/events/decidim/debates/create_debate_event.rb +1 -1
- data/app/forms/decidim/debates/admin/debate_form.rb +1 -1
- data/app/models/decidim/debates/debate.rb +7 -1
- data/app/presenters/decidim/debates/admin_log/debate_presenter.rb +0 -4
- data/app/presenters/decidim/debates/admin_log/value_types/debate_title_description_presenter.rb +1 -1
- 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/show.html.erb +1 -1
- data/config/locales/bg.yml +210 -0
- 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/pl.yml +7 -0
- data/config/locales/tr-TR.yml +3 -0
- data/decidim-debates.gemspec +1 -1
- data/lib/decidim/debates/version.rb +1 -1
- metadata +17 -18
- data/app/presenters/decidim/debates/log/resource_presenter.rb +0 -18
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
|
@@ -13,6 +13,7 @@ module Decidim
|
|
13
13
|
include Decidim::Debates::Orderable
|
14
14
|
|
15
15
|
helper_method :debates, :debate, :form_presenter, :paginated_debates, :close_debate_form
|
16
|
+
before_action :authenticate_user!, only: [:new, :create]
|
16
17
|
|
17
18
|
def new
|
18
19
|
enforce_permission_to :create, :debate
|
@@ -53,7 +54,7 @@ module Decidim
|
|
53
54
|
|
54
55
|
@form = form(DebateForm).from_params(params)
|
55
56
|
|
56
|
-
UpdateDebate.call(@form) do
|
57
|
+
UpdateDebate.call(@form, debate) do
|
57
58
|
on(:ok) do |debate|
|
58
59
|
flash[:notice] = I18n.t("debates.update.success", scope: "decidim.debates")
|
59
60
|
redirect_to Decidim::ResourceLocatorPresenter.new(debate).path
|
@@ -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
|
@@ -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
|
@@ -56,6 +56,12 @@ module Decidim
|
|
56
56
|
}
|
57
57
|
scope_search_multi :with_any_state, [:open, :closed]
|
58
58
|
|
59
|
+
# Returns the presenter for this debate, to be used in the views.
|
60
|
+
# Required by ResourceRenderer.
|
61
|
+
def presenter
|
62
|
+
Decidim::Debates::DebatePresenter.new(self)
|
63
|
+
end
|
64
|
+
|
59
65
|
def self.log_presenter_class_for(_log)
|
60
66
|
Decidim::Debates::AdminLog::DebatePresenter
|
61
67
|
end
|
@@ -80,7 +86,7 @@ module Decidim
|
|
80
86
|
|
81
87
|
# Public: Overrides the `reported_searchable_content_extras` Reportable concern method.
|
82
88
|
def reported_searchable_content_extras
|
83
|
-
[
|
89
|
+
[author_name]
|
84
90
|
end
|
85
91
|
|
86
92
|
# Public: Calculates whether the current debate is an AMA-styled one or not.
|
@@ -15,10 +15,6 @@ module Decidim
|
|
15
15
|
class DebatePresenter < Decidim::Log::BasePresenter
|
16
16
|
private
|
17
17
|
|
18
|
-
def resource_presenter
|
19
|
-
@resource_presenter ||= Decidim::Debates::Log::ResourcePresenter.new(action_log.resource, h, action_log.extra["resource"])
|
20
|
-
end
|
21
|
-
|
22
18
|
def diff_fields_mapping
|
23
19
|
{
|
24
20
|
description: "Decidim::Debates::AdminLog::ValueTypes::DebateTitleDescriptionPresenter",
|
data/app/presenters/decidim/debates/admin_log/value_types/debate_title_description_presenter.rb
CHANGED
@@ -10,7 +10,7 @@ module Decidim
|
|
10
10
|
def present
|
11
11
|
return unless value
|
12
12
|
|
13
|
-
renderer = Decidim::ContentRenderers::HashtagRenderer.new(h.
|
13
|
+
renderer = Decidim::ContentRenderers::HashtagRenderer.new(h.decidim_escape_translated(value))
|
14
14
|
renderer.render(links: false).html_safe
|
15
15
|
end
|
16
16
|
end
|
@@ -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>
|
@@ -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/bg.yml
CHANGED
@@ -4,11 +4,221 @@ bg:
|
|
4
4
|
attributes:
|
5
5
|
debate:
|
6
6
|
category_id: Категория
|
7
|
+
closed_at: Затворено на
|
8
|
+
conclusions: Заключения
|
7
9
|
decidim_category_id: Категория
|
8
10
|
description: Описание
|
11
|
+
end_time: Завършва на
|
12
|
+
information_updates: Актуализации на информацията
|
13
|
+
instructions: Инструкции за участие
|
14
|
+
scope_id: Обхват
|
15
|
+
start_time: Започва в
|
16
|
+
title: Заглавие
|
17
|
+
user_group_id: Създаване на дебат като
|
18
|
+
models:
|
19
|
+
decidim/debates/close_debate_event: Дебатът е затворен
|
20
|
+
decidim/debates/create_debate_event: Дебат
|
21
|
+
decidim/debates/creation_disabled_event: Дебатите са неактивни
|
22
|
+
decidim/debates/creation_enabled_event: Създаването на дебати е активирано
|
23
|
+
activerecord:
|
24
|
+
models:
|
25
|
+
decidim/debates/debate:
|
26
|
+
one: Дебат
|
27
|
+
other: Дебати
|
9
28
|
decidim:
|
29
|
+
components:
|
30
|
+
debates:
|
31
|
+
actions:
|
32
|
+
comment: Коментар
|
33
|
+
create: Създаване
|
34
|
+
endorse: Одобрявам
|
35
|
+
name: Дебати
|
36
|
+
settings:
|
37
|
+
global:
|
38
|
+
announcement: Обявление
|
39
|
+
comments_enabled: Коментарите са активирани
|
40
|
+
comments_max_length: Максимална дължина на коментарите (Оставете 0 за стойност по подразбиране)
|
41
|
+
scope_id: Обхват
|
42
|
+
scopes_enabled: Обхватите са активирани
|
43
|
+
step:
|
44
|
+
announcement: Обявление
|
45
|
+
comments_blocked: Коментарите са блокирани
|
46
|
+
creation_enabled: Участниците могат да създават дебати
|
47
|
+
endorsements_blocked: Одобренията са блокирани
|
48
|
+
endorsements_enabled: Одобренията са активирани
|
10
49
|
debates:
|
50
|
+
actions:
|
51
|
+
close: Затвори
|
52
|
+
confirm_destroy: Сигурни ли сте?
|
53
|
+
destroy: Изтрий
|
54
|
+
edit: Редактирай
|
55
|
+
new: Нов дебат
|
56
|
+
title: Активности
|
57
|
+
admin:
|
58
|
+
debate_closes:
|
59
|
+
edit:
|
60
|
+
close: Затвори
|
61
|
+
title: Затваряне на дебата
|
62
|
+
debates:
|
63
|
+
create:
|
64
|
+
invalid: Възникна проблем при създаването на дебата.
|
65
|
+
success: Дебатът беше създаден успешно.
|
66
|
+
destroy:
|
67
|
+
success: Дебатът беше изтрит успешно.
|
68
|
+
edit:
|
69
|
+
title: Редактиране на дебата
|
70
|
+
update: Актуализиране на дебата
|
71
|
+
form:
|
72
|
+
debate_type: Тип на дебата
|
73
|
+
finite: Краен (с начален и краен час)
|
74
|
+
open: Отворено (без начален или краен час)
|
75
|
+
index:
|
76
|
+
title: Дебати
|
77
|
+
new:
|
78
|
+
create: Създаване на дебат
|
79
|
+
title: Нов дебат
|
80
|
+
update:
|
81
|
+
invalid: Възникна проблем при актуализирането на този дебат.
|
82
|
+
success: Дебатът беше актуализиран успешно.
|
83
|
+
exports:
|
84
|
+
comments: Коментари
|
85
|
+
admin_log:
|
86
|
+
debate:
|
87
|
+
close: "%{user_name} затвори дебата %{resource_name} в пространството %{space_name}"
|
88
|
+
create: "%{user_name} създаде дебата %{resource_name} в пространството %{space_name}"
|
89
|
+
update: "%{user_name} актуализира дебата %{resource_name} в пространството %{space_name}"
|
90
|
+
debate_m:
|
91
|
+
commented_time_ago: Коментирано преди %{time}
|
11
92
|
debates:
|
93
|
+
close:
|
94
|
+
invalid: Възникна проблем при затварянето на дебата.
|
95
|
+
success: Дебатът беше затворен успешно.
|
96
|
+
close_debate_modal:
|
97
|
+
cancel: Отказ
|
98
|
+
description: Какво е обобщението или заключението на този дебат?
|
99
|
+
send: Затваряне на дебата
|
100
|
+
count:
|
101
|
+
debates_count:
|
102
|
+
one: "%{count} дебат"
|
103
|
+
other: "%{count} дебата"
|
104
|
+
create:
|
105
|
+
invalid: Възникна проблем при създаването на дебата.
|
106
|
+
success: Дебатът беше създаден успешно.
|
107
|
+
debates:
|
108
|
+
empty: Все още няма дебати.
|
109
|
+
empty_filters: Няма дебати с този критерий.
|
110
|
+
edit:
|
111
|
+
back: Назад
|
112
|
+
save: Запази промените
|
113
|
+
title: Редактиране на дебата
|
114
|
+
filters:
|
115
|
+
activity: Моята дейност
|
116
|
+
all: Всички
|
117
|
+
category: Категория
|
118
|
+
category_prompt: Изберете категория
|
119
|
+
commented: Коментирано
|
120
|
+
my_debates: Моите дебати
|
121
|
+
official: Официални
|
122
|
+
origin: Произход
|
123
|
+
participants: Участници
|
124
|
+
search: Търсене
|
125
|
+
state: Статус
|
126
|
+
state_values:
|
127
|
+
closed: Затворен
|
128
|
+
open: Отворен
|
129
|
+
user_group: Групи
|
130
|
+
form:
|
131
|
+
select_a_category: Моля, изберете категория
|
132
|
+
index:
|
133
|
+
new_debate: Нов дебат
|
134
|
+
new:
|
135
|
+
back: Назад
|
136
|
+
create: Създаване
|
137
|
+
title: Нов дебат
|
138
|
+
orders:
|
139
|
+
commented: Най-коментирани
|
140
|
+
label: Подреждане на дебатите по
|
141
|
+
random: Случаен ред
|
142
|
+
recent: Най-скорошни
|
143
|
+
updated: Скоро обновени
|
12
144
|
show:
|
145
|
+
close_debate: Затваряне на дебата
|
146
|
+
debate_closed: Затворен
|
147
|
+
debate_conclusions_are: 'Дебатът беше затворен на %{date} със следните заключения:'
|
148
|
+
edit_conclusions: Редактиране на заключенията
|
149
|
+
edit_debate: Редактиране на дебата
|
13
150
|
groups_count: Групи
|
151
|
+
open: Отворен дебат
|
14
152
|
participants_count: Участници
|
153
|
+
update:
|
154
|
+
invalid: Възникна проблем при актуализирането на дебата.
|
155
|
+
success: Дебатът беше актуализиран успешно.
|
156
|
+
last_activity:
|
157
|
+
debate_updated: 'Дебатът е актуализиран:'
|
158
|
+
new_debate: 'Нов дебат:'
|
159
|
+
models:
|
160
|
+
debate:
|
161
|
+
fields:
|
162
|
+
end: Край
|
163
|
+
end_time: Крайна дата
|
164
|
+
official_debate: Официален дебат
|
165
|
+
start: Начало
|
166
|
+
start_time: Начална дата
|
167
|
+
title: Заглавие
|
168
|
+
events:
|
169
|
+
debates:
|
170
|
+
create_debate_event:
|
171
|
+
space_followers:
|
172
|
+
email_intro: |-
|
173
|
+
Здравейте
|
174
|
+
Нов дебат „%{resource_title}“ е създаден в пространството за участие %{participatory_space_title}, разгледайте го и допринесете:
|
175
|
+
email_outro: Получихте това известие, защото следвате %{participatory_space_title} пространство за участие. Можете да спрете да получавате известия, като следвате предишната връзка.
|
176
|
+
email_subject: Нов дебат „%{resource_title}“ на %{participatory_space_title}
|
177
|
+
notification_title: Дебатът <a href="%{resource_path}">%{resource_title}</a> беше създаден на <a href="%{participatory_space_url}">%{participatory_space_title}</a>.
|
178
|
+
user_followers:
|
179
|
+
email_intro: |-
|
180
|
+
Здравейте,
|
181
|
+
участниът %{author_name} %{author_nickname}, когото следвате, създаде нов дебат „%{resource_title}“. Вижте го и допринесете:
|
182
|
+
email_outro: Получихте това известие, защото следвате %{author_nickname}. Можете да спрете да получавате известия, като последвате предходния линк.
|
183
|
+
email_subject: Нов дебат „%{resource_title}“ от %{author_nickname}
|
184
|
+
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> създаде дебата <a href="%{resource_path}">%{resource_title}</a>.
|
185
|
+
creation_disabled:
|
186
|
+
email_intro: 'Създаването на дебати вече не е активно в(ъв) %{participatory_space_title}. Все още можете да участвате в отворени дебати от следната страница:'
|
187
|
+
email_outro: Получавате това известие, защото следвате %{participatory_space_title}. Може да прекратите известията чрез предходния линк.
|
188
|
+
email_subject: Създаването на дебати е деактивирано в(ъв) %{participatory_space_title}
|
189
|
+
notification_title: Създаването на дебати вече е деактивирано в(ъв) <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
190
|
+
creation_enabled:
|
191
|
+
email_intro: 'Вече можете да създавате нови дебати в(ъв) %{participatory_space_title}! Започнете да участвате на следната страница:'
|
192
|
+
email_outro: Получавате това известие, защото следвате %{participatory_space_title}. Може да прекратите известията чрез предходния линк.
|
193
|
+
email_subject: Дебатите вече са налице в(ъв) %{participatory_space_title}
|
194
|
+
notification_title: Вече можете да създавате <a href="%{resource_path}">нови дебати</a> в(ъв) <a href="%{participatory_space_url}">%{participatory_space_title}</a>.
|
195
|
+
debate_closed:
|
196
|
+
affected_user:
|
197
|
+
email_intro: 'Дебатът „%{resource_title}“ беше затворен. Можете да прочетете заключенията на страницата за него:'
|
198
|
+
email_outro: Получавате това известие, защото следвате дебата „%{resource_title}“. Можете да прекратите следването от предходната връзка.
|
199
|
+
email_subject: Дебатът „%{resource_title}“ беше затворен
|
200
|
+
notification_title: Дебатът <a href="%{resource_path}">%{resource_title}</a> беше затворен.
|
201
|
+
follower:
|
202
|
+
email_intro: 'Дебатът „%{resource_title}“ беше затворен. Можете да прочетете заключенията на неговата страница:'
|
203
|
+
email_outro: Получавате това известие, защото следвате дебата „%{resource_title}“. Можете да прекратите следването от предходния линк.
|
204
|
+
email_subject: Дебатът „%{resource_title}“ беше затворен
|
205
|
+
notification_title: Дебатът <a href="%{resource_path}">%{resource_title}</a> беше затворен.
|
206
|
+
gamification:
|
207
|
+
badges:
|
208
|
+
commented_debates:
|
209
|
+
conditions:
|
210
|
+
- Изберете отворен дебат и участвайте в него
|
211
|
+
description: Тази значка се предоставя, когато участвате активно в различни дебати, като оставяте коментари.
|
212
|
+
description_another: Този участник се е включил в %{score} дебата.
|
213
|
+
description_own: Участвали сте в %{score} дебата.
|
214
|
+
name: Дебати
|
215
|
+
next_level_in: Участвайте в още %{score} дебата, за да достигнете следващото ниво!
|
216
|
+
unearned_another: Този участник все още не е участвал в нито един дебат.
|
217
|
+
unearned_own: Все още не сте участвали в нито един дебат.
|
218
|
+
metrics:
|
219
|
+
debates:
|
220
|
+
description: Брой създадени дебати
|
221
|
+
object: дебати
|
222
|
+
title: Дебати
|
223
|
+
statistics:
|
224
|
+
debates_count: Дебати
|
data/config/locales/es-MX.yml
CHANGED
data/config/locales/es-PY.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/pl.yml
CHANGED
@@ -172,6 +172,13 @@ pl:
|
|
172
172
|
events:
|
173
173
|
debates:
|
174
174
|
create_debate_event:
|
175
|
+
space_followers:
|
176
|
+
email_intro: |-
|
177
|
+
Cześć,
|
178
|
+
Nowa debata "%{resource_title}" została utworzona na przestrzeni partycypacyjnej %{participatory_space_title}, sprawdź ją i pomóż:
|
179
|
+
email_outro: Otrzymujesz to powiadomienie, ponieważ obserwujesz przestrzeń partycypacyjną %{participatory_space_title}. Możesz wyłączyć powiadomienia, klikając poprzedni link.
|
180
|
+
email_subject: Nowa debata "%{resource_title}" w %{participatory_space_title}
|
181
|
+
notification_title: Debata <a href="%{resource_path}">%{resource_title}</a> została utworzona w <a href="%{participatory_space_url}">%{participatory_space_title}</a>.
|
175
182
|
user_followers:
|
176
183
|
email_intro: |-
|
177
184
|
Cześć,
|
data/config/locales/tr-TR.yml
CHANGED
@@ -99,6 +99,9 @@ tr:
|
|
99
99
|
create:
|
100
100
|
invalid: Tartışmayı oluştururken bir sorun oluştu.
|
101
101
|
success: Tartışma başarıyla oluşturuldu.
|
102
|
+
debates:
|
103
|
+
empty: Henüz herhangi bir tartışma yok.
|
104
|
+
empty_filters: Bu kritere uyan bir tartışma yok.
|
102
105
|
edit:
|
103
106
|
back: Geri
|
104
107
|
save: Değişiklikleri kaydet
|
data/decidim-debates.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
"homepage_uri" => "https://decidim.org",
|
19
19
|
"source_code_uri" => "https://github.com/decidim/decidim"
|
20
20
|
}
|
21
|
-
s.required_ruby_version = "~> 3.
|
21
|
+
s.required_ruby_version = "~> 3.2.0"
|
22
22
|
|
23
23
|
s.name = "decidim-debates"
|
24
24
|
s.summary = "Decidim debates module"
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-debates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.29.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
8
8
|
- Marc Riera Casals
|
9
9
|
- Oriol Gual Oliva
|
10
10
|
- Genis Matutes Pujol
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2024-
|
14
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: decidim-comments
|
@@ -19,56 +19,56 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
22
|
+
version: 0.29.0.rc1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.29.0.rc1
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: decidim-core
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - '='
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.
|
36
|
+
version: 0.29.0.rc1
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - '='
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.
|
43
|
+
version: 0.29.0.rc1
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: decidim-admin
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
48
|
- - '='
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.
|
50
|
+
version: 0.29.0.rc1
|
51
51
|
type: :development
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - '='
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 0.
|
57
|
+
version: 0.29.0.rc1
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: decidim-dev
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
62
|
- - '='
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 0.
|
64
|
+
version: 0.29.0.rc1
|
65
65
|
type: :development
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - '='
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: 0.
|
71
|
+
version: 0.29.0.rc1
|
72
72
|
description: A debates component for decidim's participatory spaces.
|
73
73
|
email:
|
74
74
|
- josepjaume@gmail.com
|
@@ -126,7 +126,6 @@ files:
|
|
126
126
|
- app/presenters/decidim/debates/admin_log/debate_presenter.rb
|
127
127
|
- app/presenters/decidim/debates/admin_log/value_types/debate_title_description_presenter.rb
|
128
128
|
- app/presenters/decidim/debates/debate_presenter.rb
|
129
|
-
- app/presenters/decidim/debates/log/resource_presenter.rb
|
130
129
|
- app/presenters/decidim/debates/official_author_presenter.rb
|
131
130
|
- app/queries/decidim/debates/metrics/debate_followers_metric_measure.rb
|
132
131
|
- app/queries/decidim/debates/metrics/debate_participants_metric_measure.rb
|
@@ -272,7 +271,7 @@ metadata:
|
|
272
271
|
funding_uri: https://opencollective.com/decidim
|
273
272
|
homepage_uri: https://decidim.org
|
274
273
|
source_code_uri: https://github.com/decidim/decidim
|
275
|
-
post_install_message:
|
274
|
+
post_install_message:
|
276
275
|
rdoc_options: []
|
277
276
|
require_paths:
|
278
277
|
- lib
|
@@ -280,15 +279,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
280
279
|
requirements:
|
281
280
|
- - "~>"
|
282
281
|
- !ruby/object:Gem::Version
|
283
|
-
version: 3.
|
282
|
+
version: 3.2.0
|
284
283
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
285
284
|
requirements:
|
286
|
-
- - "
|
285
|
+
- - ">"
|
287
286
|
- !ruby/object:Gem::Version
|
288
|
-
version:
|
287
|
+
version: 1.3.1
|
289
288
|
requirements: []
|
290
|
-
rubygems_version: 3.
|
291
|
-
signing_key:
|
289
|
+
rubygems_version: 3.4.10
|
290
|
+
signing_key:
|
292
291
|
specification_version: 4
|
293
292
|
summary: Decidim debates module
|
294
293
|
test_files: []
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Debates
|
5
|
-
module Log
|
6
|
-
class ResourcePresenter < Decidim::Log::ResourcePresenter
|
7
|
-
private
|
8
|
-
|
9
|
-
# Private: Presents resource name.
|
10
|
-
#
|
11
|
-
# Returns an HTML-safe String.
|
12
|
-
def present_resource_name
|
13
|
-
Decidim::Debates::DebatePresenter.new(resource).title
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|