decidim 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim might be problematic. Click here for more details.

Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1626 -0
  3. data/Gemfile.lock +82 -82
  4. data/decidim-admin/app/assets/stylesheets/decidim/admin/_variables.scss +2 -0
  5. data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_cards.scss +6 -0
  6. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_typography.scss +4 -0
  7. data/decidim-admin/app/commands/decidim/admin/create_participatory_process_admin.rb +3 -5
  8. data/decidim-admin/app/constraints/decidim/admin/organization_dashboard_constraint.rb +1 -1
  9. data/decidim-admin/app/controllers/decidim/admin/application_controller.rb +1 -1
  10. data/decidim-admin/app/controllers/decidim/admin/categories_controller.rb +9 -9
  11. data/decidim-admin/app/controllers/decidim/admin/concerns/participatory_process_admin.rb +1 -8
  12. data/decidim-admin/app/controllers/decidim/admin/exports_controller.rb +2 -2
  13. data/decidim-admin/app/controllers/decidim/admin/feature_permissions_controller.rb +2 -2
  14. data/decidim-admin/app/controllers/decidim/admin/features/base_controller.rb +0 -5
  15. data/decidim-admin/app/controllers/decidim/admin/features_controller.rb +4 -4
  16. data/decidim-admin/app/controllers/decidim/admin/moderations_controller.rb +1 -1
  17. data/decidim-admin/app/controllers/decidim/admin/participatory_process_attachments_controller.rb +2 -2
  18. data/decidim-admin/app/controllers/decidim/admin/participatory_process_copies_controller.rb +3 -9
  19. data/decidim-admin/app/controllers/decidim/admin/participatory_process_publications_controller.rb +4 -4
  20. data/decidim-admin/app/controllers/decidim/admin/participatory_process_step_activations_controller.rb +2 -2
  21. data/decidim-admin/app/controllers/decidim/admin/participatory_process_step_ordering_controller.rb +2 -2
  22. data/decidim-admin/app/controllers/decidim/admin/participatory_process_steps_controller.rb +6 -6
  23. data/decidim-admin/app/controllers/decidim/admin/participatory_process_user_roles_controller.rb +13 -15
  24. data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +16 -18
  25. data/decidim-admin/app/controllers/decidim/admin/users_controller.rb +4 -4
  26. data/decidim-admin/app/forms/decidim/admin/participatory_process_user_role_form.rb +2 -2
  27. data/decidim-admin/app/models/decidim/admin/abilities/{admin_user.rb → admin_ability.rb} +3 -6
  28. data/decidim-admin/app/models/decidim/admin/abilities/{base.rb → base_ability.rb} +1 -4
  29. data/decidim-admin/app/models/decidim/admin/abilities/{participatory_process_admin.rb → participatory_process_admin_ability.rb} +18 -28
  30. data/decidim-admin/app/models/decidim/admin/abilities/participatory_process_collaborator_ability.rb +19 -0
  31. data/decidim-admin/app/models/decidim/admin/abilities/participatory_process_moderator_ability.rb +23 -0
  32. data/decidim-admin/app/queries/decidim/admin/process_admins.rb +1 -1
  33. data/decidim-admin/app/views/decidim/admin/categories/index.html.erb +9 -9
  34. data/decidim-admin/app/views/decidim/admin/categories/new.html.erb +1 -1
  35. data/decidim-admin/app/views/decidim/admin/features/_form.html.erb +1 -1
  36. data/decidim-admin/app/views/decidim/admin/features/edit.html.erb +1 -1
  37. data/decidim-admin/app/views/decidim/admin/features/new.html.erb +1 -1
  38. data/decidim-admin/app/views/decidim/admin/participatory_process_copies/new.html.erb +1 -1
  39. data/decidim-admin/app/views/decidim/admin/participatory_process_groups/index.html.erb +5 -1
  40. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/index.html.erb +9 -9
  41. data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/index.html.erb +6 -6
  42. data/decidim-admin/app/views/decidim/admin/participatory_processes/edit.html.erb +6 -6
  43. data/decidim-admin/app/views/decidim/admin/participatory_processes/index.html.erb +11 -1
  44. data/decidim-admin/app/views/layouts/decidim/admin/participatory_process.html.erb +18 -18
  45. data/decidim-admin/config/locales/ca.yml +4 -3
  46. data/decidim-admin/config/locales/en.yml +1 -0
  47. data/decidim-admin/config/locales/es.yml +1 -2
  48. data/decidim-admin/db/migrate/20170714083651_rename_participatory_process_user_roles_table.rb +7 -0
  49. data/decidim-admin/lib/decidim/admin/engine.rb +8 -6
  50. data/decidim-admin/lib/decidim/admin/test/factories.rb +1 -1
  51. data/decidim-admin/spec/commands/create_participatory_process_admin_spec.rb +4 -4
  52. data/decidim-admin/spec/models/abilities/{admin_user_spec.rb → admin_ability_spec.rb} +1 -1
  53. data/decidim-admin/spec/models/abilities/{participatory_process_admin_spec.rb → participatory_process_admin_ability_spec.rb} +3 -3
  54. data/decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb +18 -0
  55. data/decidim-admin/spec/queries/process_admins_spec.rb +1 -1
  56. data/decidim-admin/spec/views/decidim/static_pages/_form.html.erb_spec.rb +1 -1
  57. data/decidim-budgets/config/locales/ca.yml +2 -2
  58. data/decidim-comments/app/models/decidim/comments/abilities/admin_ability.rb +19 -0
  59. data/decidim-comments/app/models/decidim/comments/abilities/{admin_user.rb → current_user_ability.rb} +4 -6
  60. data/decidim-comments/app/models/decidim/comments/abilities/participatory_process_admin_ability.rb +19 -0
  61. data/decidim-comments/app/models/decidim/comments/abilities/participatory_process_moderator_ability.rb +19 -0
  62. data/decidim-comments/lib/decidim/comments/admin_engine.rb +5 -2
  63. data/decidim-comments/lib/decidim/comments/engine.rb +6 -0
  64. data/decidim-comments/spec/models/abilities/{admin_user_spec.rb → admin_ability_spec.rb} +1 -1
  65. data/decidim-comments/spec/models/abilities/{process_admin_user_spec.rb → participatory_process_admin_ability_spec.rb} +3 -2
  66. data/decidim-meetings/app/controllers/decidim/meetings/meeting_widgets_controller.rb +1 -0
  67. data/decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb +2 -2
  68. data/decidim-meetings/app/views/decidim/meetings/meeting_widgets/show.html.erb +1 -1
  69. data/decidim-meetings/app/views/decidim/meetings/meetings/_meetings.html.erb +2 -0
  70. data/decidim-meetings/config/locales/ca.yml +1 -1
  71. data/decidim-meetings/spec/features/explore_meetings_spec.rb +11 -0
  72. data/decidim-proposals/app/controllers/decidim/proposals/proposals_controller.rb +2 -1
  73. data/decidim-proposals/app/forms/decidim/proposals/admin/proposal_answer_form.rb +1 -1
  74. data/decidim-proposals/app/helpers/decidim/proposals/application_helper.rb +23 -11
  75. data/decidim-proposals/app/models/decidim/proposals/abilities/{admin_user.rb → admin_ability.rb} +5 -12
  76. data/decidim-proposals/app/models/decidim/proposals/abilities/{current_user.rb → current_user_ability.rb} +1 -2
  77. data/decidim-proposals/app/models/decidim/proposals/abilities/{process_admin_user.rb → participatory_process_admin_ability.rb} +10 -22
  78. data/decidim-proposals/app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb +19 -0
  79. data/decidim-proposals/app/models/decidim/proposals/proposal.rb +8 -0
  80. data/decidim-proposals/app/services/decidim/proposals/proposal_search.rb +5 -2
  81. data/decidim-proposals/app/views/decidim/proposals/admin/proposal_answers/edit.html.erb +1 -1
  82. data/decidim-proposals/app/views/decidim/proposals/proposals/_filters.html.erb +1 -1
  83. data/decidim-proposals/app/views/decidim/proposals/proposals/_proposal_badge.html.erb +1 -1
  84. data/decidim-proposals/app/views/decidim/proposals/proposals/_proposals.html.erb +10 -1
  85. data/decidim-proposals/config/locales/ca.yml +3 -0
  86. data/decidim-proposals/config/locales/en.yml +3 -0
  87. data/decidim-proposals/config/locales/es.yml +3 -0
  88. data/decidim-proposals/lib/decidim/proposals/admin_engine.rb +5 -2
  89. data/decidim-proposals/lib/decidim/proposals/engine.rb +1 -1
  90. data/decidim-proposals/lib/decidim/proposals/feature.rb +4 -0
  91. data/decidim-proposals/lib/decidim/proposals/proposal_serializer.rb +4 -0
  92. data/decidim-proposals/spec/features/proposals_spec.rb +12 -5
  93. data/decidim-proposals/spec/models/decidim/proposals/abilities/{admin_user_spec.rb → admin_ability_spec.rb} +1 -1
  94. data/decidim-proposals/spec/models/decidim/proposals/abilities/{process_admin_user_spec.rb → participatory_process_admin_ability.rb} +10 -2
  95. data/decidim-proposals/spec/services/decidim/proposals/proposal_serializer_spec.rb +7 -0
  96. data/decidim-proposals/spec/shared/manage_proposals_examples.rb +21 -0
  97. data/decidim-results/app/controllers/decidim/results/results_controller.rb +2 -1
  98. data/decidim-results/app/views/decidim/results/results/_results.html.erb +2 -0
  99. data/decidim-results/config/locales/ca.yml +1 -1
  100. data/decidim-results/spec/features/comments_spec.rb +1 -1
  101. data/decidim-results/spec/features/explore_results_spec.rb +11 -0
  102. data/decidim-surveys/app/models/decidim/surveys/abilities/admin_ability.rb +17 -0
  103. data/decidim-surveys/app/models/decidim/surveys/abilities/{current_user.rb → current_user_ability.rb} +1 -1
  104. data/decidim-surveys/app/models/decidim/surveys/abilities/participatory_process_admin_ability.rb +19 -0
  105. data/decidim-surveys/config/locales/ca.yml +1 -1
  106. data/decidim-surveys/lib/decidim/surveys/admin_engine.rb +4 -2
  107. data/decidim-surveys/lib/decidim/surveys/engine.rb +1 -1
  108. data/decidim-surveys/spec/models/decidim/surveys/abilities/{admin_user_spec.rb → admin_ability_spec.rb} +1 -1
  109. data/decidim-surveys/spec/models/decidim/surveys/abilities/{current_user_spec.rb → current_user_ability_spec.rb} +1 -1
  110. data/decidim-surveys/spec/models/decidim/surveys/abilities/{process_admin_user_spec.rb → participatory_process_admin_ability_spec.rb} +3 -2
  111. data/decidim-system/app/commands/decidim/system/register_organization.rb +2 -2
  112. data/decidim-system/spec/commands/decidim/system/register_organization_spec.rb +1 -1
  113. data/docs/getting_started.md +1 -1
  114. data/lib/generators/decidim/templates/initializer.rb +2 -2
  115. data/package.json +1 -3
  116. data/yarn.lock +21 -18
  117. metadata +52 -54
  118. data/decidim-admin/app/models/decidim/admin/abilities/collaborator_user.rb +0 -20
  119. data/decidim-admin/app/models/decidim/admin/participatory_process_user_role.rb +0 -15
  120. data/decidim-admin/app/queries/decidim/admin/manageable_participatory_processes_for_user.rb +0 -42
  121. data/decidim-admin/app/queries/decidim/admin/process_admin_roles_for_process.rb +0 -36
  122. data/decidim-admin/db/seeds.rb +0 -24
  123. data/decidim-admin/spec/models/abilities/collaborator_user_spec.rb +0 -67
  124. data/decidim-admin/spec/models/participatory_process_user_role_spec.rb +0 -39
  125. data/decidim-admin/spec/queries/manageable_participatory_processes_for_user_spec.rb +0 -39
  126. data/decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb +0 -19
  127. data/decidim-comments/app/models/decidim/comments/abilities/process_admin_user.rb +0 -34
  128. data/decidim-meetings/app/views/decidim/meetings/meeting_widgets/.erb +0 -16
  129. data/decidim-surveys/app/models/decidim/surveys/abilities/admin_user.rb +0 -34
  130. data/decidim-surveys/app/models/decidim/surveys/abilities/process_admin_user.rb +0 -44
