decidim-debates 0.23.3 → 0.24.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/admin/decidim_debates_manifest.js +1 -0
- data/app/assets/javascripts/decidim/debates/admin/debates.js.es6 +25 -0
- data/app/cells/decidim/debates/debate_activity_cell.rb +13 -5
- data/app/cells/decidim/debates/debate_m/open_date.erb +7 -0
- data/app/cells/decidim/debates/debate_m_cell.rb +1 -1
- data/app/cells/decidim/debates/reported_content/show.erb +4 -0
- data/app/cells/decidim/debates/reported_content_cell.rb +13 -0
- data/app/commands/decidim/debates/admin/create_debate.rb +3 -2
- data/app/commands/decidim/debates/admin/update_debate.rb +2 -1
- data/app/commands/decidim/debates/create_debate.rb +1 -0
- data/app/commands/decidim/debates/update_debate.rb +2 -1
- data/app/controllers/decidim/debates/debates_controller.rb +1 -5
- data/app/forms/decidim/debates/admin/close_debate_form.rb +1 -1
- data/app/forms/decidim/debates/admin/debate_form.rb +30 -2
- data/app/forms/decidim/debates/close_debate_form.rb +1 -1
- data/app/forms/decidim/debates/debate_form.rb +17 -0
- data/app/models/decidim/debates/debate.rb +11 -1
- data/app/permissions/decidim/debates/admin/permissions.rb +8 -1
- data/app/views/decidim/debates/admin/debates/_form.html.erb +15 -2
- data/app/views/decidim/debates/admin/debates/index.html.erb +10 -2
- data/app/views/decidim/debates/debates/_filters.html.erb +1 -1
- data/app/views/decidim/debates/debates/_filters_small_view.html.erb +1 -1
- data/app/views/decidim/debates/debates/_form.html.erb +6 -0
- data/app/views/decidim/debates/debates/show.html.erb +5 -21
- data/config/locales/ca.yml +18 -4
- data/config/locales/cs.yml +19 -5
- data/config/locales/de.yml +18 -4
- data/config/locales/en.yml +18 -4
- data/config/locales/es-MX.yml +18 -4
- data/config/locales/es-PY.yml +18 -4
- data/config/locales/es.yml +18 -4
- data/config/locales/fi-plain.yml +18 -4
- data/config/locales/fi.yml +18 -4
- data/config/locales/fr-CA.yml +18 -4
- data/config/locales/fr.yml +18 -4
- data/config/locales/gl.yml +11 -4
- data/config/locales/ja.yml +10 -4
- data/config/locales/nl.yml +18 -4
- data/config/locales/no.yml +10 -4
- data/config/locales/pl.yml +37 -6
- data/config/locales/ro-RO.yml +64 -0
- data/config/locales/sv.yml +28 -4
- data/config/locales/tr-TR.yml +17 -4
- data/config/locales/zh-CN.yml +10 -4
- data/db/migrate/20200930145546_add_scope_to_debates_debate.rb +7 -0
- data/db/migrate/20201126112752_archive_debates.rb +8 -0
- data/db/migrate/20210125101735_revert_archive_debates.rb +8 -0
- data/db/migrate/20210310120652_add_followable_counter_cache_to_debates.rb +16 -0
- data/lib/decidim/api/debate_type.rb +26 -0
- data/lib/decidim/api/debates_type.rb +26 -0
- data/lib/decidim/debates.rb +1 -0
- data/lib/decidim/debates/admin_engine.rb +4 -0
- data/lib/decidim/debates/api.rb +8 -0
- data/lib/decidim/debates/component.rb +22 -10
- data/lib/decidim/debates/test/factories.rb +1 -1
- data/lib/decidim/debates/version.rb +1 -1
- metadata +24 -14
- data/app/types/decidim/debates/debate_type.rb +0 -28
- data/app/types/decidim/debates/debates_type.rb +0 -32
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
def generate_localized_debate_title
|
4
|
-
Decidim::Faker::Localized.localized { "<script>alert(\"TITLE\");</script>
|
4
|
+
Decidim::Faker::Localized.localized { "<script>alert(\"TITLE\");</script> #{generate(:title)}" }
|
5
5
|
end
|
6
6
|
|
7
7
|
FactoryBot.define do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-debates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-
|
14
|
+
date: 2021-04-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: decidim-comments
|
@@ -19,28 +19,28 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
22
|
+
version: 0.24.1
|
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.24.1
|
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.24.1
|
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.24.1
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: kaminari
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,28 +81,28 @@ dependencies:
|
|
81
81
|
requirements:
|
82
82
|
- - '='
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.
|
84
|
+
version: 0.24.1
|
85
85
|
type: :development
|
86
86
|
prerelease: false
|
87
87
|
version_requirements: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
89
|
- - '='
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: 0.
|
91
|
+
version: 0.24.1
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: decidim-dev
|
94
94
|
requirement: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - '='
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 0.
|
98
|
+
version: 0.24.1
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
101
|
version_requirements: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
103
|
- - '='
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.
|
105
|
+
version: 0.24.1
|
106
106
|
description: A debates component for decidim's participatory spaces.
|
107
107
|
email:
|
108
108
|
- josepjaume@gmail.com
|
@@ -115,17 +115,22 @@ extra_rdoc_files: []
|
|
115
115
|
files:
|
116
116
|
- README.md
|
117
117
|
- Rakefile
|
118
|
+
- app/assets/config/admin/decidim_debates_manifest.js
|
118
119
|
- app/assets/config/decidim_debates_manifest.js
|
119
120
|
- app/assets/images/decidim/debates/icon.svg
|
120
121
|
- app/assets/images/decidim/gamification/badges/commented_debates.svg
|
122
|
+
- app/assets/javascripts/decidim/debates/admin/debates.js.es6
|
121
123
|
- app/cells/decidim/debates/debate_activity_cell.rb
|
122
124
|
- app/cells/decidim/debates/debate_cell.rb
|
123
125
|
- app/cells/decidim/debates/debate_m/data.erb
|
124
126
|
- app/cells/decidim/debates/debate_m/footer.erb
|
125
127
|
- app/cells/decidim/debates/debate_m/multiple_dates.erb
|
128
|
+
- app/cells/decidim/debates/debate_m/open_date.erb
|
126
129
|
- app/cells/decidim/debates/debate_m/single_date.erb
|
127
130
|
- app/cells/decidim/debates/debate_m/tags.erb
|
128
131
|
- app/cells/decidim/debates/debate_m_cell.rb
|
132
|
+
- app/cells/decidim/debates/reported_content/show.erb
|
133
|
+
- app/cells/decidim/debates/reported_content_cell.rb
|
129
134
|
- app/commands/decidim/debates/admin/close_debate.rb
|
130
135
|
- app/commands/decidim/debates/admin/create_debate.rb
|
131
136
|
- app/commands/decidim/debates/admin/update_debate.rb
|
@@ -167,8 +172,6 @@ files:
|
|
167
172
|
- app/serializers/decidim/debates/data_portability_debate_serializer.rb
|
168
173
|
- app/services/decidim/debates/debate_search.rb
|
169
174
|
- app/services/decidim/debates/diff_renderer.rb
|
170
|
-
- app/types/decidim/debates/debate_type.rb
|
171
|
-
- app/types/decidim/debates/debates_type.rb
|
172
175
|
- app/views/decidim/debates/admin/debate_closes/edit.html.erb
|
173
176
|
- app/views/decidim/debates/admin/debates/_form.html.erb
|
174
177
|
- app/views/decidim/debates/admin/debates/edit.html.erb
|
@@ -271,9 +274,16 @@ files:
|
|
271
274
|
- db/migrate/20200716143929_add_endorsable_to_debates.rb
|
272
275
|
- db/migrate/20200827154116_add_commentable_counter_cache_to_debates.rb
|
273
276
|
- db/migrate/20200902133452_add_cached_comment_metadata_to_debates.rb
|
277
|
+
- db/migrate/20200930145546_add_scope_to_debates_debate.rb
|
278
|
+
- db/migrate/20201126112752_archive_debates.rb
|
279
|
+
- db/migrate/20210125101735_revert_archive_debates.rb
|
280
|
+
- db/migrate/20210310120652_add_followable_counter_cache_to_debates.rb
|
281
|
+
- lib/decidim/api/debate_type.rb
|
282
|
+
- lib/decidim/api/debates_type.rb
|
274
283
|
- lib/decidim/debates.rb
|
275
284
|
- lib/decidim/debates/admin.rb
|
276
285
|
- lib/decidim/debates/admin_engine.rb
|
286
|
+
- lib/decidim/debates/api.rb
|
277
287
|
- lib/decidim/debates/component.rb
|
278
288
|
- lib/decidim/debates/engine.rb
|
279
289
|
- lib/decidim/debates/test/factories.rb
|
@@ -290,14 +300,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
290
300
|
requirements:
|
291
301
|
- - ">="
|
292
302
|
- !ruby/object:Gem::Version
|
293
|
-
version: '2.
|
303
|
+
version: '2.7'
|
294
304
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
295
305
|
requirements:
|
296
306
|
- - ">="
|
297
307
|
- !ruby/object:Gem::Version
|
298
308
|
version: '0'
|
299
309
|
requirements: []
|
300
|
-
rubygems_version: 3.
|
310
|
+
rubygems_version: 3.1.2
|
301
311
|
signing_key:
|
302
312
|
specification_version: 4
|
303
313
|
summary: Decidim debates module
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Debates
|
5
|
-
DebateType = GraphQL::ObjectType.define do
|
6
|
-
interfaces [
|
7
|
-
-> { Decidim::Core::CategorizableInterface },
|
8
|
-
-> { Decidim::Comments::CommentableInterface },
|
9
|
-
-> { Decidim::Core::AuthorableInterface }
|
10
|
-
]
|
11
|
-
|
12
|
-
name "Debate"
|
13
|
-
description "A debate"
|
14
|
-
|
15
|
-
field :id, !types.ID, "The internal ID for this debate"
|
16
|
-
field :title, Decidim::Core::TranslatedFieldType, "The title for this debate"
|
17
|
-
field :description, Decidim::Core::TranslatedFieldType, "The description for this debate"
|
18
|
-
field :instructions, Decidim::Core::TranslatedFieldType, "The instructions for this debate"
|
19
|
-
field :startTime, Decidim::Core::DateTimeType, "The start time for this debate", property: :start_time
|
20
|
-
field :endTime, Decidim::Core::DateTimeType, "The end time for this debate", property: :end_time
|
21
|
-
field :image, types.String, "The image of this debate"
|
22
|
-
field :createdAt, Decidim::Core::DateTimeType, "When this debate was created", property: :created_at
|
23
|
-
field :updatedAt, Decidim::Core::DateTimeType, "When this debate was updated", property: :updated_at
|
24
|
-
field :informationUpdates, Decidim::Core::TranslatedFieldType, "The information updates for this debate", property: :information_updates
|
25
|
-
field :reference, types.String, "The reference for this debate"
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Debates
|
5
|
-
DebatesType = GraphQL::ObjectType.define do
|
6
|
-
interfaces [-> { Decidim::Core::ComponentInterface }]
|
7
|
-
|
8
|
-
name "Debates"
|
9
|
-
description "A debates component of a participatory space."
|
10
|
-
|
11
|
-
connection :debates, DebateType.connection_type do
|
12
|
-
resolve ->(component, _args, _ctx) {
|
13
|
-
DebatesTypeHelper.base_scope(component).includes(:component)
|
14
|
-
}
|
15
|
-
end
|
16
|
-
|
17
|
-
field(:debate, DebateType) do
|
18
|
-
argument :id, !types.ID
|
19
|
-
|
20
|
-
resolve ->(component, args, _ctx) {
|
21
|
-
DebatesTypeHelper.base_scope(component).find_by(id: args[:id])
|
22
|
-
}
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
module DebatesTypeHelper
|
27
|
-
def self.base_scope(component)
|
28
|
-
Debate.where(component: component)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|