decidim-debates 0.19.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/decidim/gamification/badges/commented_debates.svg +1 -78
  3. data/app/cells/decidim/debates/debate_m/data.erb +1 -1
  4. data/app/cells/decidim/debates/debate_m/footer.erb +1 -1
  5. data/app/cells/decidim/debates/debate_m/multiple_dates.erb +1 -1
  6. data/app/cells/decidim/debates/debate_m_cell.rb +4 -0
  7. data/app/events/decidim/debates/create_debate_event.rb +0 -2
  8. data/app/helpers/decidim/debates/application_helper.rb +19 -0
  9. data/app/models/decidim/debates/debate.rb +10 -0
  10. data/app/presenters/decidim/debates/debate_presenter.rb +6 -0
  11. data/app/queries/decidim/debates/metrics/debates_metric_manage.rb +2 -8
  12. data/app/types/decidim/debates/debate_type.rb +28 -0
  13. data/app/types/decidim/debates/debates_type.rb +32 -0
  14. data/app/views/decidim/debates/admin/debates/_form.html.erb +1 -1
  15. data/app/views/decidim/debates/debates/_filters.html.erb +17 -5
  16. data/app/views/decidim/debates/debates/index.html.erb +5 -6
  17. data/app/views/decidim/debates/debates/new.html.erb +3 -3
  18. data/app/views/decidim/debates/debates/show.html.erb +7 -1
  19. data/config/locales/bg-BG.yml +7 -0
  20. data/config/locales/ca.yml +3 -0
  21. data/config/locales/cs.yml +42 -39
  22. data/config/locales/da-DK.yml +1 -0
  23. data/config/locales/de.yml +3 -0
  24. data/config/locales/el-GR.yml +1 -0
  25. data/config/locales/el.yml +154 -0
  26. data/config/locales/en.yml +3 -0
  27. data/config/locales/es-MX.yml +3 -0
  28. data/config/locales/es-PY.yml +3 -0
  29. data/config/locales/es.yml +3 -0
  30. data/config/locales/et-EE.yml +1 -0
  31. data/config/locales/fi-plain.yml +3 -0
  32. data/config/locales/fi.yml +8 -5
  33. data/config/locales/fr-CA.yml +154 -0
  34. data/config/locales/fr.yml +3 -0
  35. data/config/locales/ga-IE.yml +1 -0
  36. data/config/locales/hr-HR.yml +1 -0
  37. data/config/locales/hu.yml +7 -5
  38. data/config/locales/is-IS.yml +101 -0
  39. data/config/locales/it.yml +12 -9
  40. data/config/locales/ja-JP.yml +152 -0
  41. data/config/locales/lt-LT.yml +1 -0
  42. data/config/locales/lv-LV.yml +135 -0
  43. data/config/locales/mt-MT.yml +1 -0
  44. data/config/locales/nl.yml +5 -2
  45. data/config/locales/no.yml +149 -0
  46. data/config/locales/pl.yml +43 -40
  47. data/config/locales/pt-BR.yml +1 -3
  48. data/config/locales/pt.yml +38 -35
  49. data/config/locales/ro-RO.yml +156 -0
  50. data/config/locales/sk-SK.yml +156 -0
  51. data/config/locales/sk.yml +156 -0
  52. data/config/locales/sl.yml +10 -0
  53. data/config/locales/sr-CS.yml +6 -0
  54. data/config/locales/sv.yml +3 -0
  55. data/db/migrate/20200320105918_index_foreign_keys_in_decidim_debates_debates.rb +7 -0
  56. data/lib/decidim/debates/component.rb +7 -0
  57. data/lib/decidim/debates/version.rb +1 -1
  58. metadata +40 -13
@@ -0,0 +1,10 @@
1
+ sl:
2
+ activemodel:
3
+ attributes:
4
+ debate:
5
+ category_id: Kategorija
6
+ decidim:
7
+ debates:
8
+ debates:
9
+ new:
10
+ select_a_category: Prosim izberi kategorijo
@@ -0,0 +1,6 @@
1
+ sr:
2
+ decidim:
3
+ debates:
4
+ debates:
5
+ show:
6
+ back: Nazad na listu
@@ -96,6 +96,9 @@ sv:
96
96
  create: Skapa
97
97
  select_a_category: Välj en kategori
98
98
  title: Ny debatt
99
+ show:
100
+ back: Tillbaka till listan
101
+ date: Datum
99
102
  last_activity:
100
103
  new_debate_at_html: "<span>Ny debatt i %{link}</span>"
101
104
  models:
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class IndexForeignKeysInDecidimDebatesDebates < ActiveRecord::Migration[5.2]
4
+ def change
5
+ add_index :decidim_debates_debates, :decidim_user_group_id
6
+ end
7
+ end
@@ -8,6 +8,7 @@ Decidim.register_component(:debates) do |component|
8
8
  component.icon = "decidim/debates/icon.svg"
9
9
  component.permissions_class_name = "Decidim::Debates::Permissions"
10
10
 
11
+ component.query_type = "Decidim::Debates::DebatesType"
11
12
  component.data_portable_entities = ["Decidim::Debates::Debate"]
12
13
 
13
14
  component.newsletter_participant_entities = ["Decidim::Debates::Debate"]
@@ -31,9 +32,15 @@ Decidim.register_component(:debates) do |component|
31
32
  Decidim::Debates::Debate.where(component: components).not_hidden.count
32
33
  end
33
34
 
35
+ component.register_stat :followers_count, tag: :followers, priority: Decidim::StatsRegistry::LOW_PRIORITY do |components, _start_at, _end_at|
36
+ debates_ids = Decidim::Debates::Debate.where(component: components).not_hidden.pluck(:id)
37
+ Decidim::Follow.where(decidim_followable_type: "Decidim::Debates::Debate", decidim_followable_id: debates_ids).count
38
+ end
39
+
34
40
  component.register_resource(:debate) do |resource|
35
41
  resource.model_class_name = "Decidim::Debates::Debate"
36
42
  resource.card = "decidim/debates/debate"
43
+ resource.searchable = true
37
44
  end
38
45
 
39
46
  component.actions = %w(create)
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-debates version.
5
5
  module Debates
6
6
  def self.version
7
- "0.19.0"
7
+ "0.22.0"
8
8
  end
9
9
  end
10
10
  end
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.19.0
4
+ version: 0.22.0
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: 2019-10-21 00:00:00.000000000 Z
14
+ date: 2020-09-01 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: decidim-comments
@@ -19,42 +19,48 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.19.0
22
+ version: 0.22.0
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.19.0
29
+ version: 0.22.0
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.19.0
36
+ version: 0.22.0
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.19.0
43
+ version: 0.22.0
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: kaminari
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
48
  - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: '1.1'
50
+ version: '1.2'
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 1.2.1
51
54
  type: :runtime
52
55
  prerelease: false
53
56
  version_requirements: !ruby/object:Gem::Requirement
54
57
  requirements:
55
58
  - - "~>"
56
59
  - !ruby/object:Gem::Version
57
- version: '1.1'
60
+ version: '1.2'
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: 1.2.1
58
64
  - !ruby/object:Gem::Dependency
59
65
  name: searchlight
60
66
  requirement: !ruby/object:Gem::Requirement
@@ -75,28 +81,28 @@ dependencies:
75
81
  requirements:
76
82
  - - '='
77
83
  - !ruby/object:Gem::Version
78
- version: 0.19.0
84
+ version: 0.22.0
79
85
  type: :development
80
86
  prerelease: false
81
87
  version_requirements: !ruby/object:Gem::Requirement
82
88
  requirements:
83
89
  - - '='
84
90
  - !ruby/object:Gem::Version
85
- version: 0.19.0
91
+ version: 0.22.0
86
92
  - !ruby/object:Gem::Dependency
87
93
  name: decidim-dev
88
94
  requirement: !ruby/object:Gem::Requirement
89
95
  requirements:
90
96
  - - '='
91
97
  - !ruby/object:Gem::Version
92
- version: 0.19.0
98
+ version: 0.22.0
93
99
  type: :development
94
100
  prerelease: false
