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
@@ -1,11 +1,13 @@
1
- <% provide :title do %>
2
- <h2><%= t ".name" %></h2>
3
- <% end %>
4
-
5
- <%= decidim_form_for(@form) do |f| %>
6
- <%= render partial: 'form', object: f %>
7
-
8
- <div class="actions">
1
+ <%= decidim_form_for(@form, html: { class: "form new_participatory_process_group" }) do |f| %>
2
+ <div class="card">
3
+ <div class="card-divider">
4
+ <h2 class="card-title"><%= t ".title" %></h2>
5
+ </div>
6
+ <div class="card-section">
7
+ <%= render partial: 'form', object: f %>
8
+ </div>
9
+ </div>
10
+ <div class="button--double form-general-submit">
9
11
  <%= f.submit t(".create") %>
10
12
  </div>
11
13
  <% end %>
@@ -1,15 +1,25 @@
1
- <div class="field">
2
- <%= form.translated :text_field, :title, autofocus: true %>
3
- </div>
1
+ <div class="card">
2
+ <div class="card-divider">
3
+ <h2 class="card-title"><%= title %></h2>
4
+ </div>
4
5
 
5
- <div class="field">
6
- <%= form.translated :editor, :description, toolbar: :full, lines: 25 %>
7
- </div>
6
+ <div class="card-section">
7
+ <div class="row column">
8
+ <%= form.translated :text_field, :title, autofocus: true %>
9
+ </div>
8
10
 
9
- <div class="field">
10
- <%= form.date_field :start_date %>
11
- </div>
11
+ <div class="row column">
12
+ <%= form.translated :editor, :description, toolbar: :full, lines: 25 %>
13
+ </div>
14
+
15
+ <div class="row">
16
+ <div class="columns xlarge-6">
17
+ <%= form.date_field :start_date %>
18
+ </div>
12
19
 
13
- <div class="field">
14
- <%= form.date_field :end_date %>
20
+ <div class="columns xlarge-6">
21
+ <%= form.date_field :end_date %>
22
+ </div>
23
+ </div>
24
+ </div>
15
25
  </div>
@@ -1,9 +1,8 @@
1
- <h3><%= t ".title" %></h3>
2
1
 
3
- <%= decidim_form_for(@form, url: participatory_process_step_path(@participatory_process_step.participatory_process, @participatory_process_step)) do |f| %>
4
- <%= render partial: 'form', object: f %>
2
+ <%= decidim_form_for(@form, url: participatory_process_step_path(@participatory_process_step.participatory_process, @participatory_process_step), html: { class: "form edit_participatory_process_step" }) do |f| %>
3
+ <%= render partial: 'form', object: f, locals: { title: t('.title') } %>
5
4
 
6
- <div class="actions">
5
+ <div class="button--double form-general-submit">
7
6
  <%= f.submit t(".update") %>
8
7
  </div>
9
8
  <% end %>
@@ -1,53 +1,62 @@
1
- <section id="steps">
2
- <h4><%= t(".steps_title", scope: "decidim.admin") %></h4>
1
+ <div class="card" id="steps">
2
+ <div class="card-divider">
3
+ <h2 class="card-title">
4
+ <%= t(".steps_title", scope: "decidim.admin") %>
5
+ <% if can? :create, Decidim::ParticipatoryProcessStep %>
6
+ <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.participatory_process_step.name", scope: "decidim.admin")), new_participatory_process_step_path(participatory_process), class: 'button tiny button--title' %>
7
+ <% end %>
8
+ </h2>
9
+ </div>
3
10
 
4
- <% if can? :create, Decidim::ParticipatoryProcessStep %>
5
- <div class="actions title">
6
- <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.participatory_process_step.name", scope: "decidim.admin")), new_participatory_process_step_path(participatory_process), class: 'new' %>
7
- </div>
8
- <% end %>
11
+ <div class="card-section">
12
+ <div class="table-scroll">
13
+ <% if participatory_process.steps.any? %>
14
+ <table class="table-list">
15
+ <thead>
16
+ <tr>
17
+ <th><%= t("models.participatory_process_step.fields.title", scope: "decidim.admin") %></th>
18
+ <th><%= t("models.participatory_process_step.fields.start_date", scope: "decidim.admin") %></th>
19
+ <th><%= t("models.participatory_process_step.fields.end_date", scope: "decidim.admin") %></th>
20
+ <th class="actions"></th>
21
+ </tr>
22
+ </thead>
23
+ <tbody class="sortable" data-sort-url="<%= ordering_participatory_process_steps_path(participatory_process) %>">
24
+ <% participatory_process.steps.each do |step| %>
25
+ <tr data-id="<%= step.id %>">
26
+ <td>
27
+ <% if step.active? %>
28
+ <span class="icon-active"></span>
29
+ <% end %>
30
+ <%= link_to translated_attribute(step.title), edit_participatory_process_step_path(participatory_process, step) %><br />
31
+ </td>
32
+ <td>
33
+ <% if step.start_date %>
34
+ <%= l step.start_date.to_date, format: :long %>
35
+ <% end%>
36
+ </td>
37
+ <td>
38
+ <% if step.end_date %>
39
+ <%= l step.end_date.to_date, format: :long %>
40
+ <% end%>
41
+ </td>
42
+ <td class="table-list__actions">
43
+ <% if can?(:activate, step) && !step.active? %>
44
+ <%= icon_link_to "circle-check", participatory_process_step_activate_path(participatory_process, step), t("actions.activate", scope: "decidim.admin"), class: "action-icon--activate", method: :post %>
45
+ <% end %>
46
+
47
+ <% if can? :update, step %>
48
+ <%= icon_link_to "pencil", edit_participatory_process_step_path(participatory_process, step), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
49
+ <% end %>
9
50
 
10
- <% if participatory_process.steps.any? %>
11
- <p><%= t(".steps_hint", scope: "decidim.admin") %></p>
12
- <table class="stack">
13
- <thead>
14
- <tr>
15
- <th><%= t("models.participatory_process_step.fields.title", scope: "decidim.admin") %></th>
16
- <th><%= t("models.participatory_process_step.fields.start_date", scope: "decidim.admin") %></th>
17
- <th><%= t("models.participatory_process_step.fields.end_date", scope: "decidim.admin") %></th>
18
- <th><%= t("models.participatory_process_step.fields.active", scope: "decidim.admin") %></th>
19
- <th class="actions"><%= t("actions.title", scope: "decidim.admin") %></th>
20
- </tr>
21
- </thead>
22
- <tbody class="sortable" data-sort-url="<%= ordering_participatory_process_steps_path(participatory_process) %>">
23
- <% participatory_process.steps.each do |step| %>
24
- <tr data-id="<%= step.id %>">
25
- <td>
26
- <%= link_to translated_attribute(step.title), participatory_process_step_path(participatory_process, step) %><br />
27
- </td>
28
- <td>
29
- <% if step.start_date %>
30
- <%= l step.start_date.to_date, format: :long %>
31
- <% end%>
32
- </td>
33
- <td>
34
- <% if step.end_date %>
35
- <%= l step.end_date.to_date, format: :long %>
36
- <% end%>
37
- </td>
38
- <td>
39
- <%= humanize_boolean step.active? %>
40
- </td>
41
- <td class="actions">
42
- <%= link_to t("actions.edit", scope: "decidim.admin"), edit_participatory_process_step_path(participatory_process, step) if can? :update, step %>
43
- <% if can?(:activate, step) && !step.active? %>
44
- <%= link_to t("actions.activate", scope: "decidim.admin"), participatory_process_step_activate_path(participatory_process, step), method: :post, class: "small button secondary" %>
45
- <% end %>
46
- <%= link_to t("actions.destroy", scope: "decidim.admin"), participatory_process_step_path(participatory_process, step), method: :delete, class: "small alert button", data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } if can? :destroy, step %>
47
- </td>
48
- </tr>
49
- <% end %>
50
- </tbody>
51
- </table>
52
- <% end %>
53
- </section>
51
+ <% if can? :destroy, step %>
52
+ <%= icon_link_to "circle-x", participatory_process_step_path(participatory_process, step), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
53
+ <% end %>
54
+ </td>
55
+ </tr>
56
+ <% end %>
57
+ </tbody>
58
+ </table>
59
+ <% end %>
60
+ </div>
61
+ </div>
62
+ </div>
@@ -1,9 +1,8 @@
1
- <h3><%= t ".title" %></h3>
1
+ <%= decidim_form_for(@form, html: { class: "form new_participatory_process_step" }) do |f| %>
2
+ <%= render partial: 'form', object: f, locals: { title: t('.title') } %>
2
3
 
3
- <%= decidim_form_for(@form) do |f| %>
4
- <%= render partial: 'form', object: f %>
5
-
6
- <div class="actions">
4
+ <div class="button--double form-general-submit">
7
5
  <%= f.submit t(".create") %>
8
6
  </div>
9
7
  <% end %>
8
+
@@ -0,0 +1,23 @@
1
+ <div class="card">
2
+ <div class="card-divider">
3
+ <h2 class="card-title">
4
+ <%= title %>
5
+ </h2>
6
+ </div>
7
+
8
+ <div class="card-section">
9
+ <div class="row">
10
+ <div class="columns xlarge-4">
11
+ <%= form.text_field :name, readonly: @form.persisted? %>
12
+ </div>
13
+ <div class="columns xlarge-4">
14
+ <%= form.email_field :email, readonly: @form.persisted? %>
15
+ </div>
16
+ <div class="columns xlarge-4">
17
+ <%= form.label :role %>
18
+ <%= select :participatory_process_user_role, :role, Decidim::Admin::ParticipatoryProcessUserRole::ROLES, include_blank: false %>
19
+ </div>
20
+ </div>
21
+
22
+ </div>
23
+ </div>
@@ -0,0 +1,7 @@
1
+ <%= decidim_form_for(@form, url: participatory_process_user_role_path(@user_role.participatory_process, @user_role), html: { class: "form edit_participatory_process_user_roles" }) do |f| %>
2
+ <%= render partial: 'form', object: f, locals: { title: t('.title') } %>
3
+
4
+ <div class="button--double form-general-submit">
5
+ <%= f.submit t(".update") %>
6
+ </div>
7
+ <% end %>
@@ -1,37 +1,49 @@
1
- <section id="process_admins">
2
- <h3><%= t(".process_admins_title", scope: "decidim.admin") %></h3>
3
- <table class="stack">
4
- <thead>
5
- <tr>
6
- <th><%= t("models.participatory_process_user_role.fields.email", scope: "decidim.admin") %></th>
7
- <th class="actions"><%= t("actions.title", scope: "decidim.admin") %></th>
8
- </tr>
9
- </thead>
10
- <tbody>
11
- <% process_admin_roles.each do |role| %>
12
- <tr>
13
- <td>
14
- <%= role.user.email %><br />
15
- </td>
16
- <td class="actions">
17
- <%= link_to t("actions.destroy", scope: "decidim.admin"), participatory_process_user_role_path(participatory_process, role), method: :delete, class: "small alert button", data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } if can? :destroy, role %>
18
- </td>
19
- </tr>
1
+ <div class='card' id="process_admins">
2
+ <div class="card-divider">
3
+ <h2 class="card-title">
4
+ <%= t(".process_admins_title", scope: "decidim.admin") %>
5
+ <% if can? :create, Decidim::Admin::ParticipatoryProcessUserRole %>
6
+ <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.participatory_process_user_role.name", scope: "decidim.admin")), new_participatory_process_user_role_path(participatory_process), class: 'button tiny button--title new' %>
20
7
  <% end %>
21
- </tbody>
22
- </table>
8
+ </h2>
9
+ </div>
23
10
 
24
- <%= decidim_form_for :participatory_process_user_role, url: participatory_process_user_roles_path(participatory_process) do |form| %>
25
- <div class="field">
26
- <%= form.text_field :name %>
27
- </div>
28
- <div class="field">
29
- <%= form.email_field :email %>
30
- </div>
31
- <div class="field">
32
- <%= form.label :roles %>
33
- <%= select :participatory_process_user_role, :role, Decidim::Admin::ParticipatoryProcessUserRole::ROLES, include_blank: false %>
11
+ <div class="card-section">
12
+ <div class="table-scroll">
13
+ <table class="stack">
14
+ <thead>
15
+ <tr>
16
+ <th><%= t("models.participatory_process_user_role.fields.name", scope: "decidim.admin") %></th>
17
+ <th><%= t("models.participatory_process_user_role.fields.email", scope: "decidim.admin") %></th>
18
+ <th><%= t("models.participatory_process_user_role.fields.role", scope: "decidim.admin") %></th>
19
+ <th class="actions"></th>
20
+ </tr>
21
+ </thead>
22
+ <tbody>
23
+ <% process_admin_roles.each do |role| %>
24
+ <tr>
25
+ <td>
26
+ <%= role.user.name %><br />
27
+ </td>
28
+ <td>
29
+ <%= role.user.email %><br />
30
+ </td>
31
+ <td>
32
+ <%= t(".#{role.role}", scope: "decidim.admin") %><br />
33
+ </td>
34
+ <td class="table-list__actions">
35
+ <% if can? :update, role %>
36
+ <%= icon_link_to "pencil", edit_participatory_process_user_role_path(participatory_process, role), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
37
+ <% end %>
38
+
39
+ <% if can? :destroy, role %>
40
+ <%= icon_link_to "circle-x", participatory_process_user_role_path(participatory_process, role), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
41
+ <% end %>
42
+ </td>
43
+ </tr>
44
+ <% end %>
45
+ </tbody>
46
+ </table>
34
47
  </div>
35
- <%= form.submit t("actions.create", scope: "decidim.admin") %>
36
- <% end %>
37
- </section>
48
+ </div>
49
+ </div>
@@ -0,0 +1,7 @@
1
+ <%= decidim_form_for(@form, html: { class: "form new_participatory_process_user_role" }) do |f| %>
2
+ <%= render partial: 'form', object: f, locals: { title: t('.title') } %>
3
+
4
+ <div class="button--double form-general-submit">
5
+ <%= f.submit t(".create") %>
6
+ </div>
7
+ <% end %>
@@ -1,73 +1,104 @@
1
- <div class="field">
2
- <%= form.translated :text_field, :title, autofocus: true %>
3
- </div>
4
-
5
- <div class="field">
6
- <%= form.translated :text_field, :subtitle %>
7
- </div>
8
-
9
- <div class="field">
10
- <%= form.text_field :slug %>
11
- </div>
12
-
13
- <div class="field">
14
- <%= form.text_field :hashtag %>
15
- </div>
16
-
17
- <div class="field">
18
- <%= form.translated :editor, :short_description %>
19
- </div>
20
-
21
- <div class="field">
22
- <%= form.translated :editor, :description, toolbar: :full, lines: 25 %>
23
- </div>
24
-
25
- <div class="field">
26
- <%= form.file_field :hero_image %>
27
- </div>
28
-
29
- <div class="field">
30
- <%= form.file_field :banner_image %>
31
- </div>
32
-
33
- <div class="field">
34
- <%= form.check_box :promoted %>
35
- </div>
36
-
37
- <div class="field">
38
- <%= form.date_field :end_date %>
39
- </div>
40
-
41
- <div class="field">
42
- <%= form.translated :text_field, :meta_scope %>
43
- </div>
44
-
45
- <div class="field">
46
- <%= form.translated :text_field, :developer_group %>
47
- </div>
48
-
49
- <div class="field">
50
- <%= form.translated :text_field, :local_area %>
51
- </div>
52
-
53
- <div class="field">
54
- <%= form.translated :text_field, :target %>
55
- </div>
56
-
57
- <div class="field">
58
- <%= form.translated :text_field, :participatory_scope %>
59
- </div>
60
-
61
- <div class="field">
62
- <%= form.translated :text_field, :participatory_structure %>
63
- </div>
64
-
65
- <div class="field">
66
- <%= form.collection_select :scope_id, organization_scopes, :id, :name %>
67
- </div>
68
-
69
- <div class="field">
70
- <% if process_groups_for_select %>
71
- <%= form.select :participatory_process_group_id, process_groups_for_select, prompt: I18n.t("decidim.participatory_processes.participatory_process_groups.none") %>
72
- <% end %>
1
+ <div class="card">
2
+ <div class="card-divider">
3
+ <h2 class="card-title"><%= t ".title" %></h2>
4
+ </div>
5
+
6
+ <div class="card-section">
7
+ <div class="row column">
8
+ <%= form.translated :text_field, :title, autofocus: true %>
9
+ </div>
10
+
11
+ <div class="row column">
12
+ <%= form.translated :text_field, :subtitle %>
13
+ </div>
14
+
15
+ <div class="row">
16
+ <div class="columns xlarge-6">
17
+ <%= form.text_field :slug %>
18
+ </div>
19
+
20
+ <div class="columns xlarge-6">
21
+ <%= form.text_field :hashtag %>
22
+ </div>
23
+ </div>
24
+
25
+ <div class="row column">
26
+ <%= form.check_box :promoted %>
27
+ </div>
28
+
29
+ <div class="row column">
30
+ <%= form.translated :editor, :short_description %>
31
+ </div>
32
+
33
+ <div class="row column">
34
+ <%= form.translated :editor, :description, toolbar: :full, lines: 25 %>
35
+ </div>
36
+
37
+ <div class="row">
38
+ <div class="columns xlarge-6">
39
+ <%= form.file_field :hero_image %>
40
+ <% if @participatory_process && @participatory_process.hero_image.present? %>
41
+ <label><%= t('.current_image') %></label>
42
+ <%= image_tag @participatory_process.hero_image.url %>
43
+ <label><%= t('.url') %></label>
44
+ <%= link_to @participatory_process.hero_image.url, @participatory_process.hero_image.url, target: "_blank" %>
45
+ <% end %>
46
+ </div>
47
+
48
+ <div class="columns xlarge-6">
49
+ <%= form.file_field :banner_image %>
50
+ <% if @participatory_process && @participatory_process.banner_image.present? %>
51
+ <label><%= t('.current_image') %></label>
52
+ <%= image_tag @participatory_process.banner_image.url %>
53
+ <label><%= t('.url') %></label>
54
+ <%= link_to @participatory_process.banner_image.url, @participatory_process.banner_image.url, target: "_blank" %>
55
+ <% end %>
56
+ </div>
57
+ </div>
58
+
59
+
60
+ <div class="row">
61
+ <div class="columns xlarge-6">
62
+ <%= form.date_field :end_date %>
63
+ </div>
64
+
65
+ <div class="columns xlarge-6">
66
+ <%= form.translated :text_field, :meta_scope %>
67
+ </div>
68
+ </div>
69
+
70
+ <div class="row">
71
+ <div class="columns xlarge-6">
72
+ <%= form.translated :text_field, :developer_group %>
73
+ </div>
74
+
75
+ <div class="columns xlarge-6">
76
+ <%= form.translated :text_field, :local_area %>
77
+ </div>
78
+ </div>
79
+
80
+ <div class="row">
81
+ <div class="columns xlarge-6">
82
+ <%= form.translated :text_field, :target %>
83
+ </div>
84
+
85
+ <div class="columns xlarge-6">
86
+ <%= form.collection_select :scope_id, organization_scopes, :id, :name %>
87
+ </div>
88
+ </div>
89
+
90
+ <div class="row column">
91
+ <%= form.translated :text_field, :participatory_scope %>
92
+ </div>
93
+
94
+ <div class="row column">
95
+ <%= form.translated :text_field, :participatory_structure %>
96
+ </div>
97
+
98
+ <div class="row column">
99
+ <% if process_groups_for_select %>
100
+ <%= form.select :participatory_process_group_id, process_groups_for_select, prompt: I18n.t("decidim.participatory_processes.participatory_process_groups.none") %>
101
+ <% end %>
102
+ </div>
103
+ </div>
73
104
  </div>