data/Gemfile.lock CHANGED
@@ -1,21 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- decidim (0.4.0)
5
- decidim-admin (= 0.4.0)
6
- decidim-api (= 0.4.0)
7
- decidim-budgets (= 0.4.0)
8
- decidim-comments (= 0.4.0)
9
- decidim-core (= 0.4.0)
10
- decidim-meetings (= 0.4.0)
11
- decidim-pages (= 0.4.0)
12
- decidim-proposals (= 0.4.0)
13
- decidim-results (= 0.4.0)
14
- decidim-surveys (= 0.4.0)
15
- decidim-system (= 0.4.0)
16
- decidim-admin (0.4.0)
4
+ decidim (0.4.1)
5
+ decidim-admin (= 0.4.1)
6
+ decidim-api (= 0.4.1)
7
+ decidim-budgets (= 0.4.1)
8
+ decidim-comments (= 0.4.1)
9
+ decidim-core (= 0.4.1)
10
+ decidim-meetings (= 0.4.1)
11
+ decidim-pages (= 0.4.1)
12
+ decidim-proposals (= 0.4.1)
13
+ decidim-results (= 0.4.1)
14
+ decidim-surveys (= 0.4.1)
15
+ decidim-system (= 0.4.1)
16
+ decidim-admin (0.4.1)
17
17
  active_link_to (~> 1.0.0)
18
- decidim-core (= 0.4.0)
18
+ decidim-core (= 0.4.1)
19
19
  devise (~> 4.2)
20
20
  devise-i18n (~> 1.1.0)
21
21
  devise_invitable (~> 1.7.0)
@@ -24,29 +24,29 @@ PATH
24
24
  rails (~> 5.1.1)
25
25
  rectify (~> 0.9.1)
26
26
  sassc-rails (~> 1.3.0)
27
- decidim-api (0.4.0)
27
+ decidim-api (0.4.1)
28
28
  graphiql-rails (~> 1.4.2)
29
29
  graphql (~> 1.6.0)
30
30
  rack-cors (~> 0.4.0)
31
31
  rails (~> 5.1.1)
32
32
  sprockets-es6 (~> 0.9.2)
33
- decidim-budgets (0.4.0)
34
- decidim-comments (= 0.4.0)
35
- decidim-core (= 0.4.0)
33
+ decidim-budgets (0.4.1)
34
+ decidim-comments (= 0.4.1)
35
+ decidim-core (= 0.4.1)
36
36
  kaminari (~> 1.0.1)
37
37
  rectify (~> 0.9.1)
38
38
  searchlight (~> 4.1.0)
39
- decidim-comments (0.4.0)
40
- decidim-core (= 0.4.0)
39
+ decidim-comments (0.4.1)
40
+ decidim-core (= 0.4.1)
41
41
  jquery-rails (~> 4.0)
42
42
  rails (~> 5.1.1)
43
- decidim-core (0.4.0)
43
+ decidim-core (0.4.1)
44
44
  active_link_to (~> 1.0.4)
45
45
  autoprefixer-rails (~> 7.1.1)
46
46
  cancancan (~> 2.0.0)
47
47
  carrierwave (~> 1.1.0)
48
48
  date_validator (~> 0.9.0)
49
- decidim-api (= 0.4.0)
49
+ decidim-api (= 0.4.1)
50
50
  devise (~> 4.3)
51
51
  devise-i18n (~> 1.1.0)
52
52
  file_validators (~> 2.1.0)
@@ -74,36 +74,36 @@ PATH
74
74
  sprockets-es6 (~> 0.9.2)
75
75
  truncato (~> 0.7.9)
76
76
  wisper (~> 2.0.0)
77
- decidim-meetings (0.4.0)
77
+ decidim-meetings (0.4.1)
78
78
  date_validator (~> 0.9)
79
- decidim-core (= 0.4.0)
79
+ decidim-core (= 0.4.1)
80
80
  httparty (~> 0.15.0)
81
81
  jquery-tmpl-rails (~> 1.1.0)
82
82
  kaminari (~> 1.0.1)
83
83
  rectify (~> 0.8)
84
84
  searchlight (~> 4.1.0)
85
- decidim-pages (0.4.0)
86
- decidim-comments (= 0.4.0)
87
- decidim-core (= 0.4.0)
85
+ decidim-pages (0.4.1)
86
+ decidim-comments (= 0.4.1)
87
+ decidim-core (= 0.4.1)
88
88
  rectify (~> 0.9.1)
89
- decidim-proposals (0.4.0)
90
- decidim-comments (= 0.4.0)
91
- decidim-core (= 0.4.0)
89
+ decidim-proposals (0.4.1)
90
+ decidim-comments (= 0.4.1)
91
+ decidim-core (= 0.4.1)
92
92
  kaminari (~> 1.0.1)
93
93
  rectify (~> 0.9.1)
94
94
  social-share-button (~> 0.10.0)
95
- decidim-results (0.4.0)
96
- decidim-comments (= 0.4.0)
97
- decidim-core (= 0.4.0)
95
+ decidim-results (0.4.1)
96
+ decidim-comments (= 0.4.1)
97
+ decidim-core (= 0.4.1)
98
98
  kaminari (~> 1.0.1)
99
99
  rectify (~> 0.9.1)
100
100
  searchlight (~> 4.1.0)
101
- decidim-surveys (0.4.0)
102
- decidim-core (= 0.4.0)
101
+ decidim-surveys (0.4.1)
102
+ decidim-core (= 0.4.1)
103
103
  jquery-tmpl-rails (~> 1.1.0)
104
- decidim-system (0.4.0)
104
+ decidim-system (0.4.1)
105
105
  active_link_to (~> 1.0.0)
106
- decidim-core (= 0.4.0)
106
+ decidim-core (= 0.4.1)
107
107
  devise (~> 4.2)
108
108
  devise-i18n (~> 1.1.0)
109
109
  devise_invitable (~> 1.7.1)
@@ -116,14 +116,14 @@ PATH
116
116
  PATH
117
117
  remote: decidim-dev
118
118
  specs:
119
- decidim-dev (0.4.0)
119
+ decidim-dev (0.4.1)
120
120
  byebug
121
121
  capybara (~> 2.14.0)
122
122
  capybara-screenshot (~> 1.0.14)
123
123
  codecov (~> 0.1.9)
124
124
  database_cleaner (~> 1.6.0)
125
125
  db-query-matchers (~> 0.9.0)
126
- decidim (= 0.4.0)
126
+ decidim (= 0.4.1)
127
127
  factory_girl_rails
128
128
  faker (~> 1.7.3)
129
129
  i18n-tasks (= 0.9.15)
@@ -143,25 +143,25 @@ PATH
143
143
  GEM
144
144
  remote: https://rubygems.org/
145
145
  specs:
146
- actioncable (5.1.1)
147
- actionpack (= 5.1.1)
146
+ actioncable (5.1.2)
147
+ actionpack (= 5.1.2)
148
148
  nio4r (~> 2.0)
149
149
  websocket-driver (~> 0.6.1)
150
- actionmailer (5.1.1)
151
- actionpack (= 5.1.1)
152
- actionview (= 5.1.1)
153
- activejob (= 5.1.1)
150
+ actionmailer (5.1.2)
151
+ actionpack (= 5.1.2)
152
+ actionview (= 5.1.2)
153
+ activejob (= 5.1.2)
154
154
  mail (~> 2.5, >= 2.5.4)
155
155
  rails-dom-testing (~> 2.0)
156
- actionpack (5.1.1)
157
- actionview (= 5.1.1)
158
- activesupport (= 5.1.1)
156
+ actionpack (5.1.2)
157
+ actionview (= 5.1.2)
158
+ activesupport (= 5.1.2)
159
159
  rack (~> 2.0)
160
160
  rack-test (~> 0.6.3)
161
161
  rails-dom-testing (~> 2.0)
162
162
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
163
- actionview (5.1.1)
164
- activesupport (= 5.1.1)
163
+ actionview (5.1.2)
164
+ activesupport (= 5.1.2)
165
165
  builder (~> 3.1)
166
166
  erubi (~> 1.4)
167
167
  rails-dom-testing (~> 2.0)
@@ -169,16 +169,16 @@ GEM
169
169
  active_link_to (1.0.4)
170
170
  actionpack
171
171
  addressable
172
- activejob (5.1.1)
173
- activesupport (= 5.1.1)
172
+ activejob (5.1.2)
173
+ activesupport (= 5.1.2)
174
174
  globalid (>= 0.3.6)
175
- activemodel (5.1.1)
176
- activesupport (= 5.1.1)
177
- activerecord (5.1.1)
178
- activemodel (= 5.1.1)
179
- activesupport (= 5.1.1)
175
+ activemodel (5.1.2)
176
+ activesupport (= 5.1.2)
177
+ activerecord (5.1.2)
178
+ activemodel (= 5.1.2)
179
+ activesupport (= 5.1.2)
180
180
  arel (~> 8.0)
181
- activesupport (5.1.1)
181
+ activesupport (5.1.2)
182
182
  concurrent-ruby (~> 1.0, >= 1.0.2)
183
183
  i18n (~> 0.7)
184
184
  minitest (~> 5.1)
@@ -187,7 +187,7 @@ GEM
187
187
  public_suffix (~> 2.0, >= 2.0.2)
188
188
  arel (8.0.0)
189
189
  ast (2.3.0)
190
- autoprefixer-rails (7.1.1.2)
190
+ autoprefixer-rails (7.1.2.3)
191
191
  execjs
192
192
  axiom-types (0.1.1)
193
193
  descendants_tracker (~> 0.0.4)
@@ -201,14 +201,14 @@ GEM
201
201
  builder (3.2.3)
202
202
  byebug (9.0.6)
203
203
  cancancan (2.0.0)
204
- capybara (2.14.3)
204
+ capybara (2.14.4)
205
205
  addressable
206
206
  mime-types (>= 1.16)
207
207
  nokogiri (>= 1.3.3)
208
208
  rack (>= 1.0.0)
209
209
  rack-test (>= 0.5.4)
210
210
  xpath (~> 2.0)
211
- capybara-screenshot (1.0.14)
211
+ capybara-screenshot (1.0.17)
212
212
  capybara (>= 1.0, < 3)
213
213
  launchy
214
214
  carrierwave (1.1.0)
@@ -260,7 +260,7 @@ GEM
260
260
  thread
261
261
  thread_safe
262
262
  equalizer (0.0.11)
263
- erubi (1.6.0)
263
+ erubi (1.6.1)
264
264
  erubis (2.7.0)
265
265
  execjs (2.7.0)
266
266
  factory_girl (4.8.0)
@@ -291,15 +291,15 @@ GEM
291
291
  activesupport (>= 4.2.0)
292
292
  graphiql-rails (1.4.2)
293
293
  rails
294
- graphql (1.6.4)
294
+ graphql (1.6.6)
295
295
  hashdiff (0.3.4)
296
- hashie (3.5.5)
296
+ hashie (3.5.6)
297
297
  high_voltage (3.0.0)
298
298
  highline (1.7.8)
299
299
  htmlentities (4.3.4)
300
300
  httparty (0.15.5)
301
301
  multi_xml (>= 0.5.2)
302
- i18n (0.8.4)
302
+ i18n (0.8.6)
303
303
  i18n-tasks (0.9.15)
304
304
  activesupport (>= 4.0.2)
305
305
  ast (>= 2.1.0)
@@ -311,7 +311,7 @@ GEM
311
311
  rainbow (~> 2.2)
312
312
  terminal-table (>= 1.5.1)
313
313
  ice_nine (0.11.2)
314
- invisible_captcha (0.9.2)
314
+ invisible_captcha (0.9.3)
315
315
  rails (>= 3.2.0)
316
316
  jquery-rails (4.3.1)
317
317
  rails-dom-testing (>= 1, < 3)
@@ -368,7 +368,7 @@ GEM
368
368
  rack (>= 1.6.2, < 3)
369
369
  omniauth-facebook (4.0.0)
370
370
  omniauth-oauth2 (~> 1.2)
371
- omniauth-google-oauth2 (0.5.0)
371
+ omniauth-google-oauth2 (0.5.1)
372
372
  jwt (~> 1.5)
373
373
  multi_json (~> 1.3)
374
374
  omniauth (>= 1.1.1)
@@ -404,17 +404,17 @@ GEM
404
404
  rack-cors (0.4.1)
405
405
  rack-test (0.6.3)
406
406
  rack (>= 1.0)
407
- rails (5.1.1)
408
- actioncable (= 5.1.1)
409
- actionmailer (= 5.1.1)
410
- actionpack (= 5.1.1)
411
- actionview (= 5.1.1)
412
- activejob (= 5.1.1)
413
- activemodel (= 5.1.1)
414
- activerecord (= 5.1.1)
415
- activesupport (= 5.1.1)
407
+ rails (5.1.2)
408
+ actioncable (= 5.1.2)
409
+ actionmailer (= 5.1.2)
410
+ actionpack (= 5.1.2)
411
+ actionview (= 5.1.2)
412
+ activejob (= 5.1.2)
413
+ activemodel (= 5.1.2)
414
+ activerecord (= 5.1.2)
415
+ activesupport (= 5.1.2)
416
416
  bundler (>= 1.3.0, < 2.0)
417
- railties (= 5.1.1)
417
+ railties (= 5.1.2)
418
418
  sprockets-rails (>= 2.0.0)
419
419
  rails-controller-testing (1.0.2)
420
420
  actionpack (~> 5.x, >= 5.0.1)
@@ -428,16 +428,16 @@ GEM
428
428
  rails-i18n (5.0.4)
429
429
  i18n (~> 0.7)
430
430
  railties (~> 5.0)
431
- railties (5.1.1)
432
- actionpack (= 5.1.1)
433
- activesupport (= 5.1.1)
431
+ railties (5.1.2)
432
+ actionpack (= 5.1.2)
433
+ activesupport (= 5.1.2)
434
434
  method_source
435
435
  rake (>= 0.8.7)
436
436
  thor (>= 0.18.1, < 2.0)
437
437
  rainbow (2.2.2)
438
438
  rake
439
439
  rake (12.0.0)
440
- rb-fsevent (0.9.8)
440
+ rb-fsevent (0.10.2)
441
441
  rb-inotify (0.9.10)
442
442
  ffi (>= 0.5.0, < 2)
443
443
  rectify (0.9.1)
@@ -487,7 +487,7 @@ GEM
487
487
  rubyzip (1.2.1)
488
488
  safe_yaml (1.0.4)
489
489
  sass (3.4.24)
490
- sassc (1.11.2)
490
+ sassc (1.11.4)
491
491
  bundler
492
492
  ffi (~> 1.9.6)
493
493
  sass (>= 3.3.0)
@@ -5,3 +5,5 @@ $brand: #9675ce !default;
5
5
  $twitter: #55acee !default;
6
6
  $facebook: #3b5998 !default;
7
7
  $google: #dd4b39 !default;
8
+
9
+ $secondary: #599aa6 !default;
@@ -4,3 +4,9 @@
4
4
  float: right;
5
5
  }
6
6
  }
7
+
8
+ form {
9
+ .card {
10
+ overflow: initial;
11
+ }
12
+ }
@@ -13,3 +13,7 @@
13
13
  .text-alert{
14
14
  color: $alert-color;
15
15
  }
16
+
17
+ .text-info{
18
+ color: $secondary;
19
+ }
@@ -41,7 +41,7 @@ module Decidim
41
41
  attr_reader :form, :participatory_process, :current_user, :user
42
42
 
43
43
  def create_role
44
- ParticipatoryProcessUserRole.find_or_create_by!(
44
+ Decidim::ParticipatoryProcessUserRole.find_or_create_by!(
45
45
  role: form.role.to_sym,
46
46
  user: user,
47
47
  participatory_process: @participatory_process
@@ -68,9 +68,7 @@ module Decidim
68
68
  end
69
69
 
70
70
  def new_user
71
- new_user_form = user_form.dup
72
- new_user_form.roles = []
73
- @new_user ||= InviteUser.call(new_user_form) do
71
+ @new_user ||= InviteUser.call(user_form) do
74
72
  on(:ok) do |user|
75
73
  return user
76
74
  end
@@ -81,7 +79,7 @@ module Decidim
81
79
  OpenStruct.new(name: form.name,
82
80
  email: form.email.downcase,
83
81
  organization: participatory_process.organization,
84
- roles: [form.role.to_sym],
82
+ admin: false,
85
83
  invited_by: current_user,
86
84
  invitation_instructions: invitation_instructions)
87
85
  end
@@ -34,7 +34,7 @@ module Decidim
34
34
  end
35
35
 
36
36
  def ability
37
- Decidim::Admin::Abilities::Base.new(user, current_organization: organization)
37
+ Decidim::Admin::Abilities::BaseAbility.new(user, current_organization: organization)
38
38
  end
39
39
  end
40
40
  end
@@ -33,7 +33,7 @@ module Decidim
33
33
  # Overwrites `cancancan`'s method to point to the correct ability class,
34
34
  # since the gem expects the ability class to be in the root namespace.
35
35
  def current_ability_klass
36
- Decidim::Admin::Abilities::Base
36
+ Decidim::Admin::Abilities::BaseAbility
37
37
  end
38
38
  end
39
39
  end
@@ -15,17 +15,17 @@ module Decidim
15
15
 
16
16
  def new
17
17
  authorize! :create, Decidim::Category
18
- @form = form(CategoryForm).from_params({}, current_process: participatory_process)
18
+ @form = form(CategoryForm).from_params({}, current_process: current_participatory_process)
19
19
  end
20
20
 
21
21
  def create
22
22
  authorize! :create, Decidim::Category
23
- @form = form(CategoryForm).from_params(params, current_process: participatory_process)
23
+ @form = form(CategoryForm).from_params(params, current_process: current_participatory_process)
24
24
 
25
- CreateCategory.call(@form, participatory_process) do
25
+ CreateCategory.call(@form, current_participatory_process) do
26
26
  on(:ok) do
27
27
  flash[:notice] = I18n.t("categories.create.success", scope: "decidim.admin")
28
- redirect_to participatory_process_categories_path(participatory_process)
28
+ redirect_to participatory_process_categories_path(current_participatory_process)
29
29
  end
30
30
 
31
31
  on(:invalid) do
@@ -38,18 +38,18 @@ module Decidim
38
38
  def edit
39
39
  @category = collection.find(params[:id])
40
40
  authorize! :update, @category
41
- @form = form(CategoryForm).from_model(@category, current_process: participatory_process)
41
+ @form = form(CategoryForm).from_model(@category, current_process: current_participatory_process)
42
42
  end
43
43
 
44
44
  def update
45
45
  @category = collection.find(params[:id])
46
46
  authorize! :update, @category
47
- @form = form(CategoryForm).from_params(params, current_process: participatory_process)
47
+ @form = form(CategoryForm).from_params(params, current_process: current_participatory_process)
48
48
 
49
49
  UpdateCategory.call(@category, @form) do
50
50
  on(:ok) do
51
51
  flash[:notice] = I18n.t("categories.update.success", scope: "decidim.admin")
52
- redirect_to participatory_process_categories_path(participatory_process)
52
+ redirect_to participatory_process_categories_path(current_participatory_process)
53
53
  end
54
54
 
55
55
  on(:invalid) do
@@ -77,14 +77,14 @@ module Decidim
77
77
  flash[:alert] = I18n.t("categories.destroy.error", scope: "decidim.admin")
78
78
  end
79
79
 
80
- redirect_back(fallback_location: participatory_process_categories_path(participatory_process))
80
+ redirect_back(fallback_location: participatory_process_categories_path(current_participatory_process))
81
81
  end
82
82
  end
83
83
 
84
84
  private
85
85
 
86
86
  def collection
87
- @collection ||= participatory_process.categories.includes(:subcategories)
87
+ @collection ||= current_participatory_process.categories.includes(:subcategories)
88
88
  end
89
89
  end
90
90
  end