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
@@ -15,11 +15,14 @@ describe "Organization admins", type: :feature do
15
15
  before do
16
16
  login_as admin, scope: :user
17
17
  visit decidim_admin.root_path
18
- click_link "Admin users"
18
+ click_link "Users"
19
+ click_link "Admins"
19
20
  end
20
21
 
21
22
  it "can invite new users" do
22
- find(".actions .new").click
23
+ within ".card-title" do
24
+ find(".button--title").click
25
+ end
23
26
 
24
27
  within ".new_user" do
25
28
  fill_in :user_name, with: "New admin"
@@ -28,7 +31,7 @@ describe "Organization admins", type: :feature do
28
31
  find("*[type=submit]").click
29
32
  end
30
33
 
31
- within ".flash" do
34
+ within ".callout-wrapper" do
32
35
  expect(page).to have_content("successfully")
33
36
  end
34
37
 
@@ -51,7 +54,7 @@ describe "Organization admins", type: :feature do
51
54
 
52
55
  it "can resend the invitation" do
53
56
  within "tr[data-user-id=\"#{user.id}\"]" do
54
- click_link "Resend invitation"
57
+ page.find('.action-icon.resend-invitation').click
55
58
  end
56
59
 
57
60
  expect(page).to have_content("Invitation email sent successfully")
@@ -61,7 +64,7 @@ describe "Organization admins", type: :feature do
61
64
  expect(page).to have_content(other_admin.name)
62
65
 
63
66
  within "tr[data-user-id=\"#{other_admin.id}\"]" do
64
- click_link "Destroy"
67
+ page.find('.action-icon.action-icon--remove').click
65
68
  end
66
69
 
67
70
  expect(page).not_to have_content(other_admin.name)
@@ -15,11 +15,12 @@ describe "Organization scopes", type: :feature do
15
15
  before do
16
16
  login_as admin, scope: :user
17
17
  visit decidim_admin.root_path
18
+ click_link "Settings"
18
19
  click_link "Scopes"
19
20
  end
20
21
 
21
22
  it "can create new scopes" do
22
- find(".actions .new").click
23
+ click_link "Add"
23
24
 
24
25
  within ".new_scope" do
25
26
  fill_in :scope_name, with: "My nice district"
@@ -27,7 +28,7 @@ describe "Organization scopes", type: :feature do
27
28
  find("*[type=submit]").click
28
29
  end
29
30
 
30
- within ".flash" do
31
+ within ".callout-wrapper" do
31
32
  expect(page).to have_content("successfully")
32
33
  end
33
34
 
@@ -45,7 +46,7 @@ describe "Organization scopes", type: :feature do
45
46
 
46
47
  it "can edit them" do
47
48
  within find("tr", text: scope.name) do
48
- click_link "Edit"
49
+ page.find('a.action-icon.action-icon--edit').click
49
50
  end
50
51
 
51
52
  within ".edit_scope" do
@@ -53,7 +54,7 @@ describe "Organization scopes", type: :feature do
53
54
  find("*[type=submit]").click
54
55
  end
55
56
 
56
- within ".flash" do
57
+ within ".callout-wrapper" do
57
58
  expect(page).to have_content("successfully")
58
59
  end
59
60
 
@@ -64,10 +65,10 @@ describe "Organization scopes", type: :feature do
64
65
 
65
66
  it "can destroy them" do
66
67
  within find("tr", text: scope.name) do
67
- click_link "Destroy"
68
+ page.find('a.action-icon.action-icon--remove').click
68
69
  end
69
70
 
70
- within ".flash" do
71
+ within ".callout-wrapper" do
71
72
  expect(page).to have_content("successfully")
72
73
  end
73
74
 
@@ -30,7 +30,21 @@ describe "Admin manages ogranization", type: :feature do
30
30
  ca: "El meu súper text de benvinguda"
31
31
  }
32
32
 
33
+ %w(Twitter Facebook Instagram YouTube GitHub).each do |network|
34
+ click_link network
35
+ fill_in "organization_#{network.downcase}_handler", with: "decidim"
36
+ end
37
+
33
38
  click_button "Update organization"
39
+ select "Castellano", from: "Default locale"
40
+ fill_in "Reference prefix", with: "ABC"
41
+ fill_in "Official organization url", with: "http://www.example.com"
42
+
43
+ attach_file "Homepage image", Decidim::Dev.asset("city.jpeg")
44
+ attach_file "Logo", Decidim::Dev.asset("city2.jpeg")
45
+ attach_file "Icon", Decidim::Dev.asset("city3.jpeg")
46
+ attach_file "Official logo header", Decidim::Dev.asset("city2.jpeg")
47
+ attach_file "Official logo footer", Decidim::Dev.asset("city3.jpeg")
34
48
 
35
49
  expect(page).to have_content("updated successfully")
36
50
  end
@@ -14,7 +14,7 @@ describe "Admin manage participatory process groups", type: :feature do
14
14
  end
15
15
 
16
16
  it "creates a new participatory process group" do
17
- find(".actions .new").click
17
+ find(".card-title .new").click
18
18
 
19
19
  within ".new_participatory_process_group" do
20
20
  fill_in_i18n(
@@ -37,7 +37,7 @@ describe "Admin manage participatory process groups", type: :feature do
37
37
  find("*[type=submit]").click
38
38
  end
39
39
 
40
- within ".flash" do
40
+ within ".callout-wrapper" do
41
41
  expect(page).to have_content("successfully")
42
42
  end
43
43
 
@@ -56,7 +56,7 @@ describe "Admin manage participatory process groups", type: :feature do
56
56
 
57
57
  it "can edit them" do
58
58
  within find("tr", text: participatory_process_group.name["en"]) do
59
- click_link "Edit"
59
+ page.find('.action-icon.action-icon--edit').click
60
60
  end
61
61
 
62
62
  within ".edit_participatory_process_group" do
@@ -80,7 +80,7 @@ describe "Admin manage participatory process groups", type: :feature do
80
80
  find("*[type=submit]").click
81
81
  end
82
82
 
83
- within ".flash" do
83
+ within ".callout-wrapper" do
84
84
  expect(page).to have_content("successfully")
85
85
  end
86
86
 
@@ -92,10 +92,10 @@ describe "Admin manage participatory process groups", type: :feature do
92
92
 
93
93
  it "can destroy them" do
94
94
  within find("tr", text: participatory_process_group.name["en"]) do
95
- click_link "Destroy"
95
+ page.find('.action-icon.action-icon--remove').click
96
96
  end
97
97
 
98
- within ".flash" do
98
+ within ".callout-wrapper" do
99
99
  expect(page).to have_content("successfully")
100
100
  end
101
101
 
@@ -15,7 +15,9 @@ describe "Admin manage participatory processes", type: :feature do
15
15
  end
16
16
 
17
17
  it "creates a new participatory_process" do
18
- find(".actions .new").click
18
+ within ".secondary-nav__actions" do
19
+ page.find('a.button').click
20
+ end
19
21
 
20
22
  within ".new_participatory_process" do
21
23
  fill_in_i18n(
@@ -58,11 +60,11 @@ describe "Admin manage participatory processes", type: :feature do
58
60
  find("*[type=submit]").click
59
61
  end
60
62
 
61
- within ".flash" do
63
+ within ".callout-wrapper" do
62
64
  expect(page).to have_content("successfully")
63
65
  end
64
66
 
65
- within ".tabs-content" do
67
+ within ".container" do
66
68
  expect(page).to have_content("My participatory process")
67
69
  expect(page).to have_content(@group_name)
68
70
  expect(page).to have_css("img[src*='#{image1_filename}']")
@@ -70,6 +72,27 @@ describe "Admin manage participatory processes", type: :feature do
70
72
  end
71
73
  end
72
74
 
75
+ context "updating a participatory process" do
76
+ let!(:participatory_process3) { create(:participatory_process, organization: organization) }
77
+
78
+ before do
79
+ visit decidim_admin.participatory_processes_path
80
+ end
81
+
82
+ it "update a participatory process without images does not delete them" do
83
+ click_link translated(participatory_process3.title)
84
+ click_processes_menu_link "Info"
85
+ click_button "Update participatory process"
86
+
87
+ within ".callout-wrapper" do
88
+ expect(page).to have_content("successfully")
89
+ end
90
+
91
+ expect(page).to have_css("img[src*='#{participatory_process3.hero_image.url}']")
92
+ expect(page).to have_css("img[src*='#{participatory_process3.banner_image.url}']")
93
+ end
94
+ end
95
+
73
96
  context "deleting a participatory process" do
74
97
  let!(:participatory_process2) { create(:participatory_process, organization: organization) }
75
98
 
@@ -79,10 +102,9 @@ describe "Admin manage participatory processes", type: :feature do
79
102
 
80
103
  it "deletes a participatory_process" do
81
104
  click_link translated(participatory_process2.title)
82
- click_processes_menu_link "Settings"
83
105
  click_link "Destroy"
84
106
 
85
- within ".flash" do
107
+ within ".callout-wrapper" do
86
108
  expect(page).to have_content("successfully")
87
109
  end
88
110
 
@@ -17,7 +17,7 @@ describe "Admin manage user groups", type: :feature do
17
17
 
18
18
  it "verifies a user group" do
19
19
  within "tr[data-user-group-id=\"#{user_group.id}\"]" do
20
- click_button "Verify", match: :first
20
+ click_link "Verify", match: :first
21
21
  end
22
22
 
23
23
  expect(page).to have_content("verified successfully")
@@ -12,8 +12,8 @@ describe "Participatory process admin manages participatory process admins", typ
12
12
  before do
13
13
  switch_to_host(organization.host)
14
14
  login_as user, scope: :user
15
- visit decidim_admin.participatory_process_path(participatory_process)
16
- click_link "Process admins"
15
+ visit decidim_admin.edit_participatory_process_path(participatory_process)
16
+ click_link "Process users"
17
17
  end
18
18
 
19
19
  it "cannot remove himself" do
@@ -35,7 +35,9 @@ describe "Content pages", type: :feature do
35
35
  end
36
36
 
37
37
  it "can create new pages" do
38
- find(".actions .new").click
38
+ within ".secondary-nav" do
39
+ find(".new").click
40
+ end
39
41
 
40
42
  within ".new_static_page" do
41
43
  fill_in :static_page_slug, with: "welcome"
@@ -59,7 +61,7 @@ describe "Content pages", type: :feature do
59
61
  find("*[type=submit]").click
60
62
  end
61
63
 
62
- within ".flash" do
64
+ within ".callout-wrapper" do
63
65
  expect(page).to have_content("successfully")
64
66
  end
65
67
 
@@ -77,7 +79,7 @@ describe "Content pages", type: :feature do
77
79
 
78
80
  it "can edit them" do
79
81
  within find("tr", text: translated(decidim_page.title)) do
80
- click_link "Edit"
82
+ page.find('.action-icon.action-icon--edit').click
81
83
  end
82
84
 
83
85
  within ".edit_static_page" do
@@ -94,7 +96,7 @@ describe "Content pages", type: :feature do
94
96
  find("*[type=submit]").click
95
97
  end
96
98
 
97
- within ".flash" do
99
+ within ".callout-wrapper" do
98
100
  expect(page).to have_content("successfully")
99
101
  end
100
102
 
@@ -110,10 +112,10 @@ describe "Content pages", type: :feature do
110
112
 
111
113
  it "can destroy them" do
112
114
  within find("tr", text: translated(decidim_page.title)) do
113
- click_link "Destroy"
115
+ page.find('.action-icon.action-icon--remove').click
114
116
  end
115
117
 
116
- within ".flash" do
118
+ within ".callout-wrapper" do
117
119
  expect(page).to have_content("successfully")
118
120
  end
119
121
 
@@ -124,7 +126,7 @@ describe "Content pages", type: :feature do
124
126
 
125
127
  it "can visit them" do
126
128
  within find("tr", text: translated(decidim_page.title)) do
127
- click_link "View public page"
129
+ page.find('.action-icon.action-icon--preview').click
128
130
  end
129
131
 
130
132
  expect(page).to have_content(translated(decidim_page.title))
@@ -7,10 +7,12 @@ module Decidim
7
7
  let!(:newsletter) { create(:newsletter, organization: organization, total_deliveries: 0) }
8
8
  let!(:organization) { create(:organization) }
9
9
  let!(:deliverable_user) { create(:user, :confirmed, newsletter_notifications: true, organization: organization) }
10
+ let!(:undeliverable_user) { create(:user, newsletter_notifications: true, organization: organization) }
10
11
  let!(:non_deliverable_user) { create(:user, :confirmed, newsletter_notifications: false, organization: organization) }
11
12
 
12
13
  it "delivers a newsletter to a the eligible users" do
13
14
  expect(NewsletterDeliveryJob).to receive(:perform_later).with(deliverable_user, newsletter)
15
+ expect(NewsletterDeliveryJob).not_to receive(:perform_later).with(undeliverable_user, newsletter)
14
16
 
15
17
  NewsletterJob.perform_now(newsletter)
16
18
  end
@@ -5,13 +5,14 @@ describe Decidim::Admin::ProcessAdminRolesForProcess do
5
5
  let(:organization) { create :organization }
6
6
  let!(:process1) { create :participatory_process, organization: organization }
7
7
  let!(:process2) { create :participatory_process, organization: organization }
8
- let!(:user_role1) { create :participatory_process_user_role, participatory_process: process1 }
8
+ let!(:user_role1) { create :participatory_process_user_role, participatory_process: process1, role: :admin }
9
9
  let!(:user_role2) { create :participatory_process_user_role, participatory_process: process2 }
10
+ let!(:user_role3) { create :participatory_process_user_role, participatory_process: process1, role: :collaborator }
10
11
 
11
12
  subject { described_class.new(process1) }
12
13
 
13
14
  it "returns only the user roles for the given process" do
14
- expect(subject.query)
15
- .to eq [user_role1]
15
+ expect(subject.query).to include user_role1
16
+ expect(subject.query).to include user_role3
16
17
  end
17
18
  end
@@ -5,8 +5,8 @@ RSpec.shared_examples "manage process admins examples" do
5
5
  before do
6
6
  switch_to_host(organization.host)
7
7
  login_as user, scope: :user
8
- visit decidim_admin.participatory_process_path(participatory_process)
9
- click_link "Process admins"
8
+ visit decidim_admin.edit_participatory_process_path(participatory_process)
9
+ click_link "Process users"
10
10
  end
11
11
 
12
12
  it "process admins" do
@@ -16,8 +16,9 @@ RSpec.shared_examples "manage process admins examples" do
16
16
  end
17
17
 
18
18
  it "creates a new process admin" do
19
+ find(".card-title a.new").click
19
20
 
20
- within "#process_admins form" do
21
+ within ".new_participatory_process_user_role" do
21
22
  fill_in :participatory_process_user_role_email, with: other_user.email
22
23
  fill_in :participatory_process_user_role_name, with: "John Doe"
23
24
  select "admin", from: :participatory_process_user_role_role
@@ -25,7 +26,7 @@ RSpec.shared_examples "manage process admins examples" do
25
26
  find("*[type=submit]").click
26
27
  end
27
28
 
28
- within ".flash" do
29
+ within ".callout-wrapper" do
29
30
  expect(page).to have_content("successfully")
30
31
  end
31
32
 
@@ -34,19 +35,41 @@ RSpec.shared_examples "manage process admins examples" do
34
35
  end
35
36
  end
36
37
 
37
- context "deleting a participatory process step" do
38
+ describe "when managing different users" do
38
39
  let!(:user_role2) { create(:participatory_process_user_role, participatory_process: participatory_process, user: other_user) }
39
40
 
40
41
  before do
41
42
  visit current_path
42
43
  end
43
44
 
44
- it "deletes a participatory_process_step" do
45
+ it "updates a process admin" do
46
+ within "#process_admins" do
47
+ within find("#process_admins tr", text: other_user.email) do
48
+ page.find('.action-icon--edit').click
49
+ end
50
+ end
51
+
52
+ within ".edit_participatory_process_user_roles" do
53
+ select "admin", from: :participatory_process_user_role_role
54
+
55
+ find("*[type=submit]").click
56
+ end
57
+
58
+ within ".callout-wrapper" do
59
+ expect(page).to have_content("successfully")
60
+ end
61
+
62
+ within "#process_admins table" do
63
+ expect(page).to have_content("Administrator")
64
+ end
65
+ end
66
+
67
+ it "deletes a participatory_process_user_role" do
45
68
  within find("#process_admins tr", text: other_user.email) do
46
- click_link "Destroy"
69
+ page.find('a.action-icon--remove').click
47
70
  end
48
71
 
49
- within ".flash" do
72
+ within ".callout-wrapper" do
50
73
  expect(page).to have_content("successfully")
51
74
  end
52
75
 
@@ -8,7 +8,7 @@ RSpec.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.participatory_process_path(participatory_process)
11
+ visit decidim_admin.edit_participatory_process_path(participatory_process)
12
12
  click_link "Attachments"
13
13
  end
14
14
 
@@ -4,29 +4,14 @@ RSpec.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.participatory_process_path(participatory_process)
7
+ visit decidim_admin.edit_participatory_process_path(participatory_process)
8
8
  click_link "Categories"
9
9
  end
10
10
 
11
- it "displays all fields from a single category" do
12
- within "#categories table" do
13
- click_link translated(category.name)
14
- end
15
-
16
- within "dl" do
17
- expect(page).to have_i18n_content(category.name, locale: :en)
18
- expect(page).to have_i18n_content(category.name, locale: :es)
19
- expect(page).to have_i18n_content(category.name, locale: :ca)
20
- expect(page).to have_i18n_content(category.description, locale: :en)
21
- expect(page).to have_i18n_content(category.description, locale: :es)
22
- expect(page).to have_i18n_content(category.description, locale: :ca)
23
- end
24
- end
25
-
26
11
  it "creates a new category" do
27
- find("#categories .actions .new").click
12
+ find(".card-title a.new").click
28
13
 
29
- within ".new_category" do
14
+ within ".new_participatory_process_category" do
30
15
  fill_in_i18n(
31
16
  :category_name,
32
17
  "#name-tabs",
@@ -45,7 +30,7 @@ RSpec.shared_examples "manage process categories examples" do
45
30
  find("*[type=submit]").click
46
31
  end
47
32
 
48
- within ".flash" do
33
+ within ".callout-wrapper" do
49
34
  expect(page).to have_content("successfully")
50
35
  end
51
36
 
@@ -57,11 +42,11 @@ RSpec.shared_examples "manage process categories examples" do
57
42
  it "updates a category" do
58
43
  within "#categories" do
59
44
  within find("tr", text: translated(category.name)) do
60
- click_link "Edit"
45
+ page.find('a.action-icon--edit').click
61
46
  end
62
47
  end
63
48
 
64
- within ".edit_category" do
49
+ within ".edit_participatory_process_category" do
65
50
  fill_in_i18n(
66
51
  :category_name,
67
52
  "#name-tabs",
@@ -73,7 +58,7 @@ RSpec.shared_examples "manage process categories examples" do
73
58
  find("*[type=submit]").click
74
59
  end
75
60
 
76
- within ".flash" do
61
+ within ".callout-wrapper" do
77
62
  expect(page).to have_content("successfully")
78
63
  end
79
64
 
@@ -92,10 +77,10 @@ RSpec.shared_examples "manage process categories examples" do
92
77
 
93
78
  it "deletes a category" do
94
79
  within find("tr", text: translated(category2.name)) do
95
- click_link "Destroy"
80
+ page.find('a.action-icon--remove').click
96
81
  end
97
82
 
98
- within ".flash" do
83
+ within ".callout-wrapper" do
99
84
  expect(page).to have_content("successfully")
100
85
  end
101
86
 
@@ -114,10 +99,10 @@ RSpec.shared_examples "manage process categories examples" do
114
99
 
115
100
  it "deletes a category" do
116
101
  within find("tr", text: translated(category2.name)) do
117
- click_link "Destroy"
102
+ page.find('a.action-icon--remove').click
118
103
  end
119
104
 
120
- within ".flash" do
105
+ within ".callout-wrapper" do
121
106
  expect(page).to have_content("error deleting")
122
107
  end
123
108