decidim-accountability 0.26.4 → 0.27.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/accountability/highlighted_results_for_component_cell.rb +13 -1
  3. data/app/commands/decidim/accountability/admin/create_imported_result.rb +1 -1
  4. data/app/commands/decidim/accountability/admin/create_result.rb +1 -1
  5. data/app/commands/decidim/accountability/admin/create_status.rb +6 -3
  6. data/app/commands/decidim/accountability/admin/create_timeline_entry.rb +11 -7
  7. data/app/commands/decidim/accountability/admin/destroy_result.rb +1 -1
  8. data/app/commands/decidim/accountability/admin/update_imported_result.rb +1 -1
  9. data/app/commands/decidim/accountability/admin/update_result.rb +1 -1
  10. data/app/commands/decidim/accountability/admin/update_status.rb +6 -3
  11. data/app/commands/decidim/accountability/admin/update_timeline_entry.rb +9 -5
  12. data/app/controllers/decidim/accountability/admin/statuses_controller.rb +5 -3
  13. data/app/controllers/decidim/accountability/admin/timeline_entries_controller.rb +5 -3
  14. data/app/controllers/decidim/accountability/results_controller.rb +12 -12
  15. data/app/forms/decidim/accountability/admin/result_form.rb +2 -2
  16. data/app/forms/decidim/accountability/admin/timeline_entry_form.rb +2 -1
  17. data/app/helpers/decidim/accountability/breadcrumb_helper.rb +2 -2
  18. data/app/models/decidim/accountability/result.rb +9 -5
  19. data/app/models/decidim/accountability/status.rb +6 -2
  20. data/app/models/decidim/accountability/timeline_entry.rb +6 -0
  21. data/app/permissions/decidim/accountability/admin/permissions.rb +1 -7
  22. data/app/presenters/decidim/accountability/admin_log/status_presenter.rb +38 -0
  23. data/app/presenters/decidim/accountability/admin_log/timeline_entry_presenter.rb +37 -0
  24. data/app/services/decidim/accountability/results_calculator.rb +10 -6
  25. data/app/views/decidim/accountability/admin/import_results/new.html.erb +3 -7
  26. data/app/views/decidim/accountability/admin/results/index.html.erb +1 -1
  27. data/app/views/decidim/accountability/admin/timeline_entries/_form.html.erb +5 -1
  28. data/app/views/decidim/accountability/admin/timeline_entries/index.html.erb +2 -2
  29. data/app/views/decidim/accountability/results/_home_categories.html.erb +2 -2
  30. data/app/views/decidim/accountability/results/_nav_breadcrumb.html.erb +3 -3
  31. data/app/views/decidim/accountability/results/_results_leaf.html.erb +3 -3
  32. data/app/views/decidim/accountability/results/_results_parent.html.erb +1 -1
  33. data/app/views/decidim/accountability/results/_scope_filters.html.erb +3 -3
  34. data/app/views/decidim/accountability/results/_search.html.erb +1 -1
  35. data/app/views/decidim/accountability/results/_show_leaf.html.erb +2 -2
  36. data/app/views/decidim/accountability/results/_timeline.html.erb +8 -2
  37. data/app/views/decidim/accountability/results/home.html.erb +3 -1
  38. data/app/views/decidim/accountability/versions/show.html.erb +3 -1
  39. data/config/locales/am-ET.yml +1 -0
  40. data/config/locales/ar.yml +5 -1
  41. data/config/locales/bg.yml +3 -1
  42. data/config/locales/ca.yml +13 -23
  43. data/config/locales/cs.yml +13 -2
  44. data/config/locales/da.yml +3 -1
  45. data/config/locales/de.yml +13 -1
  46. data/config/locales/el.yml +3 -1
  47. data/config/locales/en.yml +12 -23
  48. data/config/locales/eo.yml +1 -0
  49. data/config/locales/es-MX.yml +13 -23
  50. data/config/locales/es-PY.yml +13 -23
  51. data/config/locales/es.yml +13 -23
  52. data/config/locales/et.yml +1 -0
  53. data/config/locales/eu.yml +3 -1
  54. data/config/locales/fi-plain.yml +13 -23
  55. data/config/locales/fi.yml +13 -23
  56. data/config/locales/fr-CA.yml +13 -23
  57. data/config/locales/fr.yml +13 -23
  58. data/config/locales/ga-IE.yml +2 -0
  59. data/config/locales/gl.yml +3 -1
  60. data/config/locales/hr.yml +1 -0
  61. data/config/locales/hu.yml +12 -10
  62. data/config/locales/id-ID.yml +1 -1
  63. data/config/locales/is-IS.yml +3 -2
  64. data/config/locales/it.yml +3 -1
  65. data/config/locales/ja.yml +13 -1
  66. data/config/locales/ko.yml +1 -0
  67. data/config/locales/lb.yml +3 -1
  68. data/config/locales/lt.yml +13 -1
  69. data/config/locales/lv.yml +3 -1
  70. data/config/locales/mt.yml +1 -0
  71. data/config/locales/nl.yml +2 -1
  72. data/config/locales/no.yml +5 -3
  73. data/config/locales/om-ET.yml +1 -0
  74. data/config/locales/pl.yml +13 -2
  75. data/config/locales/pt-BR.yml +4 -5
  76. data/config/locales/pt.yml +3 -1
  77. data/config/locales/ro-RO.yml +3 -1
  78. data/config/locales/ru.yml +1 -1
  79. data/config/locales/si-LK.yml +2 -1
  80. data/config/locales/sk.yml +2 -1
  81. data/config/locales/sl.yml +2 -1
  82. data/config/locales/so-SO.yml +1 -0
  83. data/config/locales/sr-CS.yml +1 -1
  84. data/config/locales/sv.yml +5 -1
  85. data/config/locales/sw-KE.yml +1 -0
  86. data/config/locales/ti-ER.yml +1 -0
  87. data/config/locales/tr-TR.yml +3 -1
  88. data/config/locales/uk.yml +1 -1
  89. data/config/locales/val-ES.yml +1 -0
  90. data/config/locales/vi.yml +1 -0
  91. data/config/locales/zh-CN.yml +2 -1
  92. data/config/locales/zh-TW.yml +1 -0
  93. data/db/migrate/20220331150008_add_title_to_timeline_entries.rb +7 -0
  94. data/db/migrate/20220331150155_move_legacy_description_to_title_of_timeline_entries.rb +13 -0
  95. data/lib/decidim/accountability/component.rb +2 -1
  96. data/lib/decidim/accountability/test/factories.rb +1 -0
  97. data/lib/decidim/accountability/version.rb +1 -1
  98. data/lib/decidim/api/timeline_entry_type.rb +1 -0
  99. metadata +28 -28
  100. data/app/services/decidim/accountability/result_search.rb +0 -48
  101. data/config/locales/gn-PY.yml +0 -1
  102. data/config/locales/lo-LA.yml +0 -1
  103. data/config/locales/oc-FR.yml +0 -1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-accountability
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.4
4
+ version: 0.27.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-11-15 00:00:00.000000000 Z
13
+ date: 2022-06-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-comments
@@ -18,126 +18,126 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.26.4
21
+ version: 0.27.0.rc1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.26.4
28
+ version: 0.27.0.rc1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-core
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.26.4
35
+ version: 0.27.0.rc1
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.26.4
42
+ version: 0.27.0.rc1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: decidim-admin
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.26.4
49
+ version: 0.27.0.rc1
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.26.4
56
+ version: 0.27.0.rc1
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: decidim-assemblies
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.26.4
63
+ version: 0.27.0.rc1
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.26.4
70
+ version: 0.27.0.rc1
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: decidim-comments
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.26.4
77
+ version: 0.27.0.rc1
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.26.4
84
+ version: 0.27.0.rc1
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: decidim-dev
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - '='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.26.4
91
+ version: 0.27.0.rc1
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - '='
97
97
  - !ruby/object:Gem::Version
