decidim-accountability 0.10.1 → 0.11.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/javascripts/decidim/accountability/accountability.js.es6 +2 -2
  4. data/app/assets/javascripts/decidim/accountability/admin/accountability_admin.js.es6 +11 -11
  5. data/app/commands/decidim/accountability/admin/create_result.rb +1 -1
  6. data/app/commands/decidim/accountability/admin/create_status.rb +1 -1
  7. data/app/commands/decidim/accountability/admin/destroy_result.rb +43 -0
  8. data/app/controllers/decidim/accountability/admin/application_controller.rb +2 -2
  9. data/app/controllers/decidim/accountability/admin/results_controller.rb +12 -10
  10. data/app/controllers/decidim/accountability/admin/statuses_controller.rb +1 -1
  11. data/app/controllers/decidim/accountability/admin/timeline_entries_controller.rb +1 -1
  12. data/app/controllers/decidim/accountability/application_controller.rb +2 -2
  13. data/app/controllers/decidim/accountability/result_widgets_controller.rb +1 -1
  14. data/app/controllers/decidim/accountability/results_controller.rb +3 -3
  15. data/app/controllers/decidim/accountability/versions_controller.rb +1 -1
  16. data/app/events/decidim/accountability/proposal_linked_event.rb +1 -1
  17. data/app/forms/decidim/accountability/admin/result_form.rb +5 -5
  18. data/app/helpers/decidim/accountability/application_helper.rb +4 -4
  19. data/app/helpers/decidim/accountability/breadcrumb_helper.rb +1 -1
  20. data/app/models/decidim/accountability/result.rb +10 -5
  21. data/app/models/decidim/accountability/status.rb +3 -3
  22. data/app/presenters/decidim/accountability/admin_log/result_presenter.rb +5 -4
  23. data/app/presenters/decidim/accountability/admin_log/value_types/parent_presenter.rb +29 -0
  24. data/app/services/decidim/accountability/result_search.rb +2 -2
  25. data/app/services/decidim/accountability/results_calculator.rb +4 -4
  26. data/app/views/decidim/accountability/admin/results/_form.html.erb +5 -6
  27. data/app/views/decidim/accountability/admin/results/_proposals.html.erb +2 -2
  28. data/app/views/decidim/accountability/admin/results/edit.html.erb +2 -2
  29. data/app/views/decidim/accountability/admin/results/index.html.erb +5 -5
  30. data/app/views/decidim/accountability/admin/results/new.html.erb +2 -2
  31. data/app/views/decidim/accountability/admin/shared/_subnav.html.erb +1 -1
  32. data/app/views/decidim/accountability/admin/statuses/edit.html.erb +2 -3
  33. data/app/views/decidim/accountability/admin/statuses/index.html.erb +3 -3
  34. data/app/views/decidim/accountability/admin/statuses/new.html.erb +2 -3
  35. data/app/views/decidim/accountability/admin/timeline_entries/edit.html.erb +2 -3
  36. data/app/views/decidim/accountability/admin/timeline_entries/index.html.erb +4 -4
  37. data/app/views/decidim/accountability/admin/timeline_entries/new.html.erb +2 -3
  38. data/app/views/decidim/accountability/results/_home_categories.html.erb +3 -3
  39. data/app/views/decidim/accountability/results/_home_header.html.erb +2 -2
  40. data/app/views/decidim/accountability/results/_nav_breadcrumb.html.erb +4 -4
  41. data/app/views/decidim/accountability/results/_results_leaf.html.erb +2 -2
  42. data/app/views/decidim/accountability/results/_results_parent.html.erb +2 -4
  43. data/app/views/decidim/accountability/results/_scope_filters.html.erb +1 -1
  44. data/app/views/decidim/accountability/results/_search.html.erb +2 -2
  45. data/app/views/decidim/accountability/results/_show_leaf.html.erb +2 -2
  46. data/app/views/decidim/accountability/results/_show_parent.html.erb +2 -2
  47. data/app/views/decidim/accountability/results/_stats_box.html.erb +1 -1
  48. data/app/views/decidim/accountability/versions/index.html.erb +1 -1
  49. data/app/views/decidim/participatory_processes/participatory_process_groups/_highlighted_results.html.erb +1 -1
  50. data/app/views/decidim/participatory_processes/participatory_process_groups/_result.html.erb +1 -1
  51. data/app/views/decidim/participatory_spaces/_highlighted_results.html.erb +2 -2
  52. data/app/views/decidim/participatory_spaces/_result.html.erb +1 -1
  53. data/config/locales/ca.yml +12 -8
  54. data/config/locales/en.yml +13 -9
  55. data/config/locales/es.yml +13 -9
  56. data/config/locales/eu.yml +13 -9
  57. data/config/locales/fi.yml +13 -9
  58. data/config/locales/fr.yml +14 -10
  59. data/config/locales/gl.yml +13 -9
  60. data/config/locales/it.yml +13 -9
  61. data/config/locales/nl.yml +22 -18
  62. data/config/locales/pl.yml +13 -9
  63. data/config/locales/pt-BR.yml +13 -9
  64. data/config/locales/pt.yml +13 -9
  65. data/config/locales/ru.yml +0 -1
  66. data/config/locales/sv.yml +13 -9
  67. data/config/locales/uk.yml +0 -1
  68. data/db/migrate/20180305133145_rename_features_to_components_at_accountability.rb +16 -0
  69. data/lib/decidim/accountability.rb +1 -1
  70. data/lib/decidim/accountability/{feature.rb → component.rb} +25 -25
  71. data/lib/decidim/accountability/engine.rb +4 -4
  72. data/lib/decidim/accountability/result_serializer.rb +3 -3
  73. data/lib/decidim/accountability/test/factories.rb +5 -5
  74. data/lib/decidim/accountability/version.rb +1 -1
  75. metadata +26 -23
@@ -25,8 +25,8 @@ module Decidim
25
25
 
26
26
  initializer "decidim_accountability.view_hooks" do
27
27
  Decidim.view_hooks.register(:participatory_space_highlighted_elements, priority: Decidim::ViewHooks::LOW_PRIORITY) do |view_context|
28
- published_features = Decidim::Feature.where(participatory_space: view_context.current_participatory_space).published
29
- results = Decidim::Accountability::Result.where(feature: published_features).order_randomly(rand * 2 - 1).limit(4)
28
+ published_components = Decidim::Component.where(participatory_space: view_context.current_participatory_space).published
29
+ results = Decidim::Accountability::Result.where(component: published_components).order_randomly(rand * 2 - 1).limit(4)
30
30
 
31
31
  next unless results.any?
32
32
 
@@ -41,8 +41,8 @@ module Decidim
41
41
 
42
42
  if defined? Decidim::ParticipatoryProcesses
43
43
  Decidim::ParticipatoryProcesses.view_hooks.register(:process_group_highlighted_elements, priority: Decidim::ViewHooks::LOW_PRIORITY) do |view_context|
44
- published_features = Decidim::Feature.where(participatory_space: view_context.participatory_processes).published
45
- results = Decidim::Accountability::Result.where(feature: published_features).order_randomly(rand * 2 - 1).limit(4)
44
+ published_components = Decidim::Component.where(participatory_space: view_context.participatory_processes).published
45
+ results = Decidim::Accountability::Result.where(component: published_components).order_randomly(rand * 2 - 1).limit(4)
46
46
 
47
47
  next unless results.any?
48
48
 
@@ -39,7 +39,7 @@ module Decidim
39
39
  progress: result.progress,
40
40
  created_at: result.created_at,
41
41
  url: url,
42
- feature: { id: feature.id },
42
+ component: { id: component.id },
43
43
  proposal_urls: proposals
44
44
  }
45
45
  end
@@ -48,8 +48,8 @@ module Decidim
48
48
 
49
49
  attr_reader :result
50
50
 
51
- def feature
52
- result.feature
51
+ def component
52
+ result.component
53
53
  end
54
54
 
55
55
  def proposals
@@ -7,8 +7,8 @@ require "decidim/core/test/factories"
7
7
  require "decidim/participatory_processes/test/factories"
8
8
 
9
9
  FactoryBot.define do
10
- factory :accountability_feature, parent: :feature do
11
- name { Decidim::Features::Namer.new(participatory_space.organization.available_locales, :accountability).i18n_name }
10
+ factory :accountability_component, parent: :component do
11
+ name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :accountability).i18n_name }
12
12
  manifest_name :accountability
13
13
  participatory_space { create(:participatory_process, :with_steps, organization: organization) }
14
14
  settings do
@@ -23,7 +23,7 @@ FactoryBot.define do
23
23
  end
24
24
 
25
25
  factory :status, class: "Decidim::Accountability::Status" do
26
- feature { create(:accountability_feature) }
26
+ component { create(:accountability_component) }
27
27
  sequence(:key) { |n| "status_#{n}" }
28
28
  name { Decidim::Faker::Localized.word }
29
29
  description { Decidim::Faker::Localized.sentence(3) }
@@ -31,12 +31,12 @@ FactoryBot.define do
31
31
  end
32
32
 
33
33
  factory :result, class: "Decidim::Accountability::Result" do
34
- feature { create(:accountability_feature) }
34
+ component { create(:accountability_component) }
35
35
  title { Decidim::Faker::Localized.sentence(3) }
36
36
  description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } }
37
37
  start_date { "12/7/2017" }
38
38
  end_date { "30/9/2017" }
39
- status { create :status, feature: feature }
39
+ status { create :status, component: component }
40
40
  progress { rand(1..100) }
41
41
  end
42
42
 
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds decidim-accountability version.
5
5
  module Accountability
6
6
  def self.version
7
- "0.10.1"
7
+ "0.11.0.pre1"
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-accountability
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0.pre1
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: 2018-04-17 00:00:00.000000000 Z
13
+ date: 2018-04-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-comments
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.10.1
21
+ version: 0.11.0.pre1
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.10.1
28
+ version: 0.11.0.pre1
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.10.1
35
+ version: 0.11.0.pre1
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.10.1
42
+ version: 0.11.0.pre1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: kaminari
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -74,98 +74,98 @@ dependencies:
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.10.1
77
+ version: 0.11.0.pre1
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.10.1
84
+ version: 0.11.0.pre1
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: decidim-assemblies
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - '='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.10.1
91
+ version: 0.11.0.pre1
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.10.1
98
+ version: 0.11.0.pre1
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: decidim-comments
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - '='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.10.1
105
+ version: 0.11.0.pre1
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.10.1
112
+ version: 0.11.0.pre1
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: decidim-dev
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - '='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.10.1
119
+ version: 0.11.0.pre1
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.10.1
126
+ version: 0.11.0.pre1
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: decidim-meetings
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - '='
132
132
  - !ruby/object:Gem::Version
133
- version: 0.10.1
133
+ version: 0.11.0.pre1
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.10.1
140
+ version: 0.11.0.pre1
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: decidim-participatory_processes
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - '='
146
146
  - !ruby/object:Gem::Version
147
- version: 0.10.1
147
+ version: 0.11.0.pre1
148
148
  type: :development
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - '='
153
153
  - !ruby/object:Gem::Version
154
- version: 0.10.1
154
+ version: 0.11.0.pre1
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: decidim-proposals
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - '='
160
160
  - !ruby/object:Gem::Version
161
- version: 0.10.1
161
+ version: 0.11.0.pre1
162
162
  type: :development
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - '='
167
167
  - !ruby/object:Gem::Version
168
- version: 0.10.1
168
+ version: 0.11.0.pre1
169
169
  description: An accountability component for decidim's participatory spaces.
170
170
  email:
171
171
  - josepjaume@gmail.com
@@ -192,6 +192,7 @@ files:
192
192
  - app/commands/decidim/accountability/admin/create_result.rb
193
193
  - app/commands/decidim/accountability/admin/create_status.rb
194
194
  - app/commands/decidim/accountability/admin/create_timeline_entry.rb
195
+ - app/commands/decidim/accountability/admin/destroy_result.rb
195
196
  - app/commands/decidim/accountability/admin/update_result.rb
196
197
  - app/commands/decidim/accountability/admin/update_status.rb
197
198
  - app/commands/decidim/accountability/admin/update_timeline_entry.rb
@@ -214,6 +215,7 @@ files:
214
215
  - app/models/decidim/accountability/status.rb
215
216
  - app/models/decidim/accountability/timeline_entry.rb
216
217
  - app/presenters/decidim/accountability/admin_log/result_presenter.rb
218
+ - app/presenters/decidim/accountability/admin_log/value_types/parent_presenter.rb
217
219
  - app/services/decidim/accountability/diff_renderer.rb
218
220
  - app/services/decidim/accountability/result_search.rb
219
221
  - app/services/decidim/accountability/result_stats_calculator.rb
@@ -279,11 +281,12 @@ files:
279
281
  - db/migrate/20170623094200_migrate_accountability_results_category.rb
280
282
  - db/migrate/20170623144902_add_children_counter_cache_to_results.rb
281
283
  - db/migrate/20170928073905_migrate_old_results.rb
284
+ - db/migrate/20180305133145_rename_features_to_components_at_accountability.rb
282
285
  - lib/decidim/accountability.rb
283
286
  - lib/decidim/accountability/admin.rb
284
287
  - lib/decidim/accountability/admin_engine.rb
288
+ - lib/decidim/accountability/component.rb
285
289
  - lib/decidim/accountability/engine.rb
286
- - lib/decidim/accountability/feature.rb
287
290
  - lib/decidim/accountability/result_serializer.rb
288
291
  - lib/decidim/accountability/test/factories.rb
289
292
  - lib/decidim/accountability/version.rb
@@ -303,9 +306,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
303
306
  version: '2.3'
304
307
  required_rubygems_version: !ruby/object:Gem::Requirement
305
308
  requirements:
306
- - - ">="
309
+ - - ">"
307
310
  - !ruby/object:Gem::Version
308
- version: '0'
311
+ version: 1.3.1
309
312
  requirements: []
310
313
  rubyforge_project:
311
314
  rubygems_version: 2.7.3