95
101
  version_requirements: !ruby/object:Gem::Requirement
96
102
  requirements:
97
103
  - - '='
98
104
  - !ruby/object:Gem::Version
99
- version: 0.19.0
105
+ version: 0.22.0
100
106
  description: A debates component for decidim's participatory spaces.
101
107
  email:
102
108
  - josepjaume@gmail.com
@@ -147,6 +153,8 @@ files:
147
153
  - app/queries/decidim/debates/metrics/debates_metric_manage.rb
148
154
  - app/serializers/decidim/debates/data_portability_debate_serializer.rb
149
155
  - app/services/decidim/debates/debate_search.rb
156
+ - app/types/decidim/debates/debate_type.rb
157
+ - app/types/decidim/debates/debates_type.rb
150
158
  - app/views/decidim/debates/admin/debates/_form.html.erb
151
159
  - app/views/decidim/debates/admin/debates/edit.html.erb
152
160
  - app/views/decidim/debates/admin/debates/index.html.erb
@@ -162,30 +170,48 @@ files:
162
170
  - app/views/decidim/debates/debates/show.html.erb
163
171
  - config/locales/ar-SA.yml
164
172
  - config/locales/ar.yml
173
+ - config/locales/bg-BG.yml
165
174
  - config/locales/ca.yml
166
175
  - config/locales/cs-CZ.yml
167
176
  - config/locales/cs.yml
177
+ - config/locales/da-DK.yml
168
178
  - config/locales/de.yml
179
+ - config/locales/el-GR.yml
180
+ - config/locales/el.yml
169
181
  - config/locales/en.yml
170
182
  - config/locales/eo-UY.yml
171
183
  - config/locales/es-MX.yml
172
184
  - config/locales/es-PY.yml
173
185
  - config/locales/es.yml
186
+ - config/locales/et-EE.yml
174
187
  - config/locales/eu.yml
175
188
  - config/locales/fi-pl.yml
176
189
  - config/locales/fi-plain.yml
177
190
  - config/locales/fi.yml
191
+ - config/locales/fr-CA.yml
178
192
  - config/locales/fr.yml
193
+ - config/locales/ga-IE.yml
179
194
  - config/locales/gl.yml
195
+ - config/locales/hr-HR.yml
180
196
  - config/locales/hu.yml
181
197
  - config/locales/id-ID.yml
198
+ - config/locales/is-IS.yml
182
199
  - config/locales/it.yml
200
+ - config/locales/ja-JP.yml
201
+ - config/locales/lt-LT.yml
202
+ - config/locales/lv-LV.yml
203
+ - config/locales/mt-MT.yml
183
204
  - config/locales/nl.yml
184
205
  - config/locales/no.yml
185
206
  - config/locales/pl.yml
186
207
  - config/locales/pt-BR.yml
187
208
  - config/locales/pt.yml
209
+ - config/locales/ro-RO.yml
188
210
  - config/locales/ru.yml
211
+ - config/locales/sk-SK.yml
212
+ - config/locales/sk.yml
213
+ - config/locales/sl.yml
214
+ - config/locales/sr-CS.yml
189
215
  - config/locales/sv.yml
190
216
  - config/locales/tr-TR.yml
191
217
  - config/locales/uk.yml
@@ -198,6 +224,7 @@ files:
198
224
  - db/migrate/20180305133556_rename_features_to_components_at_debates.rb
199
225
  - db/migrate/20181003081235_fix_user_groups_ids_on_debates.rb
200
226
  - db/migrate/20181016132850_add_organization_as_author_to_debates.rb
227
+ - db/migrate/20200320105918_index_foreign_keys_in_decidim_debates_debates.rb
201
228
  - lib/decidim/debates.rb
202
229
  - lib/decidim/debates/admin.rb
203
230
  - lib/decidim/debates/admin_engine.rb
@@ -224,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
251
  - !ruby/object:Gem::Version
225
252
  version: '0'
226
253
  requirements: []
227
- rubygems_version: 3.0.3
254
+ rubygems_version: 3.1.2
228
255
  signing_key:
229
256
  specification_version: 4
230
257
  summary: Decidim debates module