decidim 0.0.6 → 0.0.7

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 (308) hide show
  1. checksums.yaml +4 -4
  2. data/.babelrc +2 -1
  3. data/.ruby-version +1 -1
  4. data/.travis.yml +4 -6
  5. data/Dockerfile +2 -2
  6. data/Gemfile +1 -1
  7. data/Gemfile.lock +48 -48
  8. data/README.md +6 -1
  9. data/decidim-admin/app/assets/stylesheets/decidim/admin/_decidim.scss +9 -0
  10. data/decidim-admin/app/assets/stylesheets/decidim/admin/_variables.scss +7 -0
  11. data/decidim-admin/app/assets/stylesheets/decidim/admin/application.scss +2 -19
  12. data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_categories.scss +5 -0
  13. data/decidim-admin/app/assets/stylesheets/decidim/admin/{_email_preview.scss → extra/_email_preview.scss} +0 -0
  14. data/decidim-admin/app/assets/stylesheets/decidim/admin/{_login.scss → extra/_login.scss} +0 -0
  15. data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_select_multiple.scss +3 -0
  16. data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_title_bar.scss +5 -0
  17. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_action-icon.scss +13 -0
  18. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_buttons.scss +44 -0
  19. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_callouts.scss +32 -0
  20. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_cards.scss +36 -0
  21. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_char-counter.scss +20 -0
  22. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_component-counter.scss +17 -0
  23. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_forms.scss +80 -0
  24. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_icons.scss +65 -0
  25. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_layout.scss +67 -0
  26. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_main-nav.scss +41 -0
  27. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_modules.scss +24 -0
  28. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_process-header.scss +11 -0
  29. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_secondary-nav.scss +95 -0
  30. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_table-list.scss +78 -0
  31. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_tabs.scss +49 -0
  32. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_title-bar.scss +32 -0
  33. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_typography.scss +15 -0
  34. data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_user-login.scss +23 -0
  35. data/decidim-admin/app/assets/stylesheets/decidim/admin/utils/_fontface.scss +27 -0
  36. data/decidim-admin/app/assets/stylesheets/decidim/admin/utils/_helpers.scss +25 -0
  37. data/decidim-admin/app/assets/stylesheets/decidim/admin/utils/_keyframes.scss +21 -0
  38. data/decidim-admin/app/assets/stylesheets/decidim/admin/utils/_mixins.scss +20 -0
  39. data/decidim-admin/app/assets/stylesheets/decidim/admin/utils/_settings.scss +590 -0
  40. data/decidim-admin/app/assets/stylesheets/decidim/admin/utils/_toggle-expand.scss +8 -0
  41. data/decidim-admin/app/commands/decidim/admin/create_attachment.rb +13 -4
  42. data/decidim-admin/app/commands/decidim/admin/update_participatory_process.rb +3 -3
  43. data/decidim-admin/app/commands/decidim/admin/update_participatory_process_admin.rb +40 -0
  44. data/decidim-admin/app/controllers/decidim/admin/application_controller.rb +7 -1
  45. data/decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb +1 -1
  46. data/decidim-admin/app/controllers/decidim/admin/organization_controller.rb +2 -0
  47. data/decidim-admin/app/controllers/decidim/admin/participatory_process_user_roles_controller.rb +29 -0
  48. data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +2 -2
  49. data/decidim-admin/app/controllers/decidim/admin/scopes_controller.rb +2 -0
  50. data/decidim-admin/app/controllers/decidim/admin/static_pages_controller.rb +2 -0
  51. data/decidim-admin/app/controllers/decidim/admin/user_groups_controller.rb +3 -1
  52. data/decidim-admin/app/controllers/decidim/admin/users_controller.rb +1 -1
  53. data/decidim-admin/app/helpers/decidim/admin/application_helper.rb +8 -0
  54. data/decidim-admin/app/helpers/decidim/admin/icon_link_helper.rb +30 -0
  55. data/decidim-admin/app/jobs/decidim/admin/newsletter_job.rb +1 -1
  56. data/decidim-admin/app/queries/decidim/admin/process_admin_roles_for_process.rb +1 -1
  57. data/decidim-admin/app/views/decidim/admin/attachments/_form.html.erb +29 -8
  58. data/decidim-admin/app/views/decidim/admin/attachments/edit.html.erb +3 -5
  59. data/decidim-admin/app/views/decidim/admin/attachments/index.html.erb +45 -35
  60. data/decidim-admin/app/views/decidim/admin/attachments/new.html.erb +3 -5
  61. data/decidim-admin/app/views/decidim/admin/categories/_form.html.erb +18 -10
  62. data/decidim-admin/app/views/decidim/admin/categories/edit.html.erb +3 -5
  63. data/decidim-admin/app/views/decidim/admin/categories/index.html.erb +57 -42
  64. data/decidim-admin/app/views/decidim/admin/categories/new.html.erb +3 -5
  65. data/decidim-admin/app/views/decidim/admin/dashboard/show.html.erb +6 -3
  66. data/decidim-admin/app/views/decidim/admin/features/_feature.html.erb +11 -11
  67. data/decidim-admin/app/views/decidim/admin/features/_form.html.erb +56 -48
  68. data/decidim-admin/app/views/decidim/admin/features/edit.html.erb +3 -5
  69. data/decidim-admin/app/views/decidim/admin/features/index.html.erb +21 -19
  70. data/decidim-admin/app/views/decidim/admin/features/new.html.erb +3 -4
  71. data/decidim-admin/app/views/decidim/admin/moderations/index.html.erb +71 -61
  72. data/decidim-admin/app/views/decidim/admin/newsletters/_form.html.erb +7 -1
  73. data/decidim-admin/app/views/decidim/admin/newsletters/edit.html.erb +10 -8
  74. data/decidim-admin/app/views/decidim/admin/newsletters/index.html.erb +50 -43
  75. data/decidim-admin/app/views/decidim/admin/newsletters/new.html.erb +10 -8
  76. data/decidim-admin/app/views/decidim/admin/newsletters/show.html.erb +20 -12
  77. data/decidim-admin/app/views/decidim/admin/organization/_form.html.erb +98 -62
  78. data/decidim-admin/app/views/decidim/admin/organization/edit.html.erb +11 -8
  79. data/decidim-admin/app/views/decidim/admin/participatory_process_groups/_form.html.erb +4 -4
  80. data/decidim-admin/app/views/decidim/admin/participatory_process_groups/edit.html.erb +15 -9
  81. data/decidim-admin/app/views/decidim/admin/participatory_process_groups/index.html.erb +37 -35
  82. data/decidim-admin/app/views/decidim/admin/participatory_process_groups/new.html.erb +10 -8
  83. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/_form.html.erb +21 -11
  84. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/edit.html.erb +3 -4
  85. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/index.html.erb +60 -51
  86. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/new.html.erb +4 -5
  87. data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/_form.html.erb +23 -0
  88. data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/edit.html.erb +7 -0
  89. data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/index.html.erb +46 -34
  90. data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/new.html.erb +7 -0
  91. data/decidim-admin/app/views/decidim/admin/participatory_processes/_form.html.erb +103 -72
  92. data/decidim-admin/app/views/decidim/admin/participatory_processes/edit.html.erb +15 -17
  93. data/decidim-admin/app/views/decidim/admin/participatory_processes/index.html.erb +52 -43
  94. data/decidim-admin/app/views/decidim/admin/participatory_processes/new.html.erb +6 -5
  95. data/decidim-admin/app/views/decidim/admin/scopes/edit.html.erb +9 -7
  96. data/decidim-admin/app/views/decidim/admin/scopes/index.html.erb +37 -36
  97. data/decidim-admin/app/views/decidim/admin/scopes/new.html.erb +9 -6
  98. data/decidim-admin/app/views/decidim/admin/static_pages/_form.html.erb +3 -3
  99. data/decidim-admin/app/views/decidim/admin/static_pages/edit.html.erb +10 -8
  100. data/decidim-admin/app/views/decidim/admin/static_pages/index.html.erb +38 -37
  101. data/decidim-admin/app/views/decidim/admin/static_pages/new.html.erb +10 -8
  102. data/decidim-admin/app/views/decidim/admin/user_groups/index.html.erb +37 -31
  103. data/decidim-admin/app/views/decidim/admin/users/_form.html.erb +5 -4
  104. data/decidim-admin/app/views/decidim/admin/users/index.html.erb +57 -52
  105. data/decidim-admin/app/views/decidim/admin/users/new.html.erb +10 -7
  106. data/decidim-admin/app/views/layouts/decidim/admin/_application.html.erb +23 -36
  107. data/decidim-admin/app/views/layouts/decidim/admin/_callouts_full.html.erb +10 -0
  108. data/decidim-admin/app/views/layouts/decidim/admin/_language_chooser.html.erb +9 -9
  109. data/decidim-admin/app/views/layouts/decidim/admin/_main_nav.html.erb +11 -0
  110. data/decidim-admin/app/views/layouts/decidim/admin/_template_bottom.html.erb +2 -0
  111. data/decidim-admin/app/views/layouts/decidim/admin/_template_top.html.erb +3 -0
  112. data/decidim-admin/app/views/layouts/decidim/admin/_title_bar.html.erb +20 -0
  113. data/decidim-admin/app/views/layouts/decidim/admin/newsletters.erb +14 -0
  114. data/decidim-admin/app/views/layouts/decidim/admin/pages.html.erb +14 -0
  115. data/decidim-admin/app/views/layouts/decidim/admin/participatory_process.html.erb +55 -53
  116. data/decidim-admin/app/views/layouts/decidim/admin/participatory_process_groups.html.erb +14 -0
  117. data/decidim-admin/app/views/layouts/decidim/admin/participatory_processes.html.erb +14 -0
  118. data/decidim-admin/app/views/layouts/decidim/admin/settings.html.erb +19 -0
  119. data/decidim-admin/app/views/layouts/decidim/admin/users.html.erb +21 -0
  120. data/decidim-admin/config/i18n-tasks.yml +1 -0
  121. data/decidim-admin/config/locales/ca.yml +77 -22
  122. data/decidim-admin/config/locales/en.yml +75 -20
  123. data/decidim-admin/config/locales/es.yml +77 -22
  124. data/decidim-admin/config/locales/eu.yml +191 -16
  125. data/decidim-admin/config/locales/fi.yml +0 -29
  126. data/decidim-admin/config/routes.rb +1 -1
  127. data/decidim-admin/lib/decidim/admin/test/manage_attachments_examples.rb +11 -11
  128. data/decidim-admin/spec/commands/deliver_newsletter_spec.rb +4 -1
  129. data/decidim-admin/spec/commands/update_participatory_process_spec.rb +117 -0
  130. data/decidim-admin/spec/features/admin_invite_spec.rb +5 -1
  131. data/decidim-admin/spec/features/admin_manages_feature_permissions_spec.rb +1 -1
  132. data/decidim-admin/spec/features/admin_manages_features_spec.rb +10 -10
  133. data/decidim-admin/spec/features/admin_manages_newsletters_spec.rb +11 -9
  134. data/decidim-admin/spec/features/admin_manages_organization_admins_spec.rb +8 -5
  135. data/decidim-admin/spec/features/admin_manages_organization_scopes_spec.rb +7 -6
  136. data/decidim-admin/spec/features/admin_manages_organization_spec.rb +14 -0
  137. data/decidim-admin/spec/features/admin_manages_participatory_process_groups_spec.rb +6 -6
  138. data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +27 -5
  139. data/decidim-admin/spec/features/admin_manages_user_groups_spec.rb +1 -1
  140. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_admins_spec.rb +2 -2
  141. data/decidim-admin/spec/features/static_pages_spec.rb +9 -7
  142. data/decidim-admin/spec/jobs/newsletter_job_spec.rb +2 -0
  143. data/decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb +4 -3
  144. data/decidim-admin/spec/shared/manage_process_admins_examples.rb +31 -8
  145. data/decidim-admin/spec/shared/manage_process_attachments_examples.rb +1 -1
  146. data/decidim-admin/spec/shared/manage_process_categories_examples.rb +11 -26
  147. data/decidim-admin/spec/shared/manage_process_steps_examples.rb +8 -23
  148. data/decidim-admin/spec/shared/manage_processes_examples.rb +5 -33
  149. data/decidim-admin/spec/support/processes_menu_links_helpers.rb +1 -1
  150. data/decidim-admin/yarn.lock +4 -0
  151. data/decidim-api/app/controllers/decidim/api/application_controller.rb +2 -1
  152. data/decidim-budgets/app/controllers/decidim/budgets/admin/projects_controller.rb +1 -1
  153. data/decidim-budgets/app/controllers/decidim/budgets/line_items_controller.rb +21 -15
  154. data/decidim-budgets/app/views/decidim/budgets/admin/projects/_form.html.erb +34 -24
  155. data/decidim-budgets/app/views/decidim/budgets/admin/projects/edit.html.erb +3 -5
  156. data/decidim-budgets/app/views/decidim/budgets/admin/projects/index.html.erb +52 -34
  157. data/decidim-budgets/app/views/decidim/budgets/admin/projects/new.html.erb +4 -5
  158. data/decidim-budgets/app/views/decidim/budgets/projects/_filters.html.erb +1 -1
  159. data/decidim-budgets/config/i18n-tasks.yml +1 -0
  160. data/decidim-budgets/config/locales/ca.yml +5 -0
  161. data/decidim-budgets/config/locales/en.yml +5 -0
  162. data/decidim-budgets/config/locales/es.yml +5 -0
  163. data/decidim-budgets/config/locales/eu.yml +27 -0
  164. data/decidim-budgets/spec/features/orders_spec.rb +22 -0
  165. data/decidim-budgets/spec/shared/manage_attachments_examples.rb +1 -1
  166. data/decidim-budgets/spec/shared/manage_projects_examples.rb +10 -8
  167. data/decidim-comments/README.md +33 -0
  168. data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
  169. data/decidim-comments/app/assets/javascripts/decidim/comments/comments.js.erb +2 -0
  170. data/decidim-comments/app/frontend/application/{apollo_client.js → apollo_client.ts} +5 -5
  171. data/decidim-comments/app/frontend/application/application.component.test.tsx +36 -0
  172. data/decidim-comments/app/frontend/application/application.component.tsx +37 -0
  173. data/decidim-comments/app/frontend/application/icon.component.test.tsx +49 -0
  174. data/decidim-comments/app/frontend/application/icon.component.tsx +35 -0
  175. data/decidim-comments/app/frontend/comments/{add_comment_form.component.test.jsx → add_comment_form.component.test.tsx} +98 -92
  176. data/decidim-comments/app/frontend/comments/{add_comment_form.component.jsx → add_comment_form.component.tsx} +152 -153
  177. data/decidim-comments/app/frontend/comments/{comment.component.test.jsx → comment.component.test.tsx} +59 -71
  178. data/decidim-comments/app/frontend/comments/{comment.component.jsx → comment.component.tsx} +114 -116
  179. data/decidim-comments/app/frontend/comments/comment_order_selector.component.test.tsx +21 -0
  180. data/decidim-comments/app/frontend/comments/comment_order_selector.component.tsx +88 -0
  181. data/decidim-comments/app/frontend/comments/comment_thread.component.test.tsx +65 -0
  182. data/decidim-comments/app/frontend/comments/comment_thread.component.tsx +70 -0
  183. data/decidim-comments/app/frontend/comments/{comments.component.test.jsx → comments.component.test.tsx} +38 -81
  184. data/decidim-comments/app/frontend/comments/{comments.component.jsx → comments.component.tsx} +49 -63
  185. data/decidim-comments/app/frontend/comments/down_vote_button.component.test.tsx +39 -0
  186. data/decidim-comments/app/frontend/comments/down_vote_button.component.tsx +89 -0
  187. data/decidim-comments/app/frontend/comments/up_vote_button.component.test.tsx +39 -0
  188. data/decidim-comments/app/frontend/comments/up_vote_button.component.tsx +89 -0
  189. data/decidim-comments/app/frontend/comments/vote_button.component.tsx +36 -0
  190. data/decidim-comments/app/frontend/comments/{vote_button_component.test.jsx → vote_button_component.test.tsx} +16 -20
  191. data/decidim-comments/app/frontend/entry.ts +19 -0
  192. data/decidim-comments/app/frontend/{comments → fragments}/add_comment_form_commentable.fragment.graphql +1 -1
  193. data/decidim-comments/app/frontend/{comments → fragments}/add_comment_form_session.fragment.graphql +1 -1
  194. data/decidim-comments/app/frontend/{comments → fragments}/comment.fragment.graphql +3 -1
  195. data/decidim-comments/app/frontend/{comments → fragments}/comment_data.fragment.graphql +6 -3
  196. data/decidim-comments/app/frontend/{comments → fragments}/comment_thread.fragment.graphql +3 -1
  197. data/decidim-comments/app/frontend/{comments/down_vote.fragment.graphql → fragments/down_vote_button.fragment.graphql} +2 -2
  198. data/decidim-comments/app/frontend/{comments/up_vote.fragment.graphql → fragments/up_vote_button.fragment.graphql} +2 -2
  199. data/decidim-comments/app/frontend/{comments/add_comment_form.mutation.graphql → mutations/add_comment.mutation.graphql} +3 -1
  200. data/decidim-comments/app/frontend/{comments → mutations}/down_vote.mutation.graphql +3 -1
  201. data/decidim-comments/app/frontend/{comments → mutations}/up_vote.mutation.graphql +3 -1
  202. data/decidim-comments/app/frontend/{comments → queries}/comments.query.graphql +4 -1
  203. data/decidim-comments/app/frontend/support/{asset_url.js → asset_url.ts} +1 -1
  204. data/decidim-comments/app/frontend/support/{generate_comments_data.js → generate_comments_data.ts} +11 -6
  205. data/decidim-comments/app/frontend/support/{generate_user_data.js → generate_user_data.ts} +2 -2
  206. data/decidim-comments/app/frontend/support/{generate_user_group_data.js → generate_user_group_data.ts} +2 -2
  207. data/decidim-comments/app/frontend/support/graphql_transformer.js +32 -0
  208. data/decidim-comments/app/frontend/support/load_translations.ts +44 -0
  209. data/decidim-comments/app/frontend/support/{require_all.js → require_all.ts} +1 -1
  210. data/decidim-comments/app/frontend/support/{resolve_graphql_query.js → resolve_graphql_query.ts} +7 -7
  211. data/decidim-comments/app/frontend/support/schema.ts +119 -0
  212. data/decidim-comments/config/locales/eu.yml +29 -5
  213. data/decidim-dev/Rakefile +2 -0
  214. data/decidim-dev/config/locales/eu.yml +1 -1
  215. data/decidim-dev/decidim-dev.gemspec +1 -1
  216. data/decidim-dev/lib/decidim/dev/test/rspec_support/capybara.rb +1 -4
  217. data/decidim-dev/lib/decidim/dev/test/rspec_support/feature.rb +1 -0
  218. data/decidim-dev/lib/decidim/dev/test/rspec_support/helpers.rb +1 -1
  219. data/decidim-dev/lib/decidim/dev/test/rspec_support/phantomjs_polyfills/phantomjs-shim.js +215 -0
  220. data/decidim-dev/lib/decidim/dev/test/rspec_support/translation_helpers.rb +1 -1
  221. data/decidim-dev/lib/generators/decidim/dummy_generator.rb +5 -0
  222. data/decidim-meetings/app/controllers/decidim/meetings/admin/application_controller.rb +1 -1
  223. data/decidim-meetings/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +30 -19
  224. data/decidim-meetings/app/views/decidim/meetings/admin/meeting_closes/edit.html.erb +3 -5
  225. data/decidim-meetings/app/views/decidim/meetings/admin/meetings/_form.html.erb +46 -35
  226. data/decidim-meetings/app/views/decidim/meetings/admin/meetings/edit.html.erb +5 -6
  227. data/decidim-meetings/app/views/decidim/meetings/admin/meetings/index.html.erb +72 -51
  228. data/decidim-meetings/app/views/decidim/meetings/admin/meetings/new.html.erb +4 -6
  229. data/decidim-meetings/app/views/decidim/meetings/meetings/_filters.html.erb +1 -1
  230. data/decidim-meetings/config/locales/ca.yml +2 -1
  231. data/decidim-meetings/config/locales/en.yml +2 -1
  232. data/decidim-meetings/config/locales/es.yml +2 -1
  233. data/decidim-meetings/config/locales/eu.yml +25 -5
  234. data/decidim-meetings/config/locales/fi.yml +0 -1
  235. data/decidim-meetings/spec/shared/manage_attachments_examples.rb +1 -1
  236. data/decidim-meetings/spec/shared/manage_meetings_examples.rb +18 -16
  237. data/decidim-pages/app/views/decidim/pages/admin/pages/_form.html.erb +10 -3
  238. data/decidim-pages/app/views/decidim/pages/admin/pages/edit.html.erb +3 -5
  239. data/decidim-pages/config/locales/eu.yml +4 -2
  240. data/decidim-pages/spec/features/admin_spec.rb +1 -1
  241. data/decidim-proposals/app/controllers/decidim/proposals/admin/proposals_controller.rb +1 -1
  242. data/decidim-proposals/app/views/decidim/proposals/admin/proposal_answers/edit.html.erb +14 -8
  243. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/_form.html.erb +28 -20
  244. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb +60 -43
  245. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/new.html.erb +3 -5
  246. data/decidim-proposals/app/views/decidim/proposals/proposals/_filters.html.erb +1 -1
  247. data/decidim-proposals/config/locales/ca.yml +3 -0
  248. data/decidim-proposals/config/locales/en.yml +4 -1
  249. data/decidim-proposals/config/locales/es.yml +3 -0
  250. data/decidim-proposals/config/locales/eu.yml +42 -19
  251. data/decidim-proposals/config/locales/fi.yml +0 -1
  252. data/decidim-proposals/spec/shared/manage_proposals_examples.rb +15 -13
  253. data/decidim-results/README.md +1 -1
  254. data/decidim-results/app/controllers/decidim/results/admin/results_controller.rb +1 -1
  255. data/decidim-results/app/views/decidim/results/admin/results/_form.html.erb +30 -21
  256. data/decidim-results/app/views/decidim/results/admin/results/edit.html.erb +4 -5
  257. data/decidim-results/app/views/decidim/results/admin/results/index.html.erb +40 -25
  258. data/decidim-results/app/views/decidim/results/admin/results/new.html.erb +4 -5
  259. data/decidim-results/app/views/decidim/results/results/_filters.html.erb +1 -1
  260. data/decidim-results/config/locales/ca.yml +2 -0
  261. data/decidim-results/config/locales/en.yml +2 -0
  262. data/decidim-results/config/locales/es.yml +2 -0
  263. data/decidim-results/config/locales/eu.yml +22 -4
  264. data/decidim-results/spec/shared/manage_results_examples.rb +10 -8
  265. data/decidim-system/config/locales/eu.yml +60 -2
  266. data/lib/generators/decidim/app_generator.rb +0 -4
  267. data/lib/generators/decidim/install_generator.rb +0 -4
  268. data/lib/generators/decidim/templates/README.md.erb +18 -18
  269. data/package.json +47 -22
  270. data/tsconfig.json +17 -0
  271. data/tslint.json +12 -0
  272. data/webpack.config.js +8 -6
  273. data/webpack.d.ts +5 -0
  274. data/yarn.lock +1461 -781
  275. metadata +119 -83
  276. data/decidim-admin/app/assets/stylesheets/decidim/admin/_actions.scss +0 -8
  277. data/decidim-admin/app/assets/stylesheets/decidim/admin/_forms.scss +0 -10
  278. data/decidim-admin/app/assets/stylesheets/decidim/admin/_foundation_and_overrides.scss +0 -53
  279. data/decidim-admin/app/assets/stylesheets/decidim/admin/_icons.scss +0 -9
  280. data/decidim-admin/app/assets/stylesheets/decidim/admin/_layout.scss +0 -27
  281. data/decidim-admin/app/assets/stylesheets/decidim/admin/_settings.scss +0 -566
  282. data/decidim-admin/app/assets/stylesheets/decidim/admin/_tables.scss +0 -21
  283. data/decidim-admin/app/views/layouts/decidim/admin/_login_items.html.erb +0 -8
  284. data/decidim-admin/app/views/layouts/decidim/admin/_sidebar.html.erb +0 -22
  285. data/decidim-comments/app/frontend/application/application.component.jsx +0 -37
  286. data/decidim-comments/app/frontend/application/application.component.test.jsx +0 -33
  287. data/decidim-comments/app/frontend/application/icon.component.jsx +0 -26
  288. data/decidim-comments/app/frontend/application/icon.component.test.jsx +0 -53
  289. data/decidim-comments/app/frontend/comments/comment_order_selector.component.jsx +0 -72
  290. data/decidim-comments/app/frontend/comments/comment_order_selector.component.test.jsx +0 -20
  291. data/decidim-comments/app/frontend/comments/comment_thread.component.jsx +0 -75
  292. data/decidim-comments/app/frontend/comments/comment_thread.component.test.jsx +0 -83
  293. data/decidim-comments/app/frontend/comments/down_vote_button.component.jsx +0 -98
  294. data/decidim-comments/app/frontend/comments/down_vote_button.component.test.jsx +0 -48
  295. data/decidim-comments/app/frontend/comments/featured_comment.component.jsx +0 -23
  296. data/decidim-comments/app/frontend/comments/featured_comment.component.test.jsx +0 -15
  297. data/decidim-comments/app/frontend/comments/up_vote_button.component.jsx +0 -98
  298. data/decidim-comments/app/frontend/comments/up_vote_button.component.test.jsx +0 -48
  299. data/decidim-comments/app/frontend/comments/vote_button.component.jsx +0 -32
  300. data/decidim-comments/app/frontend/entry.js +0 -17
  301. data/decidim-comments/app/frontend/entry.test.js +0 -31
  302. data/decidim-comments/app/frontend/support/load_translations.js +0 -23
  303. data/decidim-comments/app/frontend/support/stub_component.js +0 -29
  304. data/decidim-dev/lib/decidim/dev/test/rspec_support/phantomjs_polyfills/bind-polyfill.js +0 -18
  305. data/decidim-dev/lib/decidim/dev/test/rspec_support/phantomjs_polyfills/object-assign-polyfill.js +0 -24
  306. data/karma.conf.js +0 -45
  307. data/lib/generators/decidim/review_app_generator.rb +0 -53
  308. data/lib/generators/decidim/templates/app.json.erb +0 -16
@@ -40,7 +40,6 @@ fi:
40
40
  participatory_scope: Osallistumiskonteksti
41
41
  participatory_structure: Osallistumisen rakenne
42
42
  promoted: Korostettu
43
- scope: Konteksti
44
43
  short_description: Lyhyt kuvaus
45
44
  slug: URL-tunniste
46
45
  subtitle: Alaotsikko
@@ -96,7 +95,6 @@ fi:
96
95
  activate: Aktivoi
97
96
  configure: Asetukset
98
97
  confirm_destroy: Haluatko varmasti poistaa tämän?
99
- create: Luo
100
98
  destroy: Tuhoa
101
99
  edit: Muokkaa
102
100
  manage: Hallitse
@@ -105,7 +103,6 @@ fi:
105
103
  preview: Esikatsele
106
104
  publish: Julkaise
107
105
  resend_invitation: Lähetä kutsu uudelleen
108
- title: Toiminnot
109
106
  unpublish: Lopeta julkaisu
110
107
  verify: Vahvista
111
108
  attachments:
@@ -149,11 +146,7 @@ fi:
149
146
  categories_title: Kategoriat
150
147
  participatory_process_steps:
151
148
  index:
152
- steps_hint: Voit vetää taulukon rivejä järjestääksesi prosessin vaiheet uuteen järjestykseen.
153
149
  steps_title: Vaihe
154
- participatory_process_user_roles:
155
- index:
156
- process_admins_title: Osallistumisprosessin hallinnoijat
157
150
  feature_permissions:
158
151
  edit:
159
152
  everyone: Kaikki
@@ -194,22 +187,17 @@ fi:
194
187
  menu:
195
188
  dashboard: Hallintapaneeli
196
189
  newsletters: Uutiskirjeet
197
- participatory_process_groups: Osallistumisprosessien ryhmät
198
- participatory_processes: Osallistumisprosessit
199
190
  participatory_processes_submenu:
200
191
  attachments: Liitteet
201
192
  categories: Kategoriat
202
193
  features: Ominaisuudet
203
194
  info: Tiedot
204
195
  moderations: Moderointi
205
- process_admins: Prosessin hallinnoijat
206
- settings: Asetukset
207
196
  steps: Vaiheet
208
197
  scopes: Kontekstit
209
198
  settings: Asetukset
210
199
  static_pages: Sivut
211
200
  user_groups: Käyttäjäryhmät
212
- users: Hallinnointikäyttäjät
213
201
  models:
214
202
  attachment:
215
203
  fields:
@@ -237,10 +225,8 @@ fi:
237
225
  participatory_process_group:
238
226
  fields:
239
227
  name: Nimi
240
- name: Osallistumisprosessin ryhmä
241
228
  participatory_process_step:
242
229
  fields:
243
- active: Aktivoi
244
230
  end_date: Lopetusaika
245
231
  start_date: Aloitusaika
246
232
  title: Otsikko
@@ -252,12 +238,10 @@ fi:
252
238
  fields:
253
239
  created_at: Luonnin ajankohta
254
240
  name: Nimi
255
- name: Konteksti
256
241
  static_page:
257
242
  fields:
258
243
  created_at: Luonnin ajankohta
259
244
  title: Otsikko
260
- name: Sivu
261
245
  user:
262
246
  fields:
263
247
  created_at: Luontipäivämäärä
@@ -274,9 +258,6 @@ fi:
274
258
  name: Nimi
275
259
  phone: Puhelinnumero
276
260
  users_count: Käyttäjämäärä
277
- moderations:
278
- index:
279
- title: Otsikko
280
261
  newsletters:
281
262
  create:
282
263
  error: Tämän uutiskirjeen luonnissa tapahtui virhe.
@@ -320,7 +301,6 @@ fi:
320
301
  update: Päivitä
321
302
  new:
322
303
  create: Luo
323
- name: Nimi
324
304
  update:
325
305
  error: Tämän osallistumisprosessien ryhmän päivityksessä tapahtui virhe.
326
306
  success: Osallistumisprosessien ryhmä päivitetty onnistuneesti.
@@ -356,12 +336,6 @@ fi:
356
336
  update:
357
337
  error: Tämän osallistumisprosessin vaiheen päivityksessä tapahtui virhe.
358
338
  success: Osallistumisprosessin vaihe päivitetty onnistuneesti.
359
- participatory_process_user_roles:
360
- create:
361
- error: Tämän osallistumisprosessin hallinnointikäyttäjän lisäyksessä tapahtui virhe.
362
- success: Hallinnointikäyttäjä lisätty onnistuneesti tälle osallistumisprosessille.
363
- destroy:
364
- success: Tämän osallistumisprosessin hallinnointikäyttäjä tuhottu onnistuneesti.
365
339
  participatory_processes:
366
340
  create:
367
341
  error: Uuden osallistumisprosessin luonnissa tapahtui virhe.
@@ -370,9 +344,6 @@ fi:
370
344
  success: Osallistumisprosessi tuhottu onnistuneesti.
371
345
  edit:
372
346
  update: Päivitä osallistumisprosessia
373
- new:
374
- create: Luo osallistumisprosessi
375
- title: Uusi osallistumisprosessi
376
347
  update:
377
348
  error: Tämän osallistumisprosessin päivityksessä tapahtui virhe.
378
349
  success: Osallistumisprosessi päivitetty onnistuneesti.
@@ -14,7 +14,7 @@ Decidim::Admin::Engine.routes.draw do
14
14
  post :ordering, to: "participatory_process_step_ordering#create"
15
15
  end
16
16
  end
17
- resources :user_roles, controller: "participatory_process_user_roles", only: [:destroy, :create, :index]
17
+ resources :user_roles, controller: "participatory_process_user_roles"
18
18
  resources :attachments, controller: "participatory_process_attachments"
19
19
 
20
20
  resources :features do
@@ -22,16 +22,16 @@ RSpec.shared_examples "manage attachments examples" do
22
22
  click_link translated(attachment.title, locale: :en)
23
23
  end
24
24
 
25
- expect(page).to have_content(stripped(translated(attachment.title, locale: :en)))
26
- expect(page).to have_content(stripped(translated(attachment.description, locale: :en)))
27
- expect(page).to have_content(attachment.file_type)
25
+ expect(page).to have_selector("input#attachment_title_en[value='#{translated(attachment.title, locale: :en)}']")
26
+ expect(page).to have_selector("input#attachment_description_en[value='#{translated(attachment.description, locale: :en)}']")
27
+ expect(page).to have_content(attachment.file.url)
28
28
  expect(page).to have_css("img[src~='#{attachment.thumbnail_url}']")
29
29
  end
30
30
 
31
31
  it "can add attachments to a process" do
32
- find("#attachments .actions .new").click
32
+ find(".card-title a.new").click
33
33
 
34
- within ".new_attachment" do
34
+ within ".new_participatory_process_attachment" do
35
35
  fill_in_i18n(
36
36
  :attachment_title,
37
37
  "#title-tabs",
@@ -52,7 +52,7 @@ RSpec.shared_examples "manage attachments examples" do
52
52
  find("*[type=submit]").click
53
53
  end
54
54
 
55
- within ".flash" do
55
+ within ".callout-wrapper" do
56
56
  expect(page).to have_content("successfully")
57
57
  end
58
58
 
@@ -63,10 +63,10 @@ RSpec.shared_examples "manage attachments examples" do
63
63
 
64
64
  it "can delete an attachment from a process" do
65
65
  within find("tr", text: stripped(translated(attachment.title))) do
66
- click_link "Destroy"
66
+ page.find('a.action-icon--remove').click
67
67
  end
68
68
 
69
- within ".flash" do
69
+ within ".callout-wrapper" do
70
70
  expect(page).to have_content("successfully")
71
71
  end
72
72
 
@@ -76,11 +76,11 @@ RSpec.shared_examples "manage attachments examples" do
76
76
  it "can update an attachment" do
77
77
  within "#attachments" do
78
78
  within find("tr", text: stripped(translated(attachment.title))) do
79
- click_link "Edit"
79
+ page.find('a.action-icon--edit').click
80
80
  end
81
81
  end
82
82
 
83
- within ".edit_attachment" do
83
+ within ".edit_participatory_process_attachment" do
84
84
  fill_in_i18n(
85
85
  :attachment_title,
86
86
  "#title-tabs",
@@ -92,7 +92,7 @@ RSpec.shared_examples "manage attachments examples" do
92
92
  find("*[type=submit]").click
93
93
  end
94
94
 
95
- within ".flash" do
95
+ within ".callout-wrapper" do
96
96
  expect(page).to have_content("successfully")
97
97
  end
98
98
 
@@ -13,12 +13,15 @@ module Decidim
13
13
  end
14
14
 
15
15
  let!(:deliverable_users) do
16
- create_list(:user, 5, organization: organization, newsletter_notifications: true)
16
+ create_list(:user, 5, :confirmed, organization: organization, newsletter_notifications: true)
17
17
  end
18
18
 
19
19
  let!(:not_deliverable_users) do
20
20
  create_list(:user, 3, organization: organization, newsletter_notifications: false)
21
21
  end
22
+ let!(:unconfirmed_users) do
23
+ create_list(:user, 3, organization: organization, newsletter_notifications: true)
24
+ end
22
25
 
23
26
  let(:command) { described_class.new(newsletter) }
24
27
 
@@ -0,0 +1,117 @@
1
+ # -*- coding: utf-8 -*-
2
+ # frozen_string_literal: true
3
+ require "spec_helper"
4
+
5
+ module Decidim
6
+ module Admin
7
+ describe UpdateParticipatoryProcess, :db do
8
+ describe "call" do
9
+ let(:my_process) { create :participatory_process }
10
+ let(:params) do
11
+ {
12
+ participatory_process: {
13
+ id: my_process.id,
14
+ title_en: 'Foo title',
15
+ title_ca: 'Foo title',
16
+ title_es: 'Foo title',
17
+ subtitle_en: my_process.subtitle,
18
+ subtitle_ca: my_process.subtitle,
19
+ subtitle_es: my_process.subtitle,
20
+ slug: my_process.slug,
21
+ hashtag: my_process.hashtag,
22
+ meta_scope: my_process.meta_scope,
23
+ hero_image: nil,
24
+ banner_image: nil,
25
+ promoted: my_process.promoted,
26
+ description_en: my_process.description,
27
+ description_ca: my_process.description,
28
+ description_es: my_process.description,
29
+ short_description_en: my_process.short_description,
30
+ short_description_ca: my_process.short_description,
31
+ short_description_es: my_process.short_description,
32
+ current_organization: my_process.organization,
33
+ scope: my_process.scope,
34
+ errors: my_process.errors,
35
+ participatory_process_group: my_process.participatory_process_group
36
+ }
37
+ }
38
+ end
39
+ let(:context) do
40
+ { current_organization: my_process.organization }
41
+ end
42
+ let(:form) do
43
+ ParticipatoryProcessForm.from_params(params).with_context(context)
44
+ end
45
+ let(:command) { described_class.new(my_process, form) }
46
+
47
+ describe "when the form is not valid" do
48
+ before do
49
+ expect(form).to receive(:invalid?).and_return(true)
50
+ end
51
+
52
+ it "broadcasts invalid" do
53
+ expect { command.call }.to broadcast(:invalid)
54
+ end
55
+
56
+ it "doesn't update the participatory process" do
57
+ command.call
58
+ my_process.reload
59
+
60
+ expect(my_process.title['en']).not_to eq("Foo title")
61
+ end
62
+ end
63
+
64
+ describe "when the participatory process is not valid" do
65
+ before do
66
+ expect(form).to receive(:invalid?).and_return(false)
67
+ expect(my_process).to receive(:valid?).at_least(:once).and_return(false)
68
+ my_process.errors.add(:hero_image, "Image too big")
69
+ my_process.errors.add(:banner_image, "Image too big")
70
+ end
71
+
72
+ it "broadcasts invalid" do
73
+ expect { command.call }.to broadcast(:invalid)
74
+ end
75
+
76
+ it "adds errors to the form" do
77
+ command.call
78
+
79
+ expect(form.errors[:hero_image]).not_to be_empty
80
+ expect(form.errors[:banner_image]).not_to be_empty
81
+ end
82
+ end
83
+
84
+ describe "when the form is valid" do
85
+ it "broadcasts ok" do
86
+ expect { command.call }.to broadcast(:ok)
87
+ end
88
+
89
+ it "updates the participatory process" do
90
+ expect { command.call }.to broadcast(:ok)
91
+ my_process.reload
92
+
93
+ expect(my_process.title['en']).to eq("Foo title")
94
+ end
95
+
96
+ context "when no homepage image is set" do
97
+ it "does not replace the homepage image" do
98
+ command.call
99
+ my_process.reload
100
+
101
+ expect(my_process.hero_image).to be_present
102
+ end
103
+ end
104
+
105
+ context "when no banner image is set" do
106
+ it "does not replace the banner image" do
107
+ command.call
108
+ my_process.reload
109
+
110
+ expect(my_process.banner_image).to be_present
111
+ end
112
+ end
113
+ end
114
+ end
115
+ end
116
+ end
117
+ end
@@ -35,7 +35,11 @@ describe "Admin invite", type: :feature do
35
35
  find("*[type=submit]").click
36
36
  end
37
37
 
38
- expect(page).to have_content("Dashboard")
38
+ within ".callout-wrapper" do
39
+ page.find('.close-button').click
40
+ end
41
+
42
+ expect(page).to have_content("DASHBOARD")
39
43
  end
40
44
  end
41
45
  end
@@ -19,7 +19,7 @@ describe "manage a feature's permissions", type: :feature do
19
19
  visit decidim_admin.participatory_process_features_path(participatory_process)
20
20
 
21
21
  within ".feature-#{feature.id}" do
22
- click_link "Permissions"
22
+ page.find(".action-icon--permissions").click
23
23
  end
24
24
  end
25
25
 
@@ -47,14 +47,14 @@ describe "Admin manages features", type: :feature do
47
47
  find("*[type=submit]").click
48
48
  end
49
49
 
50
- within_flash_messages do
50
+ within ".callout-wrapper" do
51
51
  expect(page).to have_content("successfully")
52
52
  end
53
53
 
54
54
  expect(page).to have_content("My feature")
55
55
 
56
56
  within find("tr", text: "My feature") do
57
- click_link "Configure"
57
+ page.find(".action-icon--configure").click
58
58
  end
59
59
 
60
60
  within ".global-settings" do
@@ -86,7 +86,7 @@ describe "Admin manages features", type: :feature do
86
86
 
87
87
  it "updates the feature" do
88
88
  within ".feature-#{feature.id}" do
89
- click_link "Configure"
89
+ page.find(".action-icon--configure").click
90
90
  end
91
91
 
92
92
  within ".edit_feature" do
@@ -109,14 +109,14 @@ describe "Admin manages features", type: :feature do
109
109
  find("*[type=submit]").click
110
110
  end
111
111
 
112
- within_flash_messages do
112
+ within ".callout-wrapper" do
113
113
  expect(page).to have_content("successfully")
114
114
  end
115
115
 
116
116
  expect(page).to have_content("My updated feature")
117
117
 
118
118
  within find("tr", text: "My updated feature") do
119
- click_link "Configure"
119
+ page.find(".action-icon--configure").click
120
120
  end
121
121
 
122
122
  within ".global-settings" do
@@ -148,7 +148,7 @@ describe "Admin manages features", type: :feature do
148
148
 
149
149
  it "removes the feature" do
150
150
  within ".feature-#{feature.id}" do
151
- click_link "Destroy"
151
+ page.find(".action-icon--remove").click
152
152
  end
153
153
 
154
154
  expect(page).to have_no_content("My feature")
@@ -169,11 +169,11 @@ describe "Admin manages features", type: :feature do
169
169
  context "when the feature is unpublished" do
170
170
  it "publishes the feature" do
171
171
  within ".feature-#{feature.id}" do
172
- click_link "Publish"
172
+ page.find(".action-icon--publish").click
173
173
  end
174
174
 
175
175
  within ".feature-#{feature.id}" do
176
- expect(page).to have_content("Unpublish")
176
+ expect(page).to have_css(".action-icon--unpublish")
177
177
  end
178
178
  end
179
179
  end
@@ -183,11 +183,11 @@ describe "Admin manages features", type: :feature do
183
183
 
184
184
  it "unpublishes the feature" do
185
185
  within ".feature-#{feature.id}" do
186
- click_link "Unpublish"
186
+ page.find(".action-icon--unpublish").click
187
187
  end
188
188
 
189
189
  within ".feature-#{feature.id}" do
190
- expect(page).to have_content("Publish")
190
+ expect(page).to have_css(".action-icon--publish")
191
191
  end
192
192
  end
193
193
  end
@@ -6,7 +6,7 @@ require "spec_helper"
6
6
  describe "Admin manages newsletters", type: :feature do
7
7
  let(:organization) { create(:organization) }
8
8
  let(:user) { create(:user, :admin, :confirmed, name: "Sarah Kerrigan", organization: organization) }
9
- let!(:deliverable_users) { create_list(:user, 5, newsletter_notifications: true, organization: organization) }
9
+ let!(:deliverable_users) { create_list(:user, 5, :confirmed, newsletter_notifications: true, organization: organization) }
10
10
 
11
11
  before do
12
12
  switch_to_host(organization.host)
@@ -23,7 +23,9 @@ describe "Admin manages newsletters", type: :feature do
23
23
  it "allows a newsletter to be created" do
24
24
  visit decidim_admin.newsletters_path
25
25
 
26
- find("#newsletters .actions .new").click
26
+ within ".secondary-nav" do
27
+ find(".button.new").click
28
+ end
27
29
 
28
30
  within ".new_newsletter" do
29
31
  fill_in_i18n(
@@ -45,7 +47,7 @@ describe "Admin manages newsletters", type: :feature do
45
47
  find("*[type=submit]").click
46
48
  end
47
49
 
48
- expect(page).to have_content("Preview")
50
+ expect(page).to have_content("PREVIEW")
49
51
  expect(page).to have_content("A fancy newsletter for #{user.name}")
50
52
  end
51
53
  end
@@ -83,7 +85,7 @@ describe "Admin manages newsletters", type: :feature do
83
85
  it "allows a newsletter to be updated" do
84
86
  visit decidim_admin.newsletters_path
85
87
  within("tr[data-newsletter-id=\"#{newsletter.id}\"]") do
86
- click_link "Edit"
88
+ page.find('.action-icon.edit').click
87
89
  end
88
90
 
89
91
  within ".edit_newsletter" do
@@ -106,7 +108,7 @@ describe "Admin manages newsletters", type: :feature do
106
108
  find("*[type=submit]").click
107
109
  end
108
110
 
109
- expect(page).to have_content("Preview")
111
+ expect(page).to have_content("PREVIEW")
110
112
  expect(page).to have_content("A fancy newsletter")
111
113
  end
112
114
  end
@@ -117,14 +119,14 @@ describe "Admin manages newsletters", type: :feature do
117
119
  it "allows a newsletter to be created" do
118
120
  visit decidim_admin.newsletter_path(newsletter)
119
121
 
120
- within ".actions" do
122
+ within ".button--double" do
121
123
  find("*", text: "Deliver").click
122
124
  end
123
125
 
124
- expect(page).to have_content("Newsletters")
126
+ expect(page).to have_content("NEWSLETTERS")
125
127
  expect(page).to have_content("successfully")
126
128
 
127
- within ".newsletters tbody" do
129
+ within "tbody" do
128
130
  expect(page).to have_content("5 / 5")
129
131
  end
130
132
  end
@@ -137,7 +139,7 @@ describe "Admin manages newsletters", type: :feature do
137
139
  visit decidim_admin.newsletters_path
138
140
 
139
141
  within("tr[data-newsletter-id=\"#{newsletter.id}\"]") do
140
- click_link "Destroy"
142
+ page.find('.action-icon.action-icon--remove').click
141
143
  end
142
144
 
143
145
  expect(page).to have_content("successfully")