98
- version: 0.26.4
98
+ version: 0.27.0.rc1
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: decidim-meetings
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - '='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.26.4
105
+ version: 0.27.0.rc1
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - '='
111
111
  - !ruby/object:Gem::Version
112
- version: 0.26.4
112
+ version: 0.27.0.rc1
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: decidim-participatory_processes
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - '='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.26.4
119
+ version: 0.27.0.rc1
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - '='
125
125
  - !ruby/object:Gem::Version
126
- version: 0.26.4
126
+ version: 0.27.0.rc1
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: decidim-proposals
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - '='
132
132
  - !ruby/object:Gem::Version
133
- version: 0.26.4
133
+ version: 0.27.0.rc1
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - '='
139
139
  - !ruby/object:Gem::Version
140
- version: 0.26.4
140
+ version: 0.27.0.rc1
141
141
  description: An accountability component for decidim's participatory spaces.
142
142
  email:
143
143
  - josepjaume@gmail.com
@@ -212,10 +212,11 @@ files:
212
212
  - app/permissions/decidim/accountability/admin/permissions.rb
213
213
  - app/permissions/decidim/accountability/permissions.rb
214
214
  - app/presenters/decidim/accountability/admin_log/result_presenter.rb
215
+ - app/presenters/decidim/accountability/admin_log/status_presenter.rb
216
+ - app/presenters/decidim/accountability/admin_log/timeline_entry_presenter.rb
215
217
  - app/presenters/decidim/accountability/admin_log/value_types/parent_presenter.rb
216
218
  - app/queries/decidim/accountability/metrics/results_metric_manage.rb
217
219
  - app/services/decidim/accountability/diff_renderer.rb
218
- - app/services/decidim/accountability/result_search.rb
219
220
  - app/services/decidim/accountability/result_stats_calculator.rb
220
221
  - app/services/decidim/accountability/results_calculator.rb
221
222
  - app/services/decidim/accountability/results_csv_importer.rb
@@ -287,7 +288,6 @@ files:
287
288
  - config/locales/fr.yml
288
289
  - config/locales/ga-IE.yml
289
290
  - config/locales/gl.yml
290
- - config/locales/gn-PY.yml
291
291
  - config/locales/hr-HR.yml
292
292
  - config/locales/hr.yml
293
293
  - config/locales/hu.yml
@@ -300,7 +300,6 @@ files:
300
300
  - config/locales/ko.yml
301
301
  - config/locales/lb-LU.yml
302
302
  - config/locales/lb.yml
303
- - config/locales/lo-LA.yml
304
303
  - config/locales/lt-LT.yml
305
304
  - config/locales/lt.yml
306
305
  - config/locales/lv.yml
@@ -308,7 +307,6 @@ files:
308
307
  - config/locales/mt.yml
309
308
  - config/locales/nl.yml
310
309
  - config/locales/no.yml
311
- - config/locales/oc-FR.yml
312
310
  - config/locales/om-ET.yml
313
311
  - config/locales/pl.yml
314
312
  - config/locales/pt-BR.yml
@@ -343,6 +341,8 @@ files:
343
341
  - db/migrate/20180508170647_add_external_id_to_results.rb
344
342
  - db/migrate/20200320105903_index_foreign_keys_in_decidim_accountability_results.rb
345
343
  - db/migrate/20200827154103_add_commentable_counter_cache_to_results.rb
344
+ - db/migrate/20220331150008_add_title_to_timeline_entries.rb
345
+ - db/migrate/20220331150155_move_legacy_description_to_title_of_timeline_entries.rb
346
346
  - lib/decidim/accountability.rb
347
347
  - lib/decidim/accountability/admin.rb
348
348
  - lib/decidim/accountability/admin_engine.rb
@@ -368,14 +368,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
368
368
  requirements:
369
369
  - - ">="
370
370
  - !ruby/object:Gem::Version
371
- version: '2.7'
371
+ version: '3.0'
372
372
  required_rubygems_version: !ruby/object:Gem::Requirement
373
373
  requirements:
374
- - - ">="
374
+ - - ">"
375
375
  - !ruby/object:Gem::Version
376
- version: '0'
376
+ version: 1.3.1
377
377
  requirements: []
378
- rubygems_version: 3.1.6
378
+ rubygems_version: 3.2.22
379
379
  signing_key:
380
380
  specification_version: 4
381
381
  summary: Decidim accountability module
@@ -1,48 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Accountability
5
- # This class handles search and filtering of results. Needs a
6
- # `current_component` param with a `Decidim::Component` in order to
7
- # find the results.
8
- class ResultSearch < ResourceSearch
9
- text_search_fields :title, :description
10
-
11
- # Public: Initializes the service.
12
- #
13
- # options - A hash of options to modify the search. These options will be
14
- # converted to methods by SearchLight so they can be used on filter
15
- # methods. (Default {})
16
- # * component - A Decidim::Component to get the results from.
17
- # * organization - A Decidim::Organization object.
18
- # * parent_id - The parent ID of the result. The value is forced to false to force
19
- # the filter execution when the value is nil
20
- # * deep_search - Whether to perform the search on all children levels or just the
21
- # first one. True by default.
22
- def initialize(options = {})
23
- options = options.dup
24
- options[:deep_search] = true if options[:deep_search].nil?
25
- options[:parent_id] = "root" if options[:parent_id].nil?
26
- super(Result.all, options)
27
- end
28
-
29
- # Handle parent_id filter
30
- def search_parent_id
31
- parent_id = options[:parent_id]
32
- parent_id = nil if parent_id == "root"
33
-
34
- if options[:deep_search]
35
- query.where(parent_id: [parent_id] + children_ids(parent_id))
36
- else
37
- query.where(parent_id: parent_id)
38
- end
39
- end
40
-
41
- private
42
-
43
- def children_ids(parent_id)
44
- Result.where(parent_id: parent_id).pluck(:id)
45
- end
46
- end
47
- end
48
- end
@@ -1 +0,0 @@
1
- gn:
@@ -1 +0,0 @@
1
- lo:
@@ -1 +0,0 @@
1
- oc: