decidim 0.5.1 → 0.6.0

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 (980) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +28 -23
  3. data/.codeclimate.yml +3 -1
  4. data/.rubocop.yml +38 -34
  5. data/CHANGELOG.md +28 -0
  6. data/Dockerfile +3 -0
  7. data/Gemfile +2 -1
  8. data/Gemfile.lock +127 -117
  9. data/README.md +9 -7
  10. data/Rakefile +4 -7
  11. data/{decidim-core/config → config}/i18n-tasks.yml +39 -45
  12. data/decidim-admin/README.md +0 -7
  13. data/decidim-admin/app/assets/javascripts/decidim/admin/application.js.es6 +0 -1
  14. data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_quill.scss +5 -0
  15. data/decidim-admin/app/commands/decidim/admin/create_category.rb +4 -4
  16. data/decidim-admin/app/commands/decidim/admin/create_feature.rb +7 -7
  17. data/decidim-admin/app/commands/decidim/admin/create_managed_user.rb +0 -2
  18. data/decidim-admin/app/commands/decidim/admin/update_organization.rb +1 -0
  19. data/decidim-admin/app/controllers/decidim/admin/application_controller.rb +0 -2
  20. data/decidim-admin/app/controllers/decidim/admin/categories_controller.rb +10 -10
  21. data/decidim-admin/app/controllers/decidim/admin/exports_controller.rb +1 -2
  22. data/decidim-admin/app/controllers/decidim/admin/feature_permissions_controller.rb +2 -3
  23. data/decidim-admin/app/controllers/decidim/admin/features/base_controller.rb +9 -3
  24. data/decidim-admin/app/controllers/decidim/admin/features_controller.rb +5 -7
  25. data/decidim-admin/app/controllers/decidim/admin/moderations_controller.rb +5 -7
  26. data/decidim-admin/app/controllers/decidim/admin/scopes_controller.rb +12 -10
  27. data/decidim-admin/app/controllers/decidim/admin/users_controller.rb +1 -3
  28. data/decidim-admin/app/forms/decidim/admin/category_form.rb +2 -2
  29. data/decidim-admin/app/forms/decidim/admin/feature_form.rb +1 -18
  30. data/decidim-admin/app/forms/decidim/admin/organization_form.rb +1 -0
  31. data/decidim-admin/app/helpers/decidim/admin/exports_helper.rb +10 -0
  32. data/decidim-admin/app/models/decidim/admin/abilities/admin_ability.rb +0 -3
  33. data/decidim-admin/app/models/decidim/admin/abilities/participatory_process_admin_ability.rb +3 -3
  34. data/decidim-admin/app/views/decidim/admin/attachments/edit.html.erb +1 -1
  35. data/decidim-admin/app/views/decidim/admin/attachments/new.html.erb +1 -1
  36. data/decidim-admin/app/views/decidim/admin/categories/edit.html.erb +2 -2
  37. data/decidim-admin/app/views/decidim/admin/categories/index.html.erb +11 -11
  38. data/decidim-admin/app/views/decidim/admin/categories/new.html.erb +3 -3
  39. data/decidim-admin/app/views/decidim/admin/categories/show.html.erb +2 -2
  40. data/decidim-admin/app/views/decidim/admin/exports/_dropdown.html.erb +1 -1
  41. data/decidim-admin/app/views/decidim/admin/features/_form.html.erb +15 -15
  42. data/decidim-admin/app/views/decidim/admin/features/edit.html.erb +1 -1
  43. data/decidim-admin/app/views/decidim/admin/features/new.html.erb +1 -1
  44. data/decidim-admin/app/views/decidim/admin/moderations/index.html.erb +2 -2
  45. data/decidim-admin/app/views/decidim/admin/organization/_form.html.erb +5 -0
  46. data/decidim-admin/app/views/decidim/admin/users/index.html.erb +1 -1
  47. data/decidim-admin/config/locales/ca.yml +8 -195
  48. data/decidim-admin/config/locales/en.yml +6 -197
  49. data/decidim-admin/config/locales/es.yml +11 -198
  50. data/decidim-admin/config/locales/eu.yml +95 -208
  51. data/decidim-admin/config/locales/fi.yml +168 -123
  52. data/decidim-admin/config/locales/fr.yml +114 -191
  53. data/decidim-admin/config/locales/it.yml +150 -168
  54. data/decidim-admin/config/locales/nl.yml +443 -0
  55. data/decidim-admin/config/locales/pl.yml +444 -0
  56. data/decidim-admin/config/locales/uk.yml +451 -0
  57. data/decidim-admin/config/routes.rb +2 -46
  58. data/decidim-admin/decidim-admin.gemspec +1 -0
  59. data/decidim-admin/lib/decidim/admin/engine.rb +0 -14
  60. data/decidim-admin/{spec/commands/create_category_spec.rb → lib/decidim/admin/test/commands/create_category_examples.rb} +4 -5
  61. data/decidim-admin/{spec/commands/destroy_category_spec.rb → lib/decidim/admin/test/commands/destroy_category_examples.rb} +2 -3
  62. data/decidim-admin/{spec/commands/update_category_spec.rb → lib/decidim/admin/test/commands/update_category_examples.rb} +3 -4
  63. data/decidim-admin/{spec/forms/category_form_spec.rb → lib/decidim/admin/test/forms/category_form_examples.rb} +5 -5
  64. data/decidim-admin/lib/decidim/admin/test/manage_attachments_examples.rb +2 -2
  65. data/decidim-admin/{spec/features/admin_manages_feature_permissions_spec.rb → lib/decidim/admin/test/manage_feature_permissions_examples.rb} +3 -7
  66. data/decidim-admin/spec/commands/update_feature_spec.rb +1 -1
  67. data/decidim-admin/spec/factories.rb +1 -0
  68. data/decidim-admin/spec/features/admin_manages_organization_admins_spec.rb +1 -1
  69. data/decidim-admin/spec/forms/organization_form_spec.rb +19 -1
  70. data/decidim-admin/spec/helpers/exports_helper_spec.rb +1 -1
  71. data/decidim-admin/spec/helpers/menu_helper_spec.rb +2 -1
  72. data/decidim-admin/spec/models/abilities/admin_ability_spec.rb +0 -2
  73. data/decidim-admin/spec/models/abilities/participatory_process_admin_ability_spec.rb +1 -1
  74. data/decidim-api/decidim-api.gemspec +1 -0
  75. data/decidim-api/spec/factories.rb +1 -0
  76. data/decidim-assemblies/.gitignore +3 -0
  77. data/decidim-assemblies/README.md +34 -0
  78. data/decidim-assemblies/Rakefile +3 -0
  79. data/decidim-assemblies/app/assets/config/admin/decidim_assemblies_manifest.js +1 -0
  80. data/decidim-assemblies/app/assets/config/decidim_assemblies_manifest.js +1 -0
  81. data/decidim-assemblies/app/assets/images/decidim/assemblies/assembly.svg +6 -0
  82. data/decidim-assemblies/app/assets/javascripts/decidim/assemblies/admin/assemblies.js.es6 +12 -0
  83. data/decidim-assemblies/app/commands/decidim/assemblies/admin/copy_assembly.rb +88 -0
  84. data/decidim-assemblies/app/commands/decidim/assemblies/admin/create_assembly.rb +68 -0
  85. data/decidim-assemblies/app/commands/decidim/assemblies/admin/publish_assembly.rb +34 -0
  86. data/decidim-assemblies/app/commands/decidim/assemblies/admin/unpublish_assembly.rb +34 -0
  87. data/decidim-assemblies/app/commands/decidim/assemblies/admin/update_assembly.rb +73 -0
  88. data/decidim-assemblies/app/constraints/decidim/assemblies/current_assembly.rb +37 -0
  89. data/decidim-assemblies/app/constraints/decidim/assemblies/current_feature.rb +28 -0
  90. data/decidim-assemblies/app/controllers/concerns/decidim/assemblies/admin/assembly_context.rb +21 -0
  91. data/decidim-assemblies/app/controllers/concerns/decidim/assemblies/assembly_context.rb +25 -0
  92. data/decidim-assemblies/app/controllers/concerns/decidim/assemblies/needs_assembly.rb +50 -0
  93. data/decidim-assemblies/app/controllers/decidim/assemblies/admin/application_controller.rb +11 -0
  94. data/decidim-assemblies/app/controllers/decidim/assemblies/admin/assemblies_controller.rb +100 -0
  95. data/decidim-assemblies/app/controllers/decidim/assemblies/admin/assembly_attachments_controller.rb +27 -0
  96. data/decidim-assemblies/app/controllers/decidim/assemblies/admin/assembly_copies_controller.rb +35 -0
  97. data/decidim-assemblies/app/controllers/decidim/assemblies/admin/assembly_publications_controller.rb +45 -0
  98. data/decidim-assemblies/app/controllers/decidim/assemblies/admin/categories_controller.rb +13 -0
  99. data/decidim-assemblies/app/controllers/decidim/assemblies/admin/concerns/assembly_admin.rb +26 -0
  100. data/decidim-assemblies/app/controllers/decidim/assemblies/admin/exports_controller.rb +14 -0
  101. data/decidim-assemblies/app/controllers/decidim/assemblies/admin/feature_permissions_controller.rb +14 -0
  102. data/decidim-assemblies/app/controllers/decidim/assemblies/admin/features_controller.rb +14 -0
  103. data/decidim-assemblies/app/controllers/decidim/assemblies/admin/moderations_controller.rb +12 -0
  104. data/decidim-assemblies/app/controllers/decidim/assemblies/assemblies_controller.rb +43 -0
  105. data/decidim-assemblies/app/controllers/decidim/assemblies/assembly_widgets_controller.rb +21 -0
  106. data/decidim-assemblies/app/controllers/decidim/assemblies/categories_controller.rb +13 -0
  107. data/decidim-assemblies/app/forms/decidim/assemblies/admin/assembly_copy_form.rb +34 -0
  108. data/decidim-assemblies/app/forms/decidim/assemblies/admin/assembly_form.rb +63 -0
  109. data/decidim-assemblies/app/models/decidim/assemblies/abilities/admin/admin_ability.rb +18 -0
  110. data/decidim-assemblies/app/models/decidim/assemblies/abilities/admin_ability.rb +16 -0
  111. data/decidim-assemblies/app/models/decidim/assemblies/abilities/everyone_ability.rb +17 -0
  112. data/decidim-assemblies/app/models/decidim/assembly.rb +45 -0
  113. data/decidim-assemblies/app/presenters/decidim/assemblies/assembly_stats_presenter.rb +52 -0
  114. data/decidim-assemblies/app/queries/decidim/assemblies/admin/admin_users.rb +39 -0
  115. data/decidim-assemblies/app/queries/decidim/assemblies/organization_assemblies.rb +16 -0
  116. data/decidim-assemblies/app/queries/decidim/assemblies/organization_prioritized_assemblies.rb +20 -0
  117. data/decidim-assemblies/app/queries/decidim/assemblies/organization_published_assemblies.rb +19 -0
  118. data/decidim-assemblies/app/queries/decidim/assemblies/prioritized_assemblies.rb +13 -0
  119. data/decidim-assemblies/app/queries/decidim/assemblies/promoted_assemblies.rb +12 -0
  120. data/decidim-assemblies/app/queries/decidim/assemblies/published_assemblies.rb +12 -0
  121. data/decidim-assemblies/app/views/decidim/assemblies/_assembly.html.erb +22 -0
  122. data/decidim-assemblies/app/views/decidim/assemblies/_order_by_assemblies.html.erb +3 -0
  123. data/decidim-assemblies/app/views/decidim/assemblies/admin/assemblies/_form.html.erb +89 -0
  124. data/decidim-assemblies/app/views/decidim/assemblies/admin/assemblies/edit.html.erb +19 -0
  125. data/decidim-assemblies/app/views/decidim/assemblies/admin/assemblies/index.html.erb +66 -0
  126. data/decidim-assemblies/app/views/decidim/assemblies/admin/assemblies/new.html.erb +11 -0
  127. data/decidim-assemblies/app/views/decidim/assemblies/admin/assembly_copies/_form.html.erb +34 -0
  128. data/decidim-assemblies/app/views/decidim/assemblies/admin/assembly_copies/new.html.erb +7 -0
  129. data/decidim-assemblies/app/views/decidim/assemblies/assemblies/_no_assemblies_yet.html.erb +3 -0
  130. data/decidim-assemblies/app/views/decidim/assemblies/assemblies/_promoted_assembly.html.erb +27 -0
  131. data/decidim-assemblies/app/views/decidim/assemblies/assemblies/_statistics.html.erb +10 -0
  132. data/decidim-assemblies/app/views/decidim/assemblies/assemblies/index.html.erb +17 -0
  133. data/decidim-assemblies/app/views/decidim/assemblies/assemblies/show.html.erb +74 -0
  134. data/decidim-assemblies/app/views/decidim/assemblies/assembly_widgets/show.html.erb +11 -0
  135. data/decidim-assemblies/app/views/layouts/decidim/_assembly_header.html.erb +64 -0
  136. data/decidim-assemblies/app/views/layouts/decidim/admin/assemblies.html.erb +14 -0
  137. data/decidim-assemblies/app/views/layouts/decidim/admin/assembly.html.erb +54 -0
  138. data/decidim-assemblies/app/views/layouts/decidim/assembly.html.erb +30 -0
  139. data/decidim-assemblies/bin/rails +15 -0
  140. data/decidim-assemblies/config/locales/ca.yml +128 -0
  141. data/decidim-assemblies/config/locales/en.yml +128 -0
  142. data/decidim-assemblies/config/locales/es.yml +128 -0
  143. data/decidim-assemblies/config/locales/eu.yml +127 -0
  144. data/decidim-assemblies/config/locales/fi.yml +127 -0
  145. data/decidim-assemblies/config/locales/fr.yml +127 -0
  146. data/decidim-assemblies/config/locales/it.yml +127 -0
  147. data/decidim-assemblies/config/locales/nl.yml +127 -0
  148. data/decidim-assemblies/config/locales/pl.yml +128 -0
  149. data/decidim-assemblies/config/locales/uk.yml +129 -0
  150. data/decidim-assemblies/db/migrate/20170727190859_add_assemblies.rb +37 -0
  151. data/decidim-assemblies/db/migrate/20170822153055_add_scopes_enabled_to_assemblies.rb +7 -0
  152. data/{decidim-core → decidim-assemblies}/db/seeds/Exampledocument.pdf +0 -0
  153. data/{decidim-core → decidim-assemblies}/db/seeds/city.jpeg +0 -0
  154. data/{decidim-core → decidim-assemblies}/db/seeds/city2.jpeg +0 -0
  155. data/decidim-assemblies/db/seeds/homepage_image.jpg +0 -0
  156. data/decidim-assemblies/decidim-assemblies.gemspec +21 -0
  157. data/decidim-assemblies/lib/decidim/assemblies.rb +12 -0
  158. data/decidim-assemblies/lib/decidim/assemblies/admin.rb +10 -0
  159. data/decidim-assemblies/lib/decidim/assemblies/admin_engine.rb +79 -0
  160. data/decidim-assemblies/lib/decidim/assemblies/engine.rb +53 -0
  161. data/decidim-assemblies/lib/decidim/assemblies/participatory_space.rb +69 -0
  162. data/decidim-assemblies/lib/decidim/assemblies/test/factories.rb +41 -0
  163. data/decidim-assemblies/spec/commands/copy_assembly_spec.rb +106 -0
  164. data/decidim-assemblies/spec/commands/create_assembly_spec.rb +83 -0
  165. data/decidim-assemblies/spec/commands/create_category_spec.rb +10 -0
  166. data/decidim-assemblies/spec/commands/destroy_category_spec.rb +10 -0
  167. data/decidim-assemblies/spec/commands/publish_assembly_spec.rb +37 -0
  168. data/decidim-assemblies/spec/commands/unpublish_assembly_spec.rb +37 -0
  169. data/decidim-assemblies/spec/commands/update_assembly_spec.rb +120 -0
  170. data/decidim-assemblies/spec/commands/update_category_spec.rb +10 -0
  171. data/decidim-assemblies/spec/controllers/assemblies_controller_spec.rb +64 -0
  172. data/decidim-assemblies/spec/controllers/exports_controller_spec.rb +53 -0
  173. data/decidim-assemblies/spec/factories.rb +6 -0
  174. data/decidim-assemblies/spec/features/admin/admin_copy_assembly_spec.rb +93 -0
  175. data/decidim-assemblies/spec/features/admin/admin_manages_assemblies_spec.rb +251 -0
  176. data/decidim-assemblies/spec/features/admin/admin_manages_assembly_attachments_spec.rb +19 -0
  177. data/decidim-assemblies/spec/features/admin/admin_manages_assembly_categories_spec.rb +141 -0
  178. data/decidim-assemblies/spec/features/admin/admin_manages_assembly_feature_permissions_spec.rb +14 -0
  179. data/decidim-assemblies/spec/features/admin/admin_manages_assembly_features_spec.rb +207 -0
  180. data/decidim-assemblies/spec/features/assemblies_spec.rb +130 -0
  181. data/decidim-assemblies/spec/forms/assembly_form_spec.rb +170 -0
  182. data/decidim-assemblies/spec/forms/category_form_spec.rb +16 -0
  183. data/decidim-assemblies/spec/helpers/decidim/scopes_helper_spec.rb +16 -0
  184. data/decidim-assemblies/spec/lib/features/assemblies/current_feature_spec.rb +87 -0
  185. data/decidim-assemblies/spec/models/abilities/admin/admin_ability_spec.rb +11 -0
  186. data/decidim-assemblies/spec/models/abilities/admin_ability_spec.rb +12 -0
  187. data/decidim-assemblies/spec/models/abilities/everyone_ability_spec.rb +13 -0
  188. data/decidim-assemblies/spec/models/decidim/assembly_spec.rb +29 -0
  189. data/decidim-assemblies/spec/presenters/decidim/assemblies/assembly_stats_presenter.spec.rb +44 -0
  190. data/decidim-assemblies/spec/queries/admin/assembly_admins_spec.rb +18 -0
  191. data/decidim-assemblies/spec/queries/organization_assemblies_spec.rb +26 -0
  192. data/decidim-assemblies/spec/queries/organization_prioritized_assemblies_spec.rb +31 -0
  193. data/decidim-assemblies/spec/queries/organization_published_assemblies_spec.rb +35 -0
  194. data/decidim-assemblies/spec/shared/assembly_administration_shared_context.rb +15 -0
  195. data/decidim-assemblies/spec/spec_helper.rb +9 -0
  196. data/decidim-budgets/app/assets/images/decidim/budgets/icon.svg +10 -15
  197. data/decidim-budgets/app/commands/decidim/budgets/add_line_item.rb +1 -1
  198. data/decidim-budgets/app/forms/decidim/budgets/admin/project_form.rb +1 -1
  199. data/decidim-budgets/app/models/decidim/budgets/project.rb +7 -6
  200. data/decidim-budgets/app/views/decidim/budgets/admin/projects/_form.html.erb +3 -3
  201. data/decidim-budgets/app/views/decidim/budgets/projects/_filters.html.erb +1 -1
  202. data/decidim-budgets/app/views/decidim/budgets/projects/show.html.erb +1 -0
  203. data/decidim-budgets/config/locales/ca.yml +3 -0
  204. data/decidim-budgets/config/locales/en.yml +4 -10
  205. data/decidim-budgets/config/locales/es.yml +7 -4
  206. data/decidim-budgets/config/locales/eu.yml +11 -9
  207. data/decidim-budgets/config/locales/fi.yml +12 -0
  208. data/decidim-budgets/config/locales/fr.yml +7 -4
  209. data/decidim-budgets/config/locales/it.yml +6 -0
  210. data/decidim-budgets/config/locales/nl.yml +127 -0
  211. data/decidim-budgets/config/locales/pl.yml +130 -0
  212. data/decidim-budgets/config/locales/uk.yml +138 -0
  213. data/decidim-budgets/lib/decidim/budgets/feature.rb +5 -5
  214. data/decidim-budgets/lib/decidim/budgets/test/factories.rb +4 -4
  215. data/decidim-budgets/spec/commands/add_line_item_spec.rb +2 -2
  216. data/decidim-budgets/spec/commands/create_project_spec.rb +3 -3
  217. data/decidim-budgets/spec/commands/update_project_spec.rb +3 -3
  218. data/decidim-budgets/spec/factories.rb +1 -0
  219. data/decidim-budgets/spec/features/follow_projects_spec.rb +13 -0
  220. data/decidim-budgets/spec/features/orders_spec.rb +4 -4
  221. data/decidim-budgets/spec/forms/project_form_spec.rb +3 -3
  222. data/decidim-budgets/spec/models/project_spec.rb +8 -0
  223. data/decidim-budgets/spec/queries/decidim/budgets/filtered_projects_spec.rb +2 -2
  224. data/decidim-budgets/spec/services/project_search_spec.rb +1 -1
  225. data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
  226. data/decidim-comments/app/commands/decidim/comments/create_comment.rb +13 -11
  227. data/decidim-comments/app/events/decidim/comments/comment_created_event.rb +56 -0
  228. data/decidim-comments/app/frontend/comments/add_comment_form.component.tsx +1 -1
  229. data/decidim-comments/app/models/decidim/comments/abilities/participatory_process_admin_ability.rb +1 -1
  230. data/decidim-comments/app/models/decidim/comments/abilities/participatory_process_moderator_ability.rb +1 -1
  231. data/decidim-comments/app/models/decidim/comments/comment.rb +6 -13
  232. data/decidim-comments/config/locales/ca.yml +18 -20
  233. data/decidim-comments/config/locales/en.yml +15 -18
  234. data/decidim-comments/config/locales/es.yml +20 -22
  235. data/decidim-comments/config/locales/eu.yml +25 -21
  236. data/decidim-comments/config/locales/fi.yml +22 -18
  237. data/decidim-comments/config/locales/fr.yml +24 -20
  238. data/decidim-comments/config/locales/it.yml +23 -18
  239. data/decidim-comments/config/locales/nl.yml +67 -2
  240. data/decidim-comments/config/locales/pl.yml +64 -0
  241. data/decidim-comments/config/locales/uk.yml +70 -0
  242. data/decidim-comments/lib/decidim/comments/commentable.rb +8 -1
  243. data/decidim-comments/spec/commands/create_comment_spec.rb +22 -41
  244. data/decidim-comments/spec/commands/vote_comment_spec.rb +1 -1
  245. data/decidim-comments/spec/events/decidim/comments/comment_created_event_spec.rb +17 -0
  246. data/decidim-comments/spec/factories.rb +1 -0
  247. data/decidim-comments/spec/features/report_comment_spec.rb +1 -1
  248. data/decidim-comments/spec/models/comment_spec.rb +5 -27
  249. data/decidim-comments/spec/models/comment_vote_spec.rb +1 -1
  250. data/decidim-comments/spec/queries/sorted_comments_spec.rb +2 -2
  251. data/decidim-comments/spec/types/commentable_mutation_type_spec.rb +1 -1
  252. data/decidim-core/app/assets/config/decidim_core_manifest.js +1 -0
  253. data/decidim-core/app/assets/javascripts/decidim/notifications.js.es6 +33 -0
  254. data/decidim-core/app/assets/stylesheets/decidim/extras/_meeting-registrations.scss +11 -0
  255. data/decidim-core/app/assets/stylesheets/decidim/modules/_extra.scss +4 -0
  256. data/decidim-core/app/assets/stylesheets/decidim/modules/_process-nav.scss +14 -0
  257. data/decidim-core/app/commands/decidim/create_follow.rb +40 -0
  258. data/decidim-core/app/commands/decidim/create_omniauth_registration.rb +0 -2
  259. data/decidim-core/app/commands/decidim/create_registration.rb +1 -3
  260. data/decidim-core/app/commands/decidim/create_report.rb +7 -7
  261. data/decidim-core/app/commands/decidim/delete_follow.rb +37 -0
  262. data/decidim-core/app/commands/decidim/invite_user.rb +1 -3
  263. data/decidim-core/app/commands/decidim/update_notifications_settings.rb +1 -2
  264. data/decidim-core/app/constraints/decidim/current_feature.rb +3 -4
  265. data/decidim-core/app/controllers/concerns/decidim/settings.rb +1 -1
  266. data/decidim-core/app/controllers/decidim/features/base_controller.rb +5 -6
  267. data/decidim-core/app/controllers/decidim/follows_controller.rb +45 -0
  268. data/decidim-core/app/controllers/decidim/notifications_controller.rb +39 -0
  269. data/decidim-core/app/controllers/decidim/pages_controller.rb +2 -2
  270. data/decidim-core/app/controllers/decidim/scopes_controller.rb +2 -0
  271. data/decidim-core/app/controllers/decidim/widgets_controller.rb +3 -3
  272. data/decidim-core/app/forms/decidim/follow_form.rb +20 -0
  273. data/decidim-core/app/forms/decidim/invite_user_form.rb +1 -1
  274. data/decidim-core/app/forms/decidim/notifications_settings_form.rb +2 -4
  275. data/decidim-core/app/helpers/decidim/action_authorization_helper.rb +2 -1
  276. data/decidim-core/app/helpers/decidim/decidim_form_helper.rb +4 -0
  277. data/decidim-core/app/helpers/decidim/feature_path_helper.rb +2 -13
  278. data/decidim-core/app/helpers/decidim/icon_helper.rb +26 -8
  279. data/decidim-core/app/helpers/decidim/paginate_helper.rb +1 -1
  280. data/decidim-core/app/helpers/decidim/scopes_helper.rb +1 -1
  281. data/decidim-core/app/jobs/decidim/email_notification_generator_job.rb +12 -0
  282. data/decidim-core/app/jobs/decidim/export_job.rb +1 -3
  283. data/decidim-core/app/jobs/decidim/notification_generator_for_recipient_job.rb +14 -0
  284. data/decidim-core/app/jobs/decidim/notification_generator_job.rb +12 -0
  285. data/decidim-core/app/mailers/decidim/export_mailer.rb +6 -7
  286. data/decidim-core/app/mailers/decidim/notification_mailer.rb +20 -0
  287. data/decidim-core/app/mailers/decidim/reported_mailer.rb +3 -3
  288. data/decidim-core/app/models/decidim/abilities/admin_ability.rb +0 -1
  289. data/decidim-core/app/models/decidim/abilities/base_ability.rb +8 -0
  290. data/decidim-core/app/models/decidim/abilities/everyone_ability.rb +0 -2
  291. data/decidim-core/app/models/decidim/abilities/participatory_process_admin_ability.rb +1 -1
  292. data/decidim-core/app/models/decidim/abilities/participatory_process_collaborator_ability.rb +1 -1
  293. data/decidim-core/app/models/decidim/category.rb +4 -4
  294. data/decidim-core/app/models/decidim/feature.rb +29 -4
  295. data/decidim-core/app/models/decidim/follow.rb +10 -0
  296. data/decidim-core/app/models/decidim/moderation.rb +1 -1
  297. data/decidim-core/app/models/decidim/notification.rb +12 -0
  298. data/decidim-core/app/models/decidim/scope.rb +8 -8
  299. data/decidim-core/app/models/decidim/user.rb +11 -1
  300. data/decidim-core/app/presenters/decidim/home_stats_presenter.rb +1 -1
  301. data/decidim-core/app/presenters/decidim/resource_locator_presenter.rb +3 -18
  302. data/decidim-core/app/queries/decidim/participatory_processes_with_user_role.rb +1 -1
  303. data/decidim-core/app/services/decidim/email_notification_generator.rb +63 -0
  304. data/decidim-core/app/services/decidim/events_manager.rb +41 -0
  305. data/decidim-core/app/services/decidim/notification_generator.rb +51 -0
  306. data/decidim-core/app/services/decidim/notification_generator_for_recipient.rb +50 -0
  307. data/decidim-core/app/uploaders/decidim/attachment_uploader.rb +1 -1
  308. data/decidim-core/app/views/decidim/authorizations/first_login.html.erb +2 -2
  309. data/decidim-core/app/views/decidim/follows/update_button.js.erb +3 -0
  310. data/decidim-core/app/views/decidim/notification_mailer/event_received.html.erb +9 -0
  311. data/decidim-core/app/views/decidim/notifications/_notification.html.erb +18 -0
  312. data/decidim-core/app/views/decidim/notifications/index.html.erb +32 -0
  313. data/decidim-core/app/views/decidim/notifications_settings/show.html.erb +3 -10
  314. data/decidim-core/app/views/decidim/shared/_follow_button.html.erb +19 -0
  315. data/decidim-core/app/views/layouts/decidim/_head.html.erb +1 -0
  316. data/decidim-core/app/views/layouts/decidim/_head_extra.html.erb +7 -0
  317. data/decidim-core/app/views/layouts/decidim/_user_menu.html.erb +1 -0
  318. data/decidim-core/app/views/layouts/decidim/_wrapper.html.erb +3 -0
  319. data/decidim-core/app/views/layouts/decidim/widget.html.erb +3 -3
  320. data/decidim-core/app/views/pages/home/_hero.html.erb +1 -1
  321. data/decidim-core/app/views/pages/home/_highlighted_processes.html.erb +3 -3
  322. data/decidim-core/config/locales/ca.yml +29 -74
  323. data/decidim-core/config/locales/en.yml +23 -71
  324. data/decidim-core/config/locales/es.yml +31 -78
  325. data/decidim-core/config/locales/eu.yml +61 -65
  326. data/decidim-core/config/locales/fi.yml +91 -51
  327. data/decidim-core/config/locales/fr.yml +40 -83
  328. data/decidim-core/config/locales/it.yml +129 -54
  329. data/decidim-core/config/locales/nl.yml +90 -51
  330. data/decidim-core/config/locales/pl.yml +319 -10
  331. data/decidim-core/config/locales/uk.yml +400 -0
  332. data/decidim-core/config/routes.rb +8 -14
  333. data/decidim-core/db/migrate/20170720120231_make_moderations_polymorphic.rb +29 -0
  334. data/decidim-core/db/migrate/20170726145242_make_categories_polymorphic.rb +27 -0
  335. data/decidim-core/db/migrate/20170807123535_create_decidim_follows.rb +20 -0
  336. data/decidim-core/db/migrate/20170808071019_create_decidim_notifications.rb +13 -0
  337. data/decidim-core/db/migrate/20170906091718_add_extra_to_notifications.rb +7 -0
  338. data/decidim-core/db/migrate/20170912082054_add_emails_on_notifications_flag_to_user.rb +7 -0
  339. data/decidim-core/db/migrate/20170913092351_add_header_snippets_to_organizations.rb +7 -0
  340. data/decidim-core/db/migrate/20170914075721_remove_followable_index_from_follows.rb +7 -0
  341. data/decidim-core/db/migrate/20170914092116_remove_comment_and_replies_notifications_from_users.rb +8 -0
  342. data/decidim-core/db/seeds.rb +2 -108
  343. data/decidim-core/decidim-core.gemspec +1 -0
  344. data/decidim-core/lib/decidim/core.rb +46 -8
  345. data/decidim-core/lib/decidim/core/engine.rb +20 -6
  346. data/decidim-core/lib/decidim/core/test.rb +3 -0
  347. data/decidim-core/lib/decidim/core/test/factories.rb +37 -75
  348. data/decidim-core/lib/decidim/core/test/shared_examples/comments_examples.rb +0 -26
  349. data/decidim-core/lib/decidim/core/test/shared_examples/follows_examples.rb +37 -0
  350. data/decidim-core/lib/decidim/core/test/shared_examples/manage_moderations_examples.rb +1 -1
  351. data/decidim-core/lib/decidim/core/test/shared_examples/process_announcements_examples.rb +1 -1
  352. data/decidim-core/lib/decidim/core/test/shared_examples/reportable.rb +4 -4
  353. data/decidim-core/lib/decidim/core/test/shared_examples/reports_examples.rb +1 -1
  354. data/decidim-core/lib/decidim/core/test/shared_examples/scope_helper_examples.rb +41 -0
  355. data/{decidim-comments/spec/shared/author_localised_email.rb → decidim-core/lib/decidim/core/test/shared_examples/user_localised_email_examples.rb} +0 -0
  356. data/decidim-core/lib/decidim/core/version.rb +1 -1
  357. data/decidim-core/lib/decidim/engine_router.rb +54 -0
  358. data/decidim-core/lib/decidim/events.rb +9 -0
  359. data/decidim-core/lib/decidim/events/base_event.rb +70 -0
  360. data/decidim-core/lib/decidim/events/email_event.rb +39 -0
  361. data/decidim-core/lib/decidim/events/notification_event.rb +32 -0
  362. data/decidim-core/lib/decidim/exporters.rb +7 -0
  363. data/decidim-core/lib/decidim/exporters/export_data.rb +14 -0
  364. data/decidim-core/lib/decidim/feature_manifest.rb +2 -2
  365. data/decidim-core/lib/decidim/features/namer.rb +1 -1
  366. data/decidim-core/lib/decidim/followable.rb +13 -0
  367. data/decidim-core/lib/decidim/form_builder.rb +1 -1
  368. data/decidim-core/lib/decidim/has_feature.rb +1 -1
  369. data/decidim-core/lib/decidim/has_settings.rb +19 -15
  370. data/decidim-core/lib/decidim/manifest_registry.rb +1 -3
  371. data/decidim-core/lib/decidim/participable.rb +80 -0
  372. data/decidim-core/lib/decidim/participatory_space_manifest.rb +40 -0
  373. data/decidim-core/lib/decidim/query_extensions.rb +1 -1
  374. data/decidim-core/lib/decidim/resource_manifest.rb +1 -1
  375. data/decidim-core/lib/decidim/settings_manifest.rb +0 -4
  376. data/decidim-core/spec/commands/decidim/create_registration_spec.rb +1 -3
  377. data/decidim-core/spec/commands/decidim/update_notifications_settings_spec.rb +3 -7
  378. data/decidim-core/spec/controllers/concerns/settings_spec.rb +12 -4
  379. data/decidim-core/spec/controllers/locales_controller_spec.rb +4 -0
  380. data/decidim-core/spec/controllers/pages_controller_spec.rb +1 -0
  381. data/decidim-core/spec/controllers/scopes_controller_spec.rb +4 -0
  382. data/decidim-core/spec/factories.rb +1 -0
  383. data/decidim-core/spec/features/account_spec.rb +0 -8
  384. data/decidim-core/spec/features/components_spec.rb +1 -1
  385. data/decidim-core/spec/features/homepage_spec.rb +9 -0
  386. data/decidim-core/spec/features/menu_spec.rb +2 -1
  387. data/decidim-core/spec/features/notifications_spec.rb +88 -0
  388. data/decidim-core/spec/forms/notifications_settings_form_spec.rb +4 -14
  389. data/decidim-core/spec/helpers/decidim/decidim_form_helper_spec.rb +3 -0
  390. data/decidim-core/spec/helpers/decidim/feature_path_helper_spec.rb +1 -1
  391. data/decidim-core/spec/jobs/decidim/email_notification_generator_job_spec.rb +34 -0
  392. data/decidim-core/spec/jobs/decidim/notification_generator_for_recipient_job_spec.rb +34 -0
  393. data/decidim-core/spec/jobs/decidim/notification_generator_job_spec.rb +34 -0
  394. data/decidim-core/spec/lib/events/base_event_spec.rb +13 -0
  395. data/decidim-core/spec/lib/events/email_event_spec.rb +17 -0
  396. data/decidim-core/spec/lib/events/notification_event_spec.rb +17 -0
  397. data/decidim-core/spec/lib/feature_manifest_spec.rb +1 -1
  398. data/decidim-core/spec/lib/features/current_feature_spec.rb +7 -29
  399. data/decidim-core/spec/lib/form_builder_spec.rb +4 -4
  400. data/decidim-core/spec/lib/resourceable_spec.rb +6 -6
  401. data/decidim-core/spec/lib/seed_spec.rb +2 -4
  402. data/decidim-core/spec/mailers/export_mailer_spec.rb +3 -3
  403. data/decidim-core/spec/mailers/reported_mailer_spec.rb +1 -1
  404. data/decidim-core/spec/models/decidim/abilities/admin_ability_spec.rb +0 -1
  405. data/decidim-core/spec/models/decidim/abilities/everyone_ability_spec.rb +1 -1
  406. data/decidim-core/spec/models/decidim/abilities/participatory_process_admin_ability_spec.rb +2 -7
  407. data/decidim-core/spec/models/decidim/abilities/participatory_process_collaborator_ability_spec.rb +2 -7
  408. data/decidim-core/spec/models/decidim/category_spec.rb +2 -2
  409. data/decidim-core/spec/models/decidim/follow_spec.rb +33 -0
  410. data/decidim-core/spec/models/decidim/scope_spec.rb +39 -4
  411. data/decidim-core/spec/models/notification_spec.rb +24 -0
  412. data/decidim-core/spec/presenters/decidim/resource_locator_presenter_spec.rb +1 -1
  413. data/decidim-core/spec/services/decidim/email_notification_generator_spec.rb +63 -0
  414. data/decidim-core/spec/services/decidim/events_manager_spec.rb +40 -0
  415. data/decidim-core/spec/services/decidim/notification_generator_for_recipient_spec.rb +26 -0
  416. data/decidim-core/spec/services/decidim/notification_generator_spec.rb +44 -0
  417. data/decidim-core/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.uk.js +14 -0
  418. data/decidim-core/vendor/assets/javascripts/morphdom.js +14 -5
  419. data/decidim-dev/config/locales/ca.yml +2 -1
  420. data/decidim-dev/config/locales/en.yml +2 -1
  421. data/decidim-dev/config/locales/es.yml +2 -1
  422. data/decidim-dev/config/locales/eu.yml +1 -1
  423. data/decidim-dev/config/locales/fi.yml +5 -1
  424. data/decidim-dev/config/locales/fr.yml +4 -0
  425. data/decidim-dev/config/locales/it.yml +1 -1
  426. data/decidim-dev/config/locales/nl.yml +4 -0
  427. data/decidim-dev/config/locales/pl.yml +4 -1
  428. data/decidim-dev/config/locales/uk.yml +9 -0
  429. data/decidim-dev/decidim-dev.gemspec +5 -7
  430. data/{decidim-core/spec/shared/with_promoted_participatory_processes_examples.rb → decidim-dev/lib/decidim/dev/test/promoted_participatory_processes_shared_examples.rb} +0 -0
  431. data/decidim-dev/lib/decidim/dev/test/rspec_support/feature.rb +6 -8
  432. data/decidim-dev/lib/decidim/dev/test/rspec_support/feature_context.rb +3 -3
  433. data/decidim-dev/lib/decidim/dev/test/spec_helper.rb +1 -0
  434. data/decidim-dev/lib/tasks/locale_checker.rake +11 -11
  435. data/decidim-meetings/app/assets/config/admin/decidim_meetings_manifest.js +1 -0
  436. data/decidim-meetings/app/assets/images/decidim/meetings/icon.svg +5 -1
  437. data/decidim-meetings/app/assets/javascripts/decidim/meetings/admin/registrations_form.js.es6 +21 -0
  438. data/decidim-meetings/app/commands/decidim/meetings/admin/close_meeting.rb +17 -9
  439. data/decidim-meetings/app/commands/decidim/meetings/admin/create_meeting.rb +13 -1
  440. data/decidim-meetings/app/commands/decidim/meetings/admin/update_meeting.rb +47 -21
  441. data/decidim-meetings/app/commands/decidim/meetings/admin/update_registrations.rb +60 -0
  442. data/decidim-meetings/app/commands/decidim/meetings/join_meeting.rb +73 -0
  443. data/decidim-meetings/app/commands/decidim/meetings/leave_meeting.rb +39 -0
  444. data/decidim-meetings/app/controllers/decidim/meetings/admin/registrations_controller.rb +43 -0
  445. data/decidim-meetings/app/controllers/decidim/meetings/registrations_controller.rb +46 -0
  446. data/decidim-meetings/app/events/decidim/meetings/close_meeting_event.rb +30 -0
  447. data/decidim-meetings/app/events/decidim/meetings/meeting_registrations_enabled_event.rb +39 -0
  448. data/decidim-meetings/app/events/decidim/meetings/meeting_registrations_over_percentage_event.rb +43 -0
  449. data/decidim-meetings/app/events/decidim/meetings/upcoming_meeting_event.rb +30 -0
  450. data/decidim-meetings/app/events/decidim/meetings/update_meeting_event.rb +30 -0
  451. data/decidim-meetings/app/forms/decidim/meetings/admin/meeting_form.rb +1 -1
  452. data/decidim-meetings/app/forms/decidim/meetings/admin/meeting_registrations_form.rb +32 -0
  453. data/decidim-meetings/app/helpers/decidim/meetings/application_helper.rb +1 -0
  454. data/decidim-meetings/app/jobs/decidim/meetings/upcoming_meeting_notification_job.rb +33 -0
  455. data/decidim-meetings/app/mailers/decidim/meetings/registration_mailer.rb +46 -0
  456. data/decidim-meetings/app/models/decidim/meetings/abilities/current_user_ability.rb +43 -0
  457. data/decidim-meetings/app/models/decidim/meetings/meeting.rb +42 -0
  458. data/decidim-meetings/app/models/decidim/meetings/registration.rb +13 -0
  459. data/decidim-meetings/app/serializers/decidim/meetings/registration_serializer.rb +18 -0
  460. data/decidim-meetings/app/views/decidim/meetings/admin/meetings/_form.html.erb +3 -3
  461. data/decidim-meetings/app/views/decidim/meetings/admin/meetings/index.html.erb +1 -0
  462. data/decidim-meetings/app/views/decidim/meetings/admin/registrations/_form.html.erb +33 -0
  463. data/decidim-meetings/app/views/decidim/meetings/admin/registrations/edit.html.erb +8 -0
  464. data/decidim-meetings/app/views/decidim/meetings/meetings/_filters.html.erb +2 -2
  465. data/decidim-meetings/app/views/decidim/meetings/meetings/_registration_confirm.html.erb +15 -0
  466. data/decidim-meetings/app/views/decidim/meetings/meetings/show.html.erb +15 -1
  467. data/decidim-meetings/app/views/decidim/meetings/registration_mailer/confirmation.html.erb +3 -0
  468. data/decidim-meetings/config/locales/ca.yml +74 -0
  469. data/decidim-meetings/config/locales/en.yml +72 -4
  470. data/decidim-meetings/config/locales/es.yml +75 -1
  471. data/decidim-meetings/config/locales/eu.yml +78 -3
  472. data/decidim-meetings/config/locales/fi.yml +84 -0
  473. data/decidim-meetings/config/locales/fr.yml +83 -8
  474. data/decidim-meetings/config/locales/it.yml +87 -0
  475. data/decidim-meetings/config/locales/nl.yml +169 -0
  476. data/decidim-meetings/config/locales/pl.yml +113 -0
  477. data/decidim-meetings/config/locales/uk.yml +178 -0
  478. data/decidim-meetings/db/migrate/20170810120836_add_registration_attributes_to_meetings.rb +9 -0
  479. data/decidim-meetings/db/migrate/20170810131100_create_registrations.rb +14 -0
  480. data/decidim-meetings/decidim-meetings.gemspec +2 -0
  481. data/decidim-meetings/lib/decidim/meetings/admin_engine.rb +9 -0
  482. data/decidim-meetings/lib/decidim/meetings/engine.rb +8 -0
  483. data/decidim-meetings/lib/decidim/meetings/feature.rb +39 -9
  484. data/decidim-meetings/lib/decidim/meetings/test/factories.rb +11 -0
  485. data/decidim-meetings/spec/commands/close_meeting_spec.rb +21 -2
  486. data/decidim-meetings/spec/commands/create_meeting_spec.rb +18 -3
  487. data/decidim-meetings/spec/commands/join_meeting_spec.rb +152 -0
  488. data/decidim-meetings/spec/commands/leave_meeting_spec.rb +34 -0
  489. data/decidim-meetings/spec/commands/update_meeting_spec.rb +122 -2
  490. data/decidim-meetings/spec/commands/update_registrations_spec.rb +79 -0
  491. data/decidim-meetings/spec/events/decidim/meetings/close_meeting_event_spec.rb +17 -0
  492. data/decidim-meetings/spec/events/decidim/meetings/meeting_registrations_enabled_event_spec.rb +17 -0
  493. data/decidim-meetings/spec/events/decidim/meetings/meeting_registrations_over_percentage_event_spec.rb +17 -0
  494. data/decidim-meetings/spec/events/decidim/meetings/upcoming_meeting_event_spec.rb +17 -0
  495. data/decidim-meetings/spec/events/decidim/meetings/update_meeting_event_spec.rb +17 -0
  496. data/decidim-meetings/spec/factories.rb +2 -0
  497. data/decidim-meetings/spec/features/admin_manages_meetings_spec.rb +1 -0
  498. data/decidim-meetings/spec/features/comments_spec.rb +22 -0
  499. data/decidim-meetings/spec/features/explore_meetings_spec.rb +3 -3
  500. data/decidim-meetings/spec/features/follow_meetings_spec.rb +13 -0
  501. data/decidim-meetings/spec/features/meeting_registrations_spec.rb +131 -0
  502. data/decidim-meetings/spec/features/process_admin_manages_meetings_spec.rb +1 -0
  503. data/decidim-meetings/spec/forms/close_meeting_form_spec.rb +1 -1
  504. data/decidim-meetings/spec/forms/meeting_form_spec.rb +2 -2
  505. data/decidim-meetings/spec/forms/meeting_registrations_form_spec.rb +78 -0
  506. data/decidim-meetings/spec/jobs/decidim/meetings/upcoming_meeting_notification_job_spec.rb +41 -0
  507. data/decidim-meetings/spec/mailers/registration_mailer_spec.rb +38 -0
  508. data/decidim-meetings/spec/models/meeting_spec.rb +8 -0
  509. data/decidim-meetings/spec/models/registration_spec.rb +21 -0
  510. data/decidim-meetings/spec/serializers/registration_serializer_spec.rb +23 -0
  511. data/decidim-meetings/spec/services/meeting_search_spec.rb +1 -1
  512. data/decidim-meetings/spec/shared/manage_meetings_examples.rb +1 -1
  513. data/decidim-meetings/spec/shared/manage_registrations_examples.rb +71 -0
  514. data/decidim-pages/app/assets/images/decidim/pages/icon.svg +8 -1
  515. data/decidim-pages/app/helpers/decidim/pages/application_helper.rb +0 -1
  516. data/decidim-pages/app/models/decidim/pages/page.rb +0 -26
  517. data/decidim-pages/app/views/decidim/pages/application/show.html.erb +0 -2
  518. data/decidim-pages/config/locales/ca.yml +3 -2
  519. data/decidim-pages/config/locales/en.yml +0 -2
  520. data/decidim-pages/config/locales/es.yml +3 -2
  521. data/decidim-pages/config/locales/eu.yml +3 -3
  522. data/decidim-pages/config/locales/fi.yml +3 -2
  523. data/decidim-pages/config/locales/fr.yml +3 -3
  524. data/decidim-pages/config/locales/it.yml +2 -2
  525. data/decidim-pages/config/locales/nl.yml +17 -0
  526. data/decidim-pages/config/locales/pl.yml +17 -0
  527. data/decidim-pages/config/locales/uk.yml +22 -0
  528. data/decidim-pages/decidim-pages.gemspec +1 -1
  529. data/decidim-pages/lib/decidim/pages/feature.rb +4 -15
  530. data/decidim-pages/spec/commands/update_page_spec.rb +1 -1
  531. data/decidim-pages/spec/factories.rb +3 -3
  532. data/decidim-pages/spec/features/admin_spec.rb +1 -1
  533. data/decidim-participatory_processes/.gitignore +3 -0
  534. data/decidim-participatory_processes/README.md +36 -0
  535. data/decidim-participatory_processes/Rakefile +3 -0
  536. data/decidim-participatory_processes/app/assets/config/admin/decidim_participatory_processes_manifest.js +1 -0
  537. data/decidim-participatory_processes/app/assets/config/decidim_participatory_processes_manifest.js +2 -0
  538. data/decidim-participatory_processes/app/assets/images/decidim/participatory_processes/process.svg +10 -0
  539. data/{decidim-admin/app/assets/javascripts/decidim → decidim-participatory_processes/app/assets/javascripts/decidim/participatory_processes}/admin/participatory_processes.js.es6 +1 -1
  540. data/decidim-participatory_processes/app/assets/javascripts/decidim/participatory_processes/filters.js.es6 +25 -0
  541. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/activate_participatory_process_step.rb +46 -0
  542. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/copy_participatory_process.rb +116 -0
  543. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/create_participatory_process.rb +82 -0
  544. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/create_participatory_process_admin.rb +95 -0
  545. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/create_participatory_process_group.rb +57 -0
  546. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/create_participatory_process_step.rb +49 -0
  547. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/deactivate_participatory_process_step.rb +38 -0
  548. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_step.rb +46 -0
  549. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/publish_participatory_process.rb +34 -0
  550. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/reorder_participatory_process_steps.rb +54 -0
  551. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/unpublish_participatory_process.rb +34 -0
  552. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/update_participatory_process.rb +77 -0
  553. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/update_participatory_process_admin.rb +43 -0
  554. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/update_participatory_process_group.rb +60 -0
  555. data/decidim-participatory_processes/app/commands/decidim/participatory_processes/admin/update_participatory_process_step.rb +51 -0
  556. data/decidim-participatory_processes/app/constraints/decidim/participatory_processes/current_feature.rb +28 -0
  557. data/decidim-participatory_processes/app/constraints/decidim/participatory_processes/current_participatory_process.rb +37 -0
  558. data/decidim-participatory_processes/app/controllers/concerns/decidim/participatory_processes/admin/participatory_process_context.rb +21 -0
  559. data/decidim-participatory_processes/app/controllers/concerns/decidim/participatory_processes/needs_participatory_process.rb +50 -0
  560. data/decidim-participatory_processes/app/controllers/concerns/decidim/participatory_processes/participatory_process_context.rb +27 -0
  561. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/application_controller.rb +11 -0
  562. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/categories_controller.rb +13 -0
  563. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/concerns/participatory_process_admin.rb +26 -0
  564. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/exports_controller.rb +14 -0
  565. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/feature_permissions_controller.rb +14 -0
  566. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/features_controller.rb +14 -0
  567. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/moderations_controller.rb +12 -0
  568. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/participatory_process_attachments_controller.rb +27 -0
  569. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/participatory_process_copies_controller.rb +35 -0
  570. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/participatory_process_groups_controller.rb +90 -0
  571. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/participatory_process_publications_controller.rb +45 -0
  572. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/participatory_process_step_activations_controller.rb +39 -0
  573. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/participatory_process_step_ordering_controller.rb +29 -0
  574. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/participatory_process_steps_controller.rb +91 -0
  575. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/participatory_process_user_roles_controller.rb +99 -0
  576. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/participatory_processes_controller.rb +102 -0
  577. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/participatory_process_groups_controller.rb +28 -0
  578. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb +20 -0
  579. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/participatory_process_widgets_controller.rb +21 -0
  580. data/decidim-participatory_processes/app/controllers/decidim/participatory_processes/participatory_processes_controller.rb +64 -0
  581. data/decidim-participatory_processes/app/forms/decidim/participatory_processes/admin/participatory_process_copy_form.rb +35 -0
  582. data/decidim-participatory_processes/app/forms/decidim/participatory_processes/admin/participatory_process_form.rb +72 -0
  583. data/decidim-participatory_processes/app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb +26 -0
  584. data/decidim-participatory_processes/app/forms/decidim/participatory_processes/admin/participatory_process_step_form.rb +37 -0
  585. data/decidim-participatory_processes/app/forms/decidim/participatory_processes/admin/participatory_process_user_role_form.rb +31 -0
  586. data/decidim-participatory_processes/app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb +23 -0
  587. data/decidim-participatory_processes/app/helpers/decidim/participatory_processes/admin/processes_for_select_helper.rb +25 -0
  588. data/decidim-participatory_processes/app/helpers/decidim/participatory_processes/participatory_process_helper.rb +19 -0
  589. data/decidim-participatory_processes/app/helpers/decidim/participatory_processes/participatory_process_steps_helper.rb +20 -0
  590. data/{decidim-core → decidim-participatory_processes}/app/models/decidim/participatory_process.rb +5 -4
  591. data/{decidim-core → decidim-participatory_processes}/app/models/decidim/participatory_process_group.rb +0 -0
  592. data/{decidim-core → decidim-participatory_processes}/app/models/decidim/participatory_process_step.rb +0 -0
  593. data/decidim-participatory_processes/app/models/decidim/participatory_processes/abilities/admin/admin_ability.rb +21 -0
  594. data/decidim-participatory_processes/app/models/decidim/participatory_processes/abilities/admin_ability.rb +16 -0
  595. data/decidim-participatory_processes/app/models/decidim/participatory_processes/abilities/everyone_ability.rb +19 -0
  596. data/decidim-participatory_processes/app/presenters/decidim/participatory_processes/participatory_process_stats_presenter.rb +52 -0
  597. data/decidim-participatory_processes/app/queries/decidim/participatory_processes/admin/admin_users.rb +46 -0
  598. data/decidim-participatory_processes/app/queries/decidim/participatory_processes/filtered_participatory_process_groups.rb +29 -0
  599. data/decidim-participatory_processes/app/queries/decidim/participatory_processes/filtered_participatory_processes.rb +26 -0
  600. data/decidim-participatory_processes/app/queries/decidim/participatory_processes/highlighted_participatory_processes.rb +12 -0
  601. data/decidim-participatory_processes/app/queries/decidim/participatory_processes/organization_participatory_process_groups.rb +16 -0
  602. data/decidim-participatory_processes/app/queries/decidim/participatory_processes/organization_participatory_processes.rb +16 -0
  603. data/decidim-participatory_processes/app/queries/decidim/participatory_processes/organization_prioritized_participatory_process_groups.rb +20 -0
  604. data/decidim-participatory_processes/app/queries/decidim/participatory_processes/organization_prioritized_participatory_processes.rb +22 -0
  605. data/decidim-participatory_processes/app/queries/decidim/participatory_processes/organization_published_participatory_processes.rb +19 -0
  606. data/decidim-participatory_processes/app/queries/decidim/participatory_processes/prioritized_participatory_processes.rb +13 -0
  607. data/decidim-participatory_processes/app/queries/decidim/participatory_processes/promoted_participatory_processes.rb +12 -0
  608. data/decidim-participatory_processes/app/queries/decidim/participatory_processes/published_participatory_processes.rb +12 -0
  609. data/{decidim-core → decidim-participatory_processes}/app/views/decidim/participatory_process_groups/_participatory_process_group.html.erb +0 -0
  610. data/{decidim-core → decidim-participatory_processes}/app/views/decidim/participatory_process_steps/_participatory_process_step.html.erb +0 -0
  611. data/decidim-participatory_processes/app/views/decidim/participatory_processes/_order_by_processes.html.erb +12 -0
  612. data/{decidim-core → decidim-participatory_processes}/app/views/decidim/participatory_processes/_participatory_process.html.erb +2 -2
  613. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_copies/_form.html.erb +0 -0
  614. data/decidim-participatory_processes/app/views/decidim/participatory_processes/admin/participatory_process_copies/new.html.erb +7 -0
  615. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_groups/_form.html.erb +0 -0
  616. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_groups/edit.html.erb +2 -2
  617. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_groups/index.html.erb +1 -1
  618. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_groups/new.html.erb +2 -2
  619. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_groups/show.html.erb +0 -0
  620. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_steps/_form.html.erb +0 -0
  621. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_steps/edit.html.erb +2 -2
  622. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_steps/index.html.erb +1 -1
  623. data/decidim-participatory_processes/app/views/decidim/participatory_processes/admin/participatory_process_steps/new.html.erb +7 -0
  624. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_steps/show.html.erb +0 -0
  625. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_user_roles/_form.html.erb +0 -0
  626. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_user_roles/edit.html.erb +2 -2
  627. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_process_user_roles/index.html.erb +1 -1
  628. data/decidim-participatory_processes/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/new.html.erb +7 -0
  629. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_processes/_form.html.erb +17 -11
  630. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_processes/edit.html.erb +1 -1
  631. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_processes/index.html.erb +4 -4
  632. data/{decidim-admin/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/admin/participatory_processes/new.html.erb +2 -2
  633. data/{decidim-core/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/participatory_process_groups/show.html.erb +3 -3
  634. data/{decidim-core/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/participatory_process_steps/_timeline.html.erb +0 -0
  635. data/{decidim-core/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/participatory_process_steps/index.html.erb +2 -2
  636. data/{decidim-core/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/participatory_process_widgets/show.html.erb +2 -2
  637. data/decidim-participatory_processes/app/views/decidim/participatory_processes/participatory_processes/_no_processes_yet.html.erb +3 -0
  638. data/{decidim-core/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/participatory_processes/_promoted_process.html.erb +3 -3
  639. data/{decidim-core/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/participatory_processes/_statistics.html.erb +1 -1
  640. data/{decidim-core/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/participatory_processes/index.html.erb +8 -3
  641. data/decidim-participatory_processes/app/views/decidim/participatory_processes/participatory_processes/index.js.erb +6 -0
  642. data/{decidim-core/app/views/decidim → decidim-participatory_processes/app/views/decidim/participatory_processes}/participatory_processes/show.html.erb +14 -7
  643. data/{decidim-core → decidim-participatory_processes}/app/views/layouts/decidim/_process_header.html.erb +4 -4
  644. data/{decidim-core → decidim-participatory_processes}/app/views/layouts/decidim/_process_header_steps.html.erb +2 -2
  645. data/{decidim-admin → decidim-participatory_processes}/app/views/layouts/decidim/admin/participatory_process.html.erb +14 -14
  646. data/{decidim-admin → decidim-participatory_processes}/app/views/layouts/decidim/admin/participatory_process_groups.html.erb +0 -0
  647. data/{decidim-admin → decidim-participatory_processes}/app/views/layouts/decidim/admin/participatory_processes.html.erb +0 -0
  648. data/{decidim-core → decidim-participatory_processes}/app/views/layouts/decidim/participatory_process.html.erb +0 -0
  649. data/decidim-participatory_processes/bin/rails +15 -0
  650. data/decidim-participatory_processes/config/locales/ca.yml +281 -0
  651. data/decidim-participatory_processes/config/locales/en.yml +281 -0
  652. data/decidim-participatory_processes/config/locales/es.yml +281 -0
  653. data/decidim-participatory_processes/config/locales/eu.yml +280 -0
  654. data/decidim-participatory_processes/config/locales/fi.yml +280 -0
  655. data/decidim-participatory_processes/config/locales/fr.yml +280 -0
  656. data/decidim-participatory_processes/config/locales/it.yml +280 -0
  657. data/decidim-participatory_processes/config/locales/nl.yml +280 -0
  658. data/decidim-participatory_processes/config/locales/pl.yml +281 -0
  659. data/decidim-participatory_processes/config/locales/uk.yml +282 -0
  660. data/{decidim-core → decidim-participatory_processes}/db/migrate/20161005130108_add_participatory_processes.rb +0 -0
  661. data/{decidim-core → decidim-participatory_processes}/db/migrate/20161010102356_translate_processes.rb +0 -0
  662. data/{decidim-core → decidim-participatory_processes}/db/migrate/20161011125616_add_hero_image_to_processes.rb +0 -0
  663. data/{decidim-core → decidim-participatory_processes}/db/migrate/20161011141033_add_banner_image_to_processes.rb +0 -0
  664. data/{decidim-core → decidim-participatory_processes}/db/migrate/20161013134732_add_promoted_flag_to_processes.rb +0 -0
  665. data/{decidim-core → decidim-participatory_processes}/db/migrate/20161017085822_add_participatory_process_steps.rb +0 -0
  666. data/{decidim-core → decidim-participatory_processes}/db/migrate/20161019072016_add_active_flag_to_step.rb +0 -0
  667. data/{decidim-core → decidim-participatory_processes}/db/migrate/20161020080756_add_position_to_steps.rb +0 -0
  668. data/{decidim-core → decidim-participatory_processes}/db/migrate/20161025125300_add_published_at_to_processes.rb +0 -0
  669. data/{decidim-core → decidim-participatory_processes}/db/migrate/20161107152228_remove_not_null_on_step_position.rb +0 -0
  670. data/{decidim-core → decidim-participatory_processes}/db/migrate/20161110092735_add_index_for_process_slug_organization.rb +0 -0
  671. data/{decidim-core → decidim-participatory_processes}/db/migrate/20161116115156_create_attachments.rb +0 -0
  672. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170116135237_loosen_step_requirements.rb +0 -0
  673. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170123134023_make_attachments_polymorphic.rb +0 -0
  674. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170125135937_rename_attachable_to_attached_to.rb +0 -0
  675. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170126151123_add_extra_info_to_processes.rb +0 -0
  676. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170206083118_rename_extra_info_on_processes.rb +0 -0
  677. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170220110740_remove_steps_short_description.rb +0 -0
  678. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170221094835_add_scopes_to_processes.rb +0 -0
  679. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170228142440_add_participatory_process_groups.rb +0 -0
  680. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170404132616_change_steps_end_and_start_date_to_date.rb +0 -0
  681. data/decidim-participatory_processes/db/migrate/20170720120135_make_features_polymorphic.rb +27 -0
  682. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170725085104_add_show_statistics_to_participatory_processes.rb +0 -0
  683. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170804125402_attachment_description_nullable.rb +0 -0
  684. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170808080905_add_announcement_to_participatory_processes.rb +0 -0
  685. data/{decidim-core → decidim-participatory_processes}/db/migrate/20170809084005_add_scopes_enabled_to_participatory_processes.rb +0 -0
  686. data/decidim-participatory_processes/db/migrate/20170830081725_add_start_date_to_processes.rb +8 -0
  687. data/decidim-participatory_processes/db/seeds/Exampledocument.pdf +0 -0
  688. data/decidim-participatory_processes/db/seeds/city.jpeg +0 -0
  689. data/decidim-participatory_processes/db/seeds/city2.jpeg +0 -0
  690. data/decidim-participatory_processes/db/seeds/homepage_image.jpg +0 -0
  691. data/decidim-participatory_processes/decidim-participatory_processes.gemspec +21 -0
  692. data/decidim-participatory_processes/lib/decidim/participatory_processes.rb +12 -0
  693. data/decidim-participatory_processes/lib/decidim/participatory_processes/admin.rb +10 -0
  694. data/decidim-participatory_processes/lib/decidim/participatory_processes/admin_engine.rb +98 -0
  695. data/decidim-participatory_processes/lib/decidim/participatory_processes/engine.rb +55 -0
  696. data/decidim-participatory_processes/lib/decidim/participatory_processes/participatory_space.rb +118 -0
  697. data/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb +97 -0
  698. data/{decidim-admin → decidim-participatory_processes}/spec/commands/activate_participatory_process_step_spec.rb +1 -1
  699. data/{decidim-admin → decidim-participatory_processes}/spec/commands/copy_participatory_process_spec.rb +7 -7
  700. data/decidim-participatory_processes/spec/commands/create_category_spec.rb +10 -0
  701. data/{decidim-admin → decidim-participatory_processes}/spec/commands/create_participatory_process_admin_spec.rb +1 -1
  702. data/{decidim-admin → decidim-participatory_processes}/spec/commands/create_participatory_process_spec.rb +4 -2
  703. data/{decidim-admin → decidim-participatory_processes}/spec/commands/create_participatory_process_step_spec.rb +2 -2
  704. data/{decidim-admin → decidim-participatory_processes}/spec/commands/deactivate_participatory_process_step_spec.rb +1 -1
  705. data/decidim-participatory_processes/spec/commands/destroy_category_spec.rb +10 -0
  706. data/{decidim-admin → decidim-participatory_processes}/spec/commands/destroy_participatory_process_step_spec.rb +2 -2
  707. data/{decidim-admin → decidim-participatory_processes}/spec/commands/publish_participatory_process_spec.rb +1 -1
  708. data/{decidim-admin → decidim-participatory_processes}/spec/commands/reorder_participatory_process_steps_spec.rb +1 -1
  709. data/{decidim-admin → decidim-participatory_processes}/spec/commands/unpublish_participatory_process_spec.rb +1 -1
  710. data/decidim-participatory_processes/spec/commands/update_category_spec.rb +10 -0
  711. data/decidim-participatory_processes/spec/commands/update_participatory_process_spec.rb +121 -0
  712. data/decidim-participatory_processes/spec/controllers/exports_controller_spec.rb +53 -0
  713. data/decidim-participatory_processes/spec/controllers/participatory_processes_controller_spec.rb +122 -0
  714. data/decidim-participatory_processes/spec/factories.rb +6 -0
  715. data/{decidim-admin/spec/features → decidim-participatory_processes/spec/features/admin}/admin_copy_participatory_process_spec.rb +3 -3
  716. data/{decidim-admin/spec/features → decidim-participatory_processes/spec/features/admin}/admin_manages_participatory_process_admins_spec.rb +0 -0
  717. data/{decidim-admin/spec/features → decidim-participatory_processes/spec/features/admin}/admin_manages_participatory_process_attachments_spec.rb +0 -0
  718. data/{decidim-admin/spec/features → decidim-participatory_processes/spec/features/admin}/admin_manages_participatory_process_categories_spec.rb +1 -1
  719. data/decidim-participatory_processes/spec/features/admin/admin_manages_participatory_process_feature_permissions_spec.rb +14 -0
  720. data/{decidim-admin/spec/features/admin_manages_features_spec.rb → decidim-participatory_processes/spec/features/admin/admin_manages_participatory_process_features_spec.rb} +83 -51
  721. data/{decidim-admin/spec/features → decidim-participatory_processes/spec/features/admin}/admin_manages_participatory_process_groups_spec.rb +1 -1
  722. data/{decidim-admin/spec/features → decidim-participatory_processes/spec/features/admin}/admin_manages_participatory_process_steps_spec.rb +0 -0
  723. data/decidim-participatory_processes/spec/features/admin/admin_manages_participatory_processes_spec.rb +119 -0
  724. data/{decidim-admin/spec/features → decidim-participatory_processes/spec/features/admin}/admin_manages_user_groups_spec.rb +0 -0
  725. data/{decidim-admin/spec/features → decidim-participatory_processes/spec/features/admin}/participatory_process_admin_manages_participatory_process_admins_spec.rb +1 -1
  726. data/{decidim-admin/spec/features → decidim-participatory_processes/spec/features/admin}/participatory_process_admin_manages_participatory_process_attachments_spec.rb +0 -0
  727. data/{decidim-admin/spec/features → decidim-participatory_processes/spec/features/admin}/participatory_process_admin_manages_participatory_process_categories_spec.rb +1 -1
  728. data/{decidim-admin/spec/features → decidim-participatory_processes/spec/features/admin}/participatory_process_admin_manages_participatory_process_steps_spec.rb +0 -0
  729. data/{decidim-admin/spec/features → decidim-participatory_processes/spec/features/admin}/participatory_process_admin_manages_participatory_processes_spec.rb +2 -2
  730. data/{decidim-core → decidim-participatory_processes}/spec/features/participatory_process_groups_spec.rb +9 -10
  731. data/{decidim-core → decidim-participatory_processes}/spec/features/participatory_process_steps_spec.rb +1 -1
  732. data/{decidim-core → decidim-participatory_processes}/spec/features/participatory_processes_spec.rb +50 -8
  733. data/decidim-participatory_processes/spec/forms/category_form_spec.rb +16 -0
  734. data/decidim-participatory_processes/spec/forms/participatory_process_form_spec.rb +167 -0
  735. data/decidim-participatory_processes/spec/forms/participatory_process_group_form_spec.rb +84 -0
  736. data/decidim-participatory_processes/spec/forms/participatory_process_step_form_spec.rb +106 -0
  737. data/decidim-participatory_processes/spec/forms/participatory_process_user_role_form_spec.rb +36 -0
  738. data/decidim-participatory_processes/spec/helpers/decidim/participatory_processes/participatory_process_helper_spec.rb +43 -0
  739. data/decidim-participatory_processes/spec/helpers/decidim/scopes_helper_spec.rb +16 -0
  740. data/decidim-participatory_processes/spec/lib/features/participatory_processes/current_feature_spec.rb +90 -0
  741. data/decidim-participatory_processes/spec/models/abilities/admin/admin_ability_spec.rb +12 -0
  742. data/decidim-participatory_processes/spec/models/abilities/admin_ability_spec.rb +12 -0
  743. data/decidim-participatory_processes/spec/models/abilities/everyone_ability_spec.rb +13 -0
  744. data/{decidim-core → decidim-participatory_processes}/spec/models/decidim/participatory_process_spec.rb +0 -0
  745. data/{decidim-core → decidim-participatory_processes}/spec/models/decidim/participatory_process_step_spec.rb +0 -0
  746. data/{decidim-core/spec/presenters/decidim → decidim-participatory_processes/spec/presenters/decidim/participatory_processes}/participatory_process_stats_presenter.spec.rb +3 -3
  747. data/{decidim-admin/spec/queries → decidim-participatory_processes/spec/queries/admin}/process_admins_spec.rb +1 -1
  748. data/{decidim-core/spec/queries/decidim → decidim-participatory_processes/spec/queries}/organization_participatory_process_groups_spec.rb +1 -1
  749. data/{decidim-core/spec/queries/decidim → decidim-participatory_processes/spec/queries}/organization_participatory_processes_spec.rb +1 -1
  750. data/{decidim-core/spec/queries/decidim → decidim-participatory_processes/spec/queries}/organization_prioritized_participatory_processes_spec.rb +1 -1
  751. data/{decidim-core/spec/queries/decidim → decidim-participatory_processes/spec/queries}/organization_published_participatory_processes_spec.rb +1 -1
  752. data/{decidim-core/spec/queries/decidim → decidim-participatory_processes/spec/queries}/participatory_processes_with_user_role_spec.rb +0 -0
  753. data/{decidim-admin → decidim-participatory_processes}/spec/shared/manage_process_admins_examples.rb +13 -5
  754. data/{decidim-admin → decidim-participatory_processes}/spec/shared/manage_process_attachments_examples.rb +1 -1
  755. data/{decidim-admin → decidim-participatory_processes}/spec/shared/manage_process_categories_examples.rb +5 -5
  756. data/{decidim-admin → decidim-participatory_processes}/spec/shared/manage_process_steps_examples.rb +1 -1
  757. data/{decidim-admin → decidim-participatory_processes}/spec/shared/manage_processes_examples.rb +5 -5
  758. data/{decidim-admin → decidim-participatory_processes}/spec/shared/participatory_process_administration_by_admin_shared_context.rb +0 -0
  759. data/{decidim-admin → decidim-participatory_processes}/spec/shared/participatory_process_administration_by_process_admin_shared_context.rb +0 -0
  760. data/{decidim-admin → decidim-participatory_processes}/spec/shared/participatory_process_administration_shared_context.rb +0 -0
  761. data/decidim-participatory_processes/spec/spec_helper.rb +9 -0
  762. data/decidim-proposals/app/assets/images/decidim/proposals/icon.svg +3 -1
  763. data/decidim-proposals/app/forms/decidim/proposals/admin/proposal_form.rb +1 -1
  764. data/decidim-proposals/app/forms/decidim/proposals/proposal_form.rb +1 -1
  765. data/decidim-proposals/app/models/decidim/proposals/abilities/participatory_process_admin_ability.rb +2 -2
  766. data/decidim-proposals/app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb +1 -1
  767. data/decidim-proposals/app/models/decidim/proposals/proposal.rb +8 -15
  768. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/_form.html.erb +2 -2
  769. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb +7 -3
  770. data/decidim-proposals/app/views/decidim/proposals/proposals/_filters.html.erb +2 -2
  771. data/decidim-proposals/app/views/decidim/proposals/proposals/new.html.erb +2 -2
  772. data/decidim-proposals/app/views/decidim/proposals/proposals/show.html.erb +2 -1
  773. data/decidim-proposals/config/locales/ca.yml +8 -2
  774. data/decidim-proposals/config/locales/en.yml +3 -6
  775. data/decidim-proposals/config/locales/es.yml +8 -2
  776. data/decidim-proposals/config/locales/eu.yml +26 -9
  777. data/decidim-proposals/config/locales/fi.yml +32 -2
  778. data/decidim-proposals/config/locales/fr.yml +35 -15
  779. data/decidim-proposals/config/locales/it.yml +20 -2
  780. data/decidim-proposals/config/locales/nl.yml +160 -0
  781. data/decidim-proposals/config/locales/pl.yml +163 -0
  782. data/decidim-proposals/config/locales/uk.yml +171 -0
  783. data/decidim-proposals/db/migrate/20170307085300_migrate_proposal_reports_data_to_reports.rb +1 -1
  784. data/decidim-proposals/decidim-proposals.gemspec +1 -0
  785. data/decidim-proposals/lib/decidim/proposals/feature.rb +19 -17
  786. data/decidim-proposals/lib/decidim/proposals/test/factories.rb +6 -6
  787. data/decidim-proposals/spec/controllers/decidim/admin/proposal_answers_controller_spec.rb +1 -1
  788. data/decidim-proposals/spec/controllers/decidim/proposal_votes_controller_spec.rb +1 -2
  789. data/decidim-proposals/spec/controllers/decidim/proposals_controller_spec.rb +1 -2
  790. data/decidim-proposals/spec/factories.rb +1 -0
  791. data/decidim-proposals/spec/features/follow_proposals_spec.rb +13 -0
  792. data/decidim-proposals/spec/features/proposals_spec.rb +16 -16
  793. data/decidim-proposals/spec/features/report_proposal_spec.rb +1 -1
  794. data/decidim-proposals/spec/features/vote_proposal_spec.rb +4 -4
  795. data/decidim-proposals/spec/models/decidim/proposals/abilities/participatory_process_admin_ability.rb +1 -1
  796. data/decidim-proposals/spec/models/decidim/proposals/proposal_spec.rb +20 -43
  797. data/decidim-proposals/spec/queries/decidim/proposals/filtered_proposals_spec.rb +2 -2
  798. data/decidim-proposals/spec/services/decidim/proposals/proposal_search_spec.rb +3 -3
  799. data/decidim-proposals/spec/services/decidim/proposals/proposal_serializer_spec.rb +4 -4
  800. data/decidim-proposals/spec/shared/manage_proposals_examples.rb +45 -16
  801. data/decidim-proposals/spec/shared/proposal_form_examples.rb +1 -1
  802. data/decidim-proposals/spec/shared/proposals_help_texts_examples.rb +8 -2
  803. data/decidim-results/app/assets/images/decidim/results/icon.svg +3 -1
  804. data/decidim-results/app/forms/decidim/results/admin/result_form.rb +1 -1
  805. data/decidim-results/app/models/decidim/results/result.rb +5 -9
  806. data/decidim-results/app/views/decidim/results/admin/results/_form.html.erb +3 -3
  807. data/decidim-results/app/views/decidim/results/results/_filters.html.erb +1 -1
  808. data/decidim-results/app/views/decidim/results/results/show.html.erb +1 -0
  809. data/decidim-results/config/locales/ca.yml +3 -2
  810. data/decidim-results/config/locales/en.yml +0 -2
  811. data/decidim-results/config/locales/es.yml +4 -3
  812. data/decidim-results/config/locales/eu.yml +5 -4
  813. data/decidim-results/config/locales/fi.yml +8 -2
  814. data/decidim-results/config/locales/fr.yml +5 -4
  815. data/decidim-results/config/locales/it.yml +4 -2
  816. data/decidim-results/config/locales/nl.yml +75 -0
  817. data/decidim-results/config/locales/pl.yml +76 -0
  818. data/decidim-results/config/locales/uk.yml +82 -0
  819. data/decidim-results/decidim-results.gemspec +1 -0
  820. data/decidim-results/lib/decidim/results/feature.rb +5 -5
  821. data/decidim-results/lib/decidim/results/test/factories.rb +2 -2
  822. data/decidim-results/spec/commands/create_result_spec.rb +4 -4
  823. data/decidim-results/spec/commands/update_result_spec.rb +4 -4
  824. data/decidim-results/spec/factories.rb +1 -0
  825. data/decidim-results/spec/features/comments_spec.rb +2 -2
  826. data/decidim-results/spec/features/explore_results_spec.rb +3 -3
  827. data/decidim-results/spec/features/follow_result_spec.rb +13 -0
  828. data/decidim-results/spec/forms/result_form_spec.rb +3 -3
  829. data/decidim-results/spec/models/result_spec.rb +20 -0
  830. data/decidim-results/spec/queries/decidim/results/filtered_results_spec.rb +2 -2
  831. data/decidim-results/spec/services/result_search_spec.rb +1 -1
  832. data/decidim-results/spec/services/result_stats_calculator_spec.rb +4 -4
  833. data/decidim-surveys/app/assets/images/decidim/surveys/icon.svg +8 -1
  834. data/decidim-surveys/app/helpers/decidim/surveys/admin/application_helper.rb +0 -4
  835. data/decidim-surveys/app/models/decidim/surveys/abilities/participatory_process_admin_ability.rb +1 -1
  836. data/decidim-surveys/app/views/decidim/surveys/admin/surveys/_question.html.erb +8 -1
  837. data/decidim-surveys/config/locales/ca.yml +4 -3
  838. data/decidim-surveys/config/locales/en.yml +3 -9
  839. data/decidim-surveys/config/locales/es.yml +4 -3
  840. data/decidim-surveys/config/locales/eu.yml +1 -3
  841. data/decidim-surveys/config/locales/fi.yml +64 -0
  842. data/decidim-surveys/config/locales/fr.yml +5 -4
  843. data/decidim-surveys/config/locales/it.yml +64 -0
  844. data/decidim-surveys/config/locales/nl.yml +64 -0
  845. data/decidim-surveys/config/locales/pl.yml +64 -0
  846. data/decidim-surveys/config/locales/uk.yml +69 -0
  847. data/decidim-surveys/decidim-surveys.gemspec +1 -0
  848. data/decidim-surveys/lib/decidim/surveys/admin_engine.rb +1 -1
  849. data/decidim-surveys/lib/decidim/surveys/feature.rb +3 -3
  850. data/decidim-surveys/lib/decidim/surveys/test/factories.rb +2 -2
  851. data/decidim-surveys/spec/commands/decidim/surveys/admin/update_survey_spec.rb +1 -1
  852. data/decidim-surveys/spec/commands/decidim/surveys/answer_survey_spec.rb +1 -1
  853. data/decidim-surveys/spec/factories.rb +1 -0
  854. data/decidim-surveys/spec/features/survey_spec.rb +1 -1
  855. data/decidim-surveys/spec/forms/decidim/surveys/survey_answer_form_spec.rb +1 -1
  856. data/decidim-surveys/spec/models/decidim/surveys/abilities/current_user_ability_spec.rb +1 -1
  857. data/decidim-surveys/spec/models/decidim/surveys/survey_answer_spec.rb +1 -1
  858. data/decidim-surveys/spec/models/decidim/surveys/survey_spec.rb +1 -1
  859. data/decidim-system/app/forms/decidim/system/register_organization_form.rb +1 -1
  860. data/decidim-system/app/views/decidim/system/organizations/new.html.erb +1 -0
  861. data/decidim-system/config/locales/ca.yml +3 -3
  862. data/decidim-system/config/locales/en.yml +2 -3
  863. data/decidim-system/config/locales/es.yml +4 -4
  864. data/decidim-system/config/locales/eu.yml +6 -7
  865. data/decidim-system/config/locales/fi.yml +9 -3
  866. data/decidim-system/config/locales/fr.yml +11 -8
  867. data/decidim-system/config/locales/it.yml +8 -3
  868. data/decidim-system/config/locales/nl.yml +66 -0
  869. data/decidim-system/config/locales/pl.yml +66 -0
  870. data/decidim-system/config/locales/uk.yml +71 -0
  871. data/decidim-system/decidim-system.gemspec +1 -1
  872. data/decidim.gemspec +1 -0
  873. data/docs/create_followers_from_comment_authors.md +12 -0
  874. data/docs/create_followers_from_resource_authors.md +19 -0
  875. data/docs/how_to_create_a_plugin.md +2 -2
  876. data/lib/decidim.rb +9 -0
  877. data/lib/generators/decidim/app_generator.rb +11 -5
  878. data/lib/generators/decidim/install_generator.rb +1 -1
  879. data/lib/generators/decidim/templates/Dockerfile.erb +1 -1
  880. data/lib/generators/decidim/templates/Gemfile.erb +30 -29
  881. data/lib/generators/decidim/templates/database.yml.erb +2 -0
  882. data/package-lock.json +1 -1
  883. data/package.json +1 -1
  884. data/spec/generator_spec.rb +31 -0
  885. data/{decidim-dev/lib/decidim/dev/test/i18n_shared_examples.rb → spec/i18n_spec.rb} +2 -2
  886. metadata +512 -236
  887. data/decidim-admin/app/commands/decidim/admin/activate_participatory_process_step.rb +0 -44
  888. data/decidim-admin/app/commands/decidim/admin/copy_participatory_process.rb +0 -113
  889. data/decidim-admin/app/commands/decidim/admin/create_participatory_process.rb +0 -78
  890. data/decidim-admin/app/commands/decidim/admin/create_participatory_process_admin.rb +0 -93
  891. data/decidim-admin/app/commands/decidim/admin/create_participatory_process_group.rb +0 -55
  892. data/decidim-admin/app/commands/decidim/admin/create_participatory_process_step.rb +0 -47
  893. data/decidim-admin/app/commands/decidim/admin/deactivate_participatory_process_step.rb +0 -36
  894. data/decidim-admin/app/commands/decidim/admin/destroy_participatory_process_step.rb +0 -44
  895. data/decidim-admin/app/commands/decidim/admin/publish_participatory_process.rb +0 -32
  896. data/decidim-admin/app/commands/decidim/admin/reorder_participatory_process_steps.rb +0 -52
  897. data/decidim-admin/app/commands/decidim/admin/unpublish_participatory_process.rb +0 -32
  898. data/decidim-admin/app/commands/decidim/admin/update_participatory_process.rb +0 -74
  899. data/decidim-admin/app/commands/decidim/admin/update_participatory_process_admin.rb +0 -41
  900. data/decidim-admin/app/commands/decidim/admin/update_participatory_process_group.rb +0 -58
  901. data/decidim-admin/app/commands/decidim/admin/update_participatory_process_step.rb +0 -49
  902. data/decidim-admin/app/controllers/decidim/admin/concerns/participatory_process_admin.rb +0 -20
  903. data/decidim-admin/app/controllers/decidim/admin/participatory_process_attachments_controller.rb +0 -25
  904. data/decidim-admin/app/controllers/decidim/admin/participatory_process_copies_controller.rb +0 -33
  905. data/decidim-admin/app/controllers/decidim/admin/participatory_process_groups_controller.rb +0 -86
  906. data/decidim-admin/app/controllers/decidim/admin/participatory_process_publications_controller.rb +0 -43
  907. data/decidim-admin/app/controllers/decidim/admin/participatory_process_step_activations_controller.rb +0 -37
  908. data/decidim-admin/app/controllers/decidim/admin/participatory_process_step_ordering_controller.rb +0 -27
  909. data/decidim-admin/app/controllers/decidim/admin/participatory_process_steps_controller.rb +0 -89
  910. data/decidim-admin/app/controllers/decidim/admin/participatory_process_user_roles_controller.rb +0 -97
  911. data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +0 -96
  912. data/decidim-admin/app/forms/decidim/admin/participatory_process_copy_form.rb +0 -33
  913. data/decidim-admin/app/forms/decidim/admin/participatory_process_form.rb +0 -69
  914. data/decidim-admin/app/forms/decidim/admin/participatory_process_group_form.rb +0 -24
  915. data/decidim-admin/app/forms/decidim/admin/participatory_process_step_form.rb +0 -35
  916. data/decidim-admin/app/forms/decidim/admin/participatory_process_user_role_form.rb +0 -29
  917. data/decidim-admin/app/helpers/decidim/admin/process_groups_for_select_helper.rb +0 -21
  918. data/decidim-admin/app/helpers/decidim/admin/processes_for_select_helper.rb +0 -23
  919. data/decidim-admin/app/queries/decidim/admin/process_admins.rb +0 -44
  920. data/decidim-admin/app/views/decidim/admin/participatory_process_copies/new.html.erb +0 -7
  921. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/new.html.erb +0 -7
  922. data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/new.html.erb +0 -7
  923. data/decidim-admin/config/i18n-tasks.yml +0 -132
  924. data/decidim-admin/spec/commands/update_participatory_process_spec.rb +0 -119
  925. data/decidim-admin/spec/controllers/exports_controller_spec.rb +0 -51
  926. data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +0 -115
  927. data/decidim-admin/spec/forms/participatory_process_form_spec.rb +0 -165
  928. data/decidim-admin/spec/forms/participatory_process_group_form_spec.rb +0 -82
  929. data/decidim-admin/spec/forms/participatory_process_step_form_spec.rb +0 -104
  930. data/decidim-admin/spec/forms/participatory_process_user_role_form_spec.rb +0 -34
  931. data/decidim-admin/spec/i18n_spec.rb +0 -7
  932. data/decidim-api/spec/i18n_spec.rb +0 -7
  933. data/decidim-budgets/config/i18n-tasks.yml +0 -12
  934. data/decidim-budgets/spec/i18n_spec.rb +0 -7
  935. data/decidim-comments/app/mailers/decidim/comments/comment_notification_mailer.rb +0 -44
  936. data/decidim-comments/app/views/decidim/comments/comment_notification_mailer/comment_created.html.erb +0 -18
  937. data/decidim-comments/app/views/decidim/comments/comment_notification_mailer/reply_created.html.erb +0 -18
  938. data/decidim-comments/config/i18n-tasks.yml +0 -123
  939. data/decidim-comments/spec/features/notifications_spec.rb +0 -36
  940. data/decidim-comments/spec/i18n_spec.rb +0 -7
  941. data/decidim-comments/spec/mailers/comment_notification_mailer_spec.rb +0 -43
  942. data/decidim-core/app/assets/images/decidim/process.svg +0 -10
  943. data/decidim-core/app/constraints/decidim/current_participatory_process.rb +0 -35
  944. data/decidim-core/app/controllers/concerns/decidim/needs_participatory_process.rb +0 -46
  945. data/decidim-core/app/controllers/decidim/participatory_process_groups_controller.rb +0 -26
  946. data/decidim-core/app/controllers/decidim/participatory_process_steps_controller.rb +0 -18
  947. data/decidim-core/app/controllers/decidim/participatory_process_widgets_controller.rb +0 -19
  948. data/decidim-core/app/controllers/decidim/participatory_processes_controller.rb +0 -49
  949. data/decidim-core/app/helpers/decidim/participatory_process_helper.rb +0 -17
  950. data/decidim-core/app/helpers/decidim/participatory_process_steps_helper.rb +0 -18
  951. data/decidim-core/app/presenters/decidim/participatory_process_stats_presenter.rb +0 -50
  952. data/decidim-core/app/queries/decidim/highlighted_participatory_processes.rb +0 -10
  953. data/decidim-core/app/queries/decidim/organization_participatory_process_groups.rb +0 -14
  954. data/decidim-core/app/queries/decidim/organization_participatory_processes.rb +0 -14
  955. data/decidim-core/app/queries/decidim/organization_prioritized_participatory_processes.rb +0 -18
  956. data/decidim-core/app/queries/decidim/organization_published_participatory_processes.rb +0 -17
  957. data/decidim-core/app/queries/decidim/prioritized_participatory_processes.rb +0 -11
  958. data/decidim-core/app/queries/decidim/promoted_participatory_processes.rb +0 -10
  959. data/decidim-core/app/queries/decidim/published_participatory_processes.rb +0 -10
  960. data/decidim-core/app/views/decidim/participatory_processes/_no_processes_yet.html.erb +0 -3
  961. data/decidim-core/app/views/decidim/participatory_processes/_order_by_processes.html.erb +0 -3
  962. data/decidim-core/lib/decidim/notifiable.rb +0 -22
  963. data/decidim-core/spec/controllers/participatory_processes_controller_spec.rb +0 -117
  964. data/decidim-core/spec/helpers/decidim/participatory_process_helper_spec.rb +0 -41
  965. data/decidim-core/spec/helpers/decidim/scopes_helper_spec.rb +0 -40
  966. data/decidim-core/spec/i18n_spec.rb +0 -7
  967. data/decidim-dev/config/i18n-tasks.yml +0 -6
  968. data/decidim-dev/spec/i18n_spec.rb +0 -7
  969. data/decidim-meetings/config/i18n-tasks.yml +0 -10
  970. data/decidim-meetings/spec/i18n_spec.rb +0 -7
  971. data/decidim-pages/config/i18n-tasks.yml +0 -6
  972. data/decidim-pages/spec/features/comments_spec.rb +0 -11
  973. data/decidim-pages/spec/i18n_spec.rb +0 -7
  974. data/decidim-proposals/config/i18n-tasks.yml +0 -15
  975. data/decidim-proposals/spec/i18n_spec.rb +0 -7
  976. data/decidim-results/config/i18n-tasks.yml +0 -11
  977. data/decidim-results/spec/i18n_spec.rb +0 -7
  978. data/decidim-surveys/config/i18n-tasks.yml +0 -9
  979. data/decidim-system/config/i18n-tasks.yml +0 -122
  980. data/decidim-system/spec/i18n_spec.rb +0 -7
@@ -2,7 +2,7 @@
2
2
 
3
3
  require "spec_helper"
4
4
 
5
- describe Decidim::OrganizationParticipatoryProcessGroups do
5
+ describe Decidim::ParticipatoryProcesses::OrganizationParticipatoryProcessGroups do
6
6
  subject { described_class.new(organization) }
7
7
 
8
8
  let!(:organization) { create(:organization) }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require "spec_helper"
4
4
 
5
- describe Decidim::OrganizationParticipatoryProcesses do
5
+ describe Decidim::ParticipatoryProcesses::OrganizationParticipatoryProcesses do
6
6
  subject { described_class.new(organization) }
7
7
 
8
8
  let!(:organization) { create(:organization) }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require "spec_helper"
4
4
 
5
- describe Decidim::OrganizationPrioritizedParticipatoryProcesses do
5
+ describe Decidim::ParticipatoryProcesses::OrganizationPrioritizedParticipatoryProcesses do
6
6
  subject { described_class.new(organization) }
7
7
 
8
8
  let!(:organization) { create(:organization) }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require "spec_helper"
4
4
 
5
- describe Decidim::OrganizationPublishedParticipatoryProcesses do
5
+ describe Decidim::ParticipatoryProcesses::OrganizationPublishedParticipatoryProcesses do
6
6
  subject { described_class.new(organization) }
7
7
 
8
8
  let!(:organization) { create(:organization) }
@@ -14,7 +14,7 @@ shared_examples "manage process admins examples" do
14
14
  before do
15
15
  switch_to_host(organization.host)
16
16
  login_as user, scope: :user
17
- visit decidim_admin.edit_participatory_process_path(participatory_process)
17
+ visit decidim_admin_participatory_processes.edit_participatory_process_path(participatory_process)
18
18
  click_link "Process users"
19
19
  end
20
20
 
@@ -89,10 +89,18 @@ shared_examples "manage process admins examples" do
89
89
 
90
90
  context "when the user has not accepted the invitation" do
91
91
  before do
92
- form = Decidim::Admin::ParticipatoryProcessUserRoleForm.from_params(name: "test",
93
- email: "test@example.org",
94
- role: "admin")
95
- Decidim::Admin::CreateParticipatoryProcessAdmin.call(form, user, participatory_process)
92
+ form = Decidim::ParticipatoryProcesses::Admin::ParticipatoryProcessUserRoleForm.from_params(
93
+ name: "test",
94
+ email: "test@example.org",
95
+ role: "admin"
96
+ )
97
+
98
+ Decidim::ParticipatoryProcesses::Admin::CreateParticipatoryProcessAdmin.call(
99
+ form,
100
+ user,
101
+ participatory_process
102
+ )
103
+
96
104
  visit current_path
97
105
  end
98
106
 
@@ -8,7 +8,7 @@ shared_examples "manage process attachments examples" do
8
8
  before do
9
9
  switch_to_host(organization.host)
10
10
  login_as user, scope: :user
11
- visit decidim_admin.edit_participatory_process_path(participatory_process)
11
+ visit decidim_admin_participatory_processes.edit_participatory_process_path(participatory_process)
12
12
  click_link "Attachments"
13
13
  end
14
14
 
@@ -4,14 +4,14 @@ shared_examples "manage process categories examples" do
4
4
  before do
5
5
  switch_to_host(organization.host)
6
6
  login_as user, scope: :user
7
- visit decidim_admin.edit_participatory_process_path(participatory_process)
7
+ visit decidim_admin_participatory_processes.edit_participatory_process_path(participatory_process)
8
8
  click_link "Categories"
9
9
  end
10
10
 
11
11
  it "creates a new category" do
12
12
  find(".card-title a.new").click
13
13
 
14
- within ".new_participatory_process_category" do
14
+ within ".new_category" do
15
15
  fill_in_i18n(
16
16
  :category_name,
17
17
  "#category-name-tabs",
@@ -46,7 +46,7 @@ shared_examples "manage process categories examples" do
46
46
  end
47
47
  end
48
48
 
49
- within ".edit_participatory_process_category" do
49
+ within ".edit_category" do
50
50
  fill_in_i18n(
51
51
  :category_name,
52
52
  "#category-name-tabs",
@@ -68,7 +68,7 @@ shared_examples "manage process categories examples" do
68
68
  end
69
69
 
70
70
  context "deleting a category" do
71
- let!(:category2) { create(:category, participatory_process: participatory_process) }
71
+ let!(:category2) { create(:category, participatory_space: participatory_process) }
72
72
 
73
73
  context "when the category has no associated content" do
74
74
  context "when the category has no subcategories" do
@@ -115,7 +115,7 @@ shared_examples "manage process categories examples" do
115
115
  end
116
116
 
117
117
  context "when the category has associated content" do
118
- let!(:feature) { create(:feature, participatory_process: participatory_process) }
118
+ let!(:feature) { create(:feature, participatory_space: participatory_process) }
119
119
  let!(:dummy_resource) { create(:dummy_resource, feature: feature, category: category) }
120
120
 
121
121
  it "cannot delete it" do
@@ -13,7 +13,7 @@ shared_examples "manage process steps examples" do
13
13
  before do
14
14
  switch_to_host(organization.host)
15
15
  login_as user, scope: :user
16
- visit decidim_admin.edit_participatory_process_path(participatory_process)
16
+ visit decidim_admin_participatory_processes.edit_participatory_process_path(participatory_process)
17
17
  click_link "Steps"
18
18
  end
19
19
 
@@ -23,7 +23,7 @@ shared_examples "manage processes examples" do
23
23
  page.find("a.action-icon--preview").click
24
24
  end
25
25
 
26
- expect(current_path).to eq decidim.participatory_process_path(participatory_process)
26
+ expect(current_path).to eq decidim_participatory_processes.participatory_process_path(participatory_process)
27
27
  expect(page).to have_content(translated(participatory_process.title))
28
28
  end
29
29
  end
@@ -31,7 +31,7 @@ shared_examples "manage processes examples" do
31
31
 
32
32
  context "viewing a missing process" do
33
33
  it_behaves_like "a 404 page" do
34
- let(:target_path) { decidim_admin.participatory_process_path(99_999_999) }
34
+ let(:target_path) { decidim_admin_participatory_processes.participatory_process_path(99_999_999) }
35
35
  end
36
36
  end
37
37
 
@@ -80,7 +80,7 @@ shared_examples "manage processes examples" do
80
80
  click_link "Publish"
81
81
  expect(page).to have_content("published successfully")
82
82
  expect(page).to have_content("Unpublish")
83
- expect(current_path).to eq decidim_admin.edit_participatory_process_path(participatory_process)
83
+ expect(current_path).to eq decidim_admin_participatory_processes.edit_participatory_process_path(participatory_process)
84
84
 
85
85
  participatory_process.reload
86
86
  expect(participatory_process).to be_published
@@ -98,7 +98,7 @@ shared_examples "manage processes examples" do
98
98
  click_link "Unpublish"
99
99
  expect(page).to have_content("unpublished successfully")
100
100
  expect(page).to have_content("Publish")
101
- expect(current_path).to eq decidim_admin.edit_participatory_process_path(participatory_process)
101
+ expect(current_path).to eq decidim_admin_participatory_processes.edit_participatory_process_path(participatory_process)
102
102
 
103
103
  participatory_process.reload
104
104
  expect(participatory_process).not_to be_published
@@ -109,7 +109,7 @@ shared_examples "manage processes examples" do
109
109
  let!(:external_participatory_process) { create(:participatory_process) }
110
110
 
111
111
  before do
112
- visit decidim_admin.participatory_processes_path
112
+ visit decidim_admin_participatory_processes.participatory_processes_path
113
113
  end
114
114
 
115
115
  it "doesn't let the admin manage processes form other organizations" do
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "decidim/dev"
4
+
5
+ ENV["ENGINE_NAME"] = File.dirname(__dir__).split("/").last
6
+
7
+ Decidim::Dev.dummy_app_path = File.expand_path(File.join("..", "spec", "decidim_dummy_app"))
8
+
9
+ require "decidim/dev/test/base_spec_helper"
@@ -1 +1,3 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35 35"><path d="M17.5 35A17.5 17.5 0 1 1 35 17.5 17.52 17.52 0 0 1 17.5 35zm0-33.06A15.56 15.56 0 1 0 33.06 17.5 15.57 15.57 0 0 0 17.5 1.94zm9.5 13.7H8a1 1 0 0 1 0-1.94h19a1 1 0 0 1 0 1.94zm0 3.68H8a1 1 0 0 1 0-1.94h19a1 1 0 0 1 0 1.94zM22.26 23H8a1 1 0 0 1 0-1.94h14.26a1 1 0 0 1 0 1.94z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35 35">
2
+ <path d="M17.5 35A17.5 17.5 0 1 1 35 17.5 17.52 17.52 0 0 1 17.5 35zm0-33.06A15.56 15.56 0 1 0 33.06 17.5 15.57 15.57 0 0 0 17.5 1.94zm9.5 13.7H8a1 1 0 0 1 0-1.94h19a1 1 0 0 1 0 1.94zm0 3.68H8a1 1 0 0 1 0-1.94h19a1 1 0 0 1 0 1.94zM22.26 23H8a1 1 0 0 1 0-1.94h14.26a1 1 0 0 1 0 1.94z"/>
3
+ </svg>
@@ -34,7 +34,7 @@ module Decidim
34
34
  end
35
35
 
36
36
  def process_scope
37
- current_feature.participatory_process.scope
37
+ current_feature.participatory_space.scope
38
38
  end
39
39
 
40
40
  alias feature current_feature
@@ -38,7 +38,7 @@ module Decidim
38
38
  end
39
39
 
40
40
  def process_scope
41
- current_feature.participatory_process.scope
41
+ current_feature.participatory_space.scope
42
42
  end
43
43
 
44
44
  alias feature current_feature
@@ -10,7 +10,7 @@ module Decidim
10
10
  super
11
11
 
12
12
  can [:manage, :unreport, :hide], Proposal do |proposal|
13
- can_manage_process?(proposal.feature.participatory_process)
13
+ can_manage_process?(proposal.feature.participatory_space)
14
14
  end
15
15
 
16
16
  cannot :create, Proposal unless can_create_proposal?
@@ -34,7 +34,7 @@ module Decidim
34
34
  def can_create_proposal?
35
35
  current_settings.try(:creation_enabled?) &&
36
36
  feature_settings.try(:official_proposals_enabled) &&
37
- can_manage_process?(current_feature.try(:participatory_process))
37
+ can_manage_process?(current_feature.try(:participatory_space))
38
38
  end
39
39
 
40
40
  def can_update_proposal?
@@ -10,7 +10,7 @@ module Decidim
10
10
  super
11
11
 
12
12
  can [:unreport, :hide], Proposal do |proposal|
13
- can_manage_process?(proposal.feature.participatory_process)
13
+ can_manage_process?(proposal.feature.participatory_space)
14
14
  end
15
15
  end
16
16
  end
@@ -12,6 +12,7 @@ module Decidim
12
12
  include Decidim::HasCategory
13
13
  include Decidim::Reportable
14
14
  include Decidim::HasAttachments
15
+ include Decidim::Followable
15
16
  include Decidim::Comments::Commentable
16
17
 
17
18
  feature_manifest_name "proposals"
@@ -84,7 +85,7 @@ module Decidim
84
85
 
85
86
  # Public: Overrides the `accepts_new_comments?` Commentable concern method.
86
87
  def accepts_new_comments?
87
- commentable? && !feature.active_step_settings.comments_blocked
88
+ commentable? && !feature.current_settings.comments_blocked
88
89
  end
89
90
 
90
91
  # Public: Overrides the `comments_have_alignment?` Commentable concern method.
@@ -97,6 +98,12 @@ module Decidim
97
98
  true
98
99
  end
99
100
 
101
+ # Public: Override Commentable concern method `users_to_notify_on_comment_created`
102
+ def users_to_notify_on_comment_created
103
+ return (followers | feature.participatory_space.admins).uniq if official?
104
+ followers
105
+ end
106
+
100
107
  # Public: Overrides the `reported_content_url` Reportable concern method.
101
108
  def reported_content_url
102
109
  ResourceLocatorPresenter.new(self).url
@@ -106,20 +113,6 @@ module Decidim
106
113
  def official?
107
114
  author.nil?
108
115
  end
109
-
110
- # Public: Overrides the `notifiable?` Notifiable concern method.
111
- # When a proposal is commented the proposal's author is notified if it is not the same
112
- # who has commented the proposal and if the proposal's author has comment notifications enabled.
113
- def notifiable?(context)
114
- return true if official?
115
- context[:author] != author && author.comments_notifications?
116
- end
117
-
118
- # Public: Overrides the `users_to_notify` Notifiable concern method.
119
- def users_to_notify
120
- return Decidim::Admin::ProcessAdmins.for(feature.participatory_process) if official?
121
- [author]
122
- end
123
116
  end
124
117
  end
125
118
  end
@@ -24,9 +24,9 @@
24
24
  </div>
25
25
  <% end %>
26
26
 
27
- <% if current_participatory_process.has_subscopes? %>
27
+ <% if current_participatory_space.has_subscopes? %>
28
28
  <div class="row column">
29
- <%= form.scopes_select :scope_id, prompt: I18n.t("decidim.scopes.global"), remote_path: decidim.scopes_search_path(root: current_participatory_process.scope) %>
29
+ <%= form.scopes_select :scope_id, prompt: I18n.t("decidim.scopes.global"), remote_path: decidim.scopes_search_path(root: current_participatory_space.scope) %>
30
30
  </div>
31
31
  <% end %>
32
32
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  <div class="button--title">
7
7
 
8
- <% if feature_settings.official_proposals_enabled %>
8
+ <% if can? :create, Decidim::Proposals::Proposal %>
9
9
  <%= link_to t("actions.new", scope: "decidim.proposals", name: t("models.proposal.name", scope: "decidim.proposals.admin")), new_proposal_path, class: 'button tiny button--simple' if can? :manage, current_feature %>
10
10
  <% end %>
11
11
 
@@ -19,9 +19,10 @@
19
19
  <table class="table-list">
20
20
  <thead>
21
21
  <tr>
22
+ <th><%= t("models.proposal.fields.id", scope: "decidim.proposals") %></th>
22
23
  <th><%= t("models.proposal.fields.title", scope: "decidim.proposals") %></th>
23
24
  <th><%= t("models.proposal.fields.category", scope: "decidim.proposals") %></th>
24
- <% if scopes_enabled?(current_participatory_process) %>
25
+ <% if scopes_enabled?(current_participatory_space) %>
25
26
  <th><%= t("models.proposal.fields.scope", scope: "decidim.proposals") %></th>
26
27
  <% end %>
27
28
  <th><%= t("models.proposal.fields.state", scope: "decidim.proposals") %></th>
@@ -31,6 +32,9 @@
31
32
  <tbody>
32
33
  <% proposals.each do |proposal| %>
33
34
  <tr data-id="<%= proposal.id %>">
35
+ <td>
36
+ <%= proposal.id %><br />
37
+ </td>
34
38
  <td>
35
39
  <%= proposal.title %><br />
36
40
  </td>
@@ -39,7 +43,7 @@
39
43
  <%= translated_attribute proposal.category.name %>
40
44
  <% end %>
41
45
  </td>
42
- <% if scopes_enabled?(current_participatory_process) %>
46
+ <% if scopes_enabled?(current_participatory_space) %>
43
47
  <td>
44
48
  <% if proposal.scope %>
45
49
  <%= translated_attribute proposal.scope.name %>
@@ -28,8 +28,8 @@
28
28
  <%= form.collection_check_boxes :activity, [["voted", t('.voted')]], :first, :last, legend_title: t('.activity') %>
29
29
  <% end %>
30
30
 
31
- <% if current_participatory_process.has_subscopes? %>
32
- <%= form.scopes_select :scope_id, legend_title: t(".scopes"), label: false, prompt: t('.scope_prompt'), remote_path: decidim.scopes_search_path(root: current_participatory_process.scope, include_root: true), multiple: true %>
31
+ <% if current_participatory_space.has_subscopes? %>
32
+ <%= form.scopes_select :scope_id, legend_title: t(".scopes"), label: false, prompt: t('.scope_prompt'), remote_path: decidim.scopes_search_path(root: current_participatory_space.scope, include_root: true), multiple: true %>
33
33
  <% end %>
34
34
 
35
35
  <% if current_feature.categories.any? %>
@@ -38,9 +38,9 @@
38
38
  </div>
39
39
  <% end %>
40
40
 
41
- <% if current_participatory_process.has_subscopes? %>
41
+ <% if current_participatory_space.has_subscopes? %>
42
42
  <div class="field">
43
- <%= form.scopes_select :scope_id, prompt: I18n.t("decidim.scopes.global"), remote_path: decidim.scopes_search_path(root: current_participatory_process.scope) %>
43
+ <%= form.scopes_select :scope_id, prompt: I18n.t("decidim.scopes.global"), remote_path: decidim.scopes_search_path(root: current_participatory_space.scope) %>
44
44
  </div>
45
45
  <% end %>
46
46
 
@@ -18,11 +18,12 @@
18
18
  </div>
19
19
  <div class="row">
20
20
  <div class="columns section view-side mediumlarge-4 mediumlarge-push-8 large-3 large-push-9">
21
- <% if current_settings.votes_enabled? %>
21
+ <% if current_settings.votes_enabled? || current_user %>
22
22
  <div class="card extra">
23
23
  <div class="card__content">
24
24
  <%= render partial: "votes_count", locals: { proposal: @proposal, from_proposals_list: false } %>
25
25
  <%= render partial: "vote_button", locals: { proposal: @proposal, from_proposals_list: false } %>
26
+ <%= render partial: "decidim/shared/follow_button", locals: { followable: @proposal } %>
26
27
  </div>
27
28
  </div>
28
29
  <% end %>
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ca:
2
3
  activemodel:
3
4
  attributes:
@@ -18,12 +19,16 @@ ca:
18
19
  name: Propostes
19
20
  settings:
20
21
  global:
22
+ announcement: Avís
23
+ attachments_allowed: Permetre arxius adjunts
21
24
  comments_enabled: Comentaris habilitats
22
25
  geocoding_enabled: Geocodificació habilitada
26
+ new_proposal_help_text: Text d'ajuda al crear una nova proposta
23
27
  official_proposals_enabled: Propostes oficials habilitades
24
28
  proposal_answering_enabled: Resposta oficial a propostes activades
25
29
  vote_limit: Límit de vot
26
30
  step:
31
+ announcement: Avís
27
32
  comments_blocked: Comentaris bloquejats
28
33
  creation_enabled: Habilitar de creació de propostes
29
34
  proposal_answering_enabled: Resposta oficial a propostes activades
@@ -59,6 +64,7 @@ ca:
59
64
  invalid: Hi ha hagut un problema en crear aquesta proposta
60
65
  success: Proposta creada correctament
61
66
  form:
67
+ attachment_legend: "(Opcional) Afegiu un fitxer adjunt"
62
68
  select_a_category: Selecciona una categoria
63
69
  index:
64
70
  title: Propostes
@@ -77,6 +83,7 @@ ca:
77
83
  proposal:
78
84
  fields:
79
85
  category: Categoria
86
+ id: ID
80
87
  official_proposal: Proposta oficial
81
88
  scope: Àmbit
82
89
  state: Estat
@@ -122,6 +129,7 @@ ca:
122
129
  one: <span class="card--list__data__number">1</span>suport
123
130
  other: <span class="card--list__data__number">%{count}</span>suports
124
131
  new:
132
+ attachment_legend: "(Opcional) Afegiu un fitxer adjunt"
125
133
  back: Enrere
126
134
  select_a_category: Si us plau, seleccioni una categoria
127
135
  send: Enviar
@@ -156,5 +164,3 @@ ca:
156
164
  included_proposals:
157
165
  proposal_projects: 'Proposta formulada en aquests projectes:'
158
166
  proposal_results: 'La proposta apareix en aquests resultats:'
159
- proposals_from_meeting:
160
- proposal_meetings: Trobades relacionades