decidim-participatory_processes 0.27.8 → 0.28.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/cells/decidim/participatory_process_groups/content_block_cell.rb +5 -1
  4. data/app/cells/decidim/participatory_process_groups/content_blocks/extra_data/recent_users.erb +1 -0
  5. data/app/cells/decidim/participatory_process_groups/content_blocks/extra_data_cell.rb +71 -0
  6. data/app/cells/decidim/participatory_process_groups/content_blocks/main_data/content.erb +30 -0
  7. data/app/cells/decidim/participatory_process_groups/content_blocks/main_data_cell.rb +77 -0
  8. data/app/cells/decidim/participatory_process_groups/content_blocks/related_processes_cell.rb +47 -0
  9. data/app/cells/decidim/participatory_process_groups/content_blocks/statistics_cell.rb +2 -2
  10. data/app/cells/decidim/participatory_process_groups/process_filters_cell.rb +4 -4
  11. data/app/cells/decidim/participatory_processes/content_block_cell.rb +21 -0
  12. data/app/cells/decidim/participatory_processes/content_blocks/extra_data/active_step.erb +1 -0
  13. data/app/cells/decidim/participatory_processes/content_blocks/extra_data_cell.rb +60 -0
  14. data/app/cells/decidim/participatory_processes/content_blocks/hero_cell.rb +29 -0
  15. data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes_cell.rb +14 -27
  16. data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes_settings_form/show.erb +1 -1
  17. data/app/cells/decidim/participatory_processes/content_blocks/main_data_cell.rb +34 -0
  18. data/app/cells/decidim/participatory_processes/content_blocks/metadata_cell.rb +23 -0
  19. data/app/cells/decidim/participatory_processes/content_blocks/metrics_cell.rb +25 -0
  20. data/app/cells/decidim/participatory_processes/content_blocks/processes_settings_form/show.erb +3 -0
  21. data/app/cells/decidim/participatory_processes/content_blocks/processes_settings_form_cell.rb +28 -0
  22. data/app/cells/decidim/participatory_processes/content_blocks/related_processes/content.erb +1 -0
  23. data/app/cells/decidim/participatory_processes/content_blocks/related_processes_cell.rb +53 -0
  24. data/app/cells/decidim/participatory_processes/content_blocks/stats_cell.rb +17 -0
  25. data/app/cells/decidim/participatory_processes/filtered_participatory_processes_cell.rb +1 -1
  26. data/app/cells/decidim/participatory_processes/process_cell.rb +2 -2
  27. data/app/cells/decidim/participatory_processes/process_dropdown_metadata/metadata.erb +22 -0
  28. data/app/cells/decidim/participatory_processes/process_dropdown_metadata_cell.rb +39 -0
  29. data/app/cells/decidim/participatory_processes/process_filters/show.erb +4 -5
  30. data/app/cells/decidim/participatory_processes/process_filters/type_filter.erb +1 -1
  31. data/app/cells/decidim/participatory_processes/process_filters_cell.rb +6 -6
  32. data/app/cells/decidim/participatory_processes/process_g_cell.rb +31 -0
  33. data/app/cells/decidim/participatory_processes/process_group_cell.rb +2 -2
  34. data/app/cells/decidim/participatory_processes/process_group_g_cell.rb +23 -0
  35. data/app/cells/decidim/participatory_processes/process_group_metadata_cell.rb +46 -0
  36. data/app/cells/decidim/participatory_processes/process_group_s_cell.rb +5 -13
  37. data/app/cells/decidim/participatory_processes/process_metadata_cell.rb +44 -0
  38. data/app/cells/decidim/participatory_processes/process_metadata_g_cell.rb +15 -0
  39. data/app/cells/decidim/participatory_processes/process_s_cell.rb +5 -25
  40. data/app/cells/decidim/participatory_processes/process_step/show.erb +48 -0
  41. data/app/cells/decidim/participatory_processes/process_step_cell.rb +30 -0
  42. data/app/cells/decidim/participatory_processes/processes/show.erb +16 -0
  43. data/app/cells/decidim/participatory_processes/processes_cell.rb +24 -0
  44. data/app/commands/decidim/participatory_processes/admin/activate_participatory_process_step.rb +1 -1
  45. data/app/commands/decidim/participatory_processes/admin/copy_participatory_process.rb +2 -2
  46. data/app/commands/decidim/participatory_processes/admin/create_participatory_process.rb +3 -1
  47. data/app/commands/decidim/participatory_processes/admin/create_participatory_process_group.rb +4 -2
  48. data/app/commands/decidim/participatory_processes/admin/create_participatory_process_step.rb +1 -1
  49. data/app/commands/decidim/participatory_processes/admin/create_participatory_process_type.rb +1 -1
  50. data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_group.rb +1 -1
  51. data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_step.rb +1 -1
  52. data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_type.rb +1 -1
  53. data/app/commands/decidim/participatory_processes/admin/import_participatory_process.rb +1 -1
  54. data/app/commands/decidim/participatory_processes/admin/reorder_participatory_process_steps.rb +1 -1
  55. data/app/commands/decidim/participatory_processes/admin/update_participatory_process.rb +1 -1
  56. data/app/commands/decidim/participatory_processes/admin/update_participatory_process_group.rb +2 -2
  57. data/app/commands/decidim/participatory_processes/admin/update_participatory_process_step.rb +1 -1
  58. data/app/commands/decidim/participatory_processes/admin/update_participatory_process_type.rb +1 -1
  59. data/app/constraints/decidim/participatory_processes/current_participatory_process.rb +1 -1
  60. data/app/controllers/decidim/participatory_processes/admin/application_controller.rb +29 -0
  61. data/app/controllers/decidim/participatory_processes/admin/categories_controller.rb +2 -0
  62. data/app/controllers/decidim/participatory_processes/admin/concerns/participatory_process_admin.rb +3 -1
  63. data/app/controllers/decidim/participatory_processes/admin/moderations/reports_controller.rb +1 -1
  64. data/app/controllers/decidim/participatory_processes/admin/moderations_controller.rb +1 -1
  65. data/app/controllers/decidim/participatory_processes/admin/participatory_process_attachment_collections_controller.rb +5 -0
  66. data/app/controllers/decidim/participatory_processes/admin/participatory_process_attachments_controller.rb +5 -0
  67. data/app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_content_blocks_controller.rb +1 -5
  68. data/app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb +24 -7
  69. data/app/controllers/decidim/participatory_processes/admin/participatory_process_groups_controller.rb +16 -0
  70. data/app/controllers/decidim/participatory_processes/admin/participatory_process_imports_controller.rb +14 -0
  71. data/app/controllers/decidim/participatory_processes/admin/participatory_process_landing_page_content_blocks_controller.rb +37 -0
  72. data/app/controllers/decidim/participatory_processes/admin/participatory_process_landing_page_controller.rb +37 -0
  73. data/app/controllers/decidim/participatory_processes/admin/participatory_process_publications_controller.rb +9 -29
  74. data/app/controllers/decidim/participatory_processes/admin/participatory_process_step_activations_controller.rb +1 -1
  75. data/app/controllers/decidim/participatory_processes/admin/participatory_process_steps_controller.rb +16 -4
  76. data/app/controllers/decidim/participatory_processes/admin/participatory_process_types_controller.rb +19 -0
  77. data/app/controllers/decidim/participatory_processes/admin/participatory_process_user_roles_controller.rb +8 -91
  78. data/app/controllers/decidim/participatory_processes/admin/participatory_processes_controller.rb +3 -0
  79. data/app/controllers/decidim/participatory_processes/participatory_process_groups_controller.rb +14 -1
  80. data/app/controllers/decidim/participatory_processes/participatory_processes_controller.rb +19 -4
  81. data/app/events/decidim/participatory_process_role_assigned_event.rb +6 -6
  82. data/app/events/decidim/participatory_process_step_activated_event.rb +5 -4
  83. data/app/events/decidim/participatory_process_step_changed_event.rb +5 -4
  84. data/app/forms/decidim/participatory_processes/admin/participatory_process_copy_form.rb +1 -1
  85. data/app/forms/decidim/participatory_processes/admin/participatory_process_form.rb +1 -1
  86. data/app/forms/decidim/participatory_processes/admin/participatory_process_import_form.rb +1 -1
  87. data/app/forms/decidim/participatory_processes/admin/participatory_process_step_form.rb +2 -2
  88. data/app/forms/decidim/participatory_processes/admin/participatory_process_user_role_form.rb +2 -18
  89. data/app/helpers/decidim/participatory_processes/admin/participatory_process_helper.rb +1 -0
  90. data/app/helpers/decidim/participatory_processes/application_helper.rb +5 -0
  91. data/app/helpers/decidim/participatory_processes/participatory_process_helper.rb +37 -9
  92. data/app/helpers/decidim/participatory_processes/participatory_space_content_blocks_helper.rb +17 -0
  93. data/app/jobs/decidim/participatory_processes/change_active_step_job.rb +35 -0
  94. data/app/models/decidim/participatory_process.rb +5 -5
  95. data/app/models/decidim/participatory_process_group.rb +4 -0
  96. data/app/models/decidim/participatory_process_user_role.rb +5 -34
  97. data/app/packs/entrypoints/decidim_participatory_processes.js +0 -2
  98. data/app/packs/src/decidim/participatory_processes/admin/participatory_processes.js +2 -2
  99. data/app/permissions/decidim/participatory_processes/permissions.rb +11 -15
  100. data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_group_presenter.rb +2 -2
  101. data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_presenter.rb +2 -2
  102. data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_type_presenter.rb +2 -2
  103. data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_user_role_presenter.rb +2 -2
  104. data/app/presenters/decidim/participatory_processes/admin_log/step_presenter.rb +2 -2
  105. data/app/presenters/decidim/participatory_processes/participatory_process_group_stats_presenter.rb +4 -40
  106. data/app/presenters/decidim/participatory_processes/participatory_process_metric_charts_presenter.rb +0 -68
  107. data/app/presenters/decidim/participatory_processes/participatory_process_presenter.rb +6 -0
  108. data/app/presenters/decidim/participatory_processes/participatory_process_stats_presenter.rb +3 -42
  109. data/app/queries/decidim/participatory_processes/admin/admin_users.rb +1 -1
  110. data/app/queries/decidim/participatory_processes/admin/moderators.rb +1 -1
  111. data/app/serializers/decidim/participatory_processes/participatory_process_importer.rb +4 -4
  112. data/app/views/decidim/participatory_processes/admin/participatory_process_copies/_form.html.erb +24 -29
  113. data/app/views/decidim/participatory_processes/admin/participatory_process_copies/new.html.erb +16 -5
  114. data/app/views/decidim/participatory_processes/admin/participatory_process_groups/_form.html.erb +72 -50
  115. data/app/views/decidim/participatory_processes/admin/participatory_process_groups/edit.html.erb +15 -9
  116. data/app/views/decidim/participatory_processes/admin/participatory_process_groups/index.html.erb +49 -54
  117. data/app/views/decidim/participatory_processes/admin/participatory_process_groups/new.html.erb +28 -5
  118. data/app/views/decidim/participatory_processes/admin/participatory_process_imports/_form.html.erb +33 -39
  119. data/app/views/decidim/participatory_processes/admin/participatory_process_imports/new.html.erb +18 -5
  120. data/app/views/decidim/participatory_processes/admin/participatory_process_steps/_form.html.erb +18 -25
  121. data/app/views/decidim/participatory_processes/admin/participatory_process_steps/edit.html.erb +16 -5
  122. data/app/views/decidim/participatory_processes/admin/participatory_process_steps/index.html.erb +54 -54
  123. data/app/views/decidim/participatory_processes/admin/participatory_process_steps/new.html.erb +18 -5
  124. data/app/views/decidim/participatory_processes/admin/participatory_process_steps/show.html.erb +2 -2
  125. data/app/views/decidim/participatory_processes/admin/participatory_process_types/_form.html.erb +6 -8
  126. data/app/views/decidim/participatory_processes/admin/participatory_process_types/edit.html.erb +14 -6
  127. data/app/views/decidim/participatory_processes/admin/participatory_process_types/index.html.erb +47 -50
  128. data/app/views/decidim/participatory_processes/admin/participatory_process_types/new.html.erb +14 -6
  129. data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/_form.html.erb +14 -18
  130. data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/edit.html.erb +17 -6
  131. data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/index.html.erb +59 -60
  132. data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/new.html.erb +16 -5
  133. data/app/views/decidim/participatory_processes/admin/participatory_processes/_form.html.erb +193 -146
  134. data/app/views/decidim/participatory_processes/admin/participatory_processes/edit.html.erb +25 -11
  135. data/app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb +111 -128
  136. data/app/views/decidim/participatory_processes/admin/participatory_processes/new.html.erb +16 -9
  137. data/app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb +6 -10
  138. data/app/views/decidim/participatory_processes/participatory_processes/_collection.html.erb +8 -0
  139. data/app/views/decidim/participatory_processes/participatory_processes/all_metrics.html.erb +21 -8
  140. data/app/views/decidim/participatory_processes/participatory_processes/index.html.erb +19 -17
  141. data/app/views/decidim/participatory_processes/participatory_processes/index.js.erb +1 -8
  142. data/app/views/decidim/participatory_processes/participatory_processes/show.html.erb +14 -128
  143. data/app/views/layouts/decidim/_process_header.html.erb +15 -26
  144. data/app/views/layouts/decidim/_process_nav_item.html.erb +6 -0
  145. data/app/views/layouts/decidim/admin/_manage_processes.html.erb +36 -0
  146. data/app/views/layouts/decidim/admin/participatory_process.html.erb +12 -14
  147. data/app/views/layouts/decidim/admin/participatory_process_group.html.erb +23 -13
  148. data/app/views/layouts/decidim/admin/participatory_process_groups.html.erb +13 -0
  149. data/app/views/layouts/decidim/admin/participatory_process_type.html.erb +13 -11
  150. data/app/views/layouts/decidim/admin/participatory_processes.html.erb +14 -8
  151. data/app/views/layouts/decidim/participatory_process.html.erb +7 -14
  152. data/config/locales/ar.yml +1 -55
  153. data/config/locales/bg.yml +0 -518
  154. data/config/locales/ca.yml +50 -70
  155. data/config/locales/cs.yml +51 -71
  156. data/config/locales/de.yml +52 -72
  157. data/config/locales/el.yml +8 -64
  158. data/config/locales/en.yml +52 -72
  159. data/config/locales/es-MX.yml +49 -69
  160. data/config/locales/es-PY.yml +49 -69
  161. data/config/locales/es.yml +49 -69
  162. data/config/locales/eu.yml +89 -112
  163. data/config/locales/fi-plain.yml +50 -70
  164. data/config/locales/fi.yml +51 -71
  165. data/config/locales/fr-CA.yml +51 -71
  166. data/config/locales/fr.yml +52 -72
  167. data/config/locales/ga-IE.yml +0 -16
  168. data/config/locales/gl.yml +0 -67
  169. data/config/locales/hu.yml +6 -66
  170. data/config/locales/id-ID.yml +1 -55
  171. data/config/locales/is-IS.yml +0 -24
  172. data/config/locales/it.yml +0 -67
  173. data/config/locales/ja.yml +51 -71
  174. data/config/locales/lb.yml +1 -153
  175. data/config/locales/lt.yml +39 -65
  176. data/config/locales/lv.yml +1 -59
  177. data/config/locales/nl.yml +0 -67
  178. data/config/locales/no.yml +0 -92
  179. data/config/locales/pl.yml +0 -124
  180. data/config/locales/pt-BR.yml +1 -113
  181. data/config/locales/pt.yml +0 -67
  182. data/config/locales/ro-RO.yml +4 -64
  183. data/config/locales/ru.yml +0 -49
  184. data/config/locales/sk.yml +1 -56
  185. data/config/locales/sl.yml +0 -7
  186. data/config/locales/sr-CS.yml +0 -4
  187. data/config/locales/sv.yml +15 -66
  188. data/config/locales/tr-TR.yml +7 -68
  189. data/config/locales/uk.yml +0 -49
  190. data/config/locales/zh-CN.yml +2 -63
  191. data/config/locales/zh-TW.yml +3 -63
  192. data/db/migrate/20220315100140_change_steps_dates_to_datetime.rb +8 -0
  193. data/lib/decidim/api/participatory_process_step_type.rb +2 -2
  194. data/lib/decidim/participatory_processes/admin_engine.rb +20 -139
  195. data/lib/decidim/participatory_processes/content_blocks/registry_manager.rb +278 -0
  196. data/lib/decidim/participatory_processes/engine.rb +13 -103
  197. data/lib/decidim/participatory_processes/menu.rb +190 -0
  198. data/lib/decidim/participatory_processes/participatory_space.rb +7 -204
  199. data/lib/decidim/participatory_processes/query_extensions.rb +2 -2
  200. data/lib/decidim/participatory_processes/seeds.rb +164 -0
  201. data/lib/decidim/participatory_processes/test/factories.rb +58 -66
  202. data/lib/decidim/participatory_processes/version.rb +1 -1
  203. data/lib/tasks/decidim_participatory_processes.rake +8 -0
  204. metadata +62 -67
  205. data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/filters.erb +0 -21
  206. data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/filters_small_view.erb +0 -18
  207. data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/participatory_space_filters.erb +0 -6
  208. data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/show.erb +0 -8
  209. data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/title_filter_order.erb +0 -8
  210. data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes_cell.rb +0 -60
  211. data/app/cells/decidim/participatory_process_groups/content_blocks/html/show.erb +0 -3
  212. data/app/cells/decidim/participatory_process_groups/content_blocks/html_cell.rb +0 -13
  213. data/app/cells/decidim/participatory_process_groups/content_blocks/metadata/show.erb +0 -28
  214. data/app/cells/decidim/participatory_process_groups/content_blocks/metadata_cell.rb +0 -15
  215. data/app/cells/decidim/participatory_process_groups/content_blocks/title/show.erb +0 -43
  216. data/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb +0 -64
  217. data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/_all_processes.erb +0 -9
  218. data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/show.erb +0 -14
  219. data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/single_process.erb +0 -48
  220. data/app/cells/decidim/participatory_processes/process_group_m/footer.erb +0 -8
  221. data/app/cells/decidim/participatory_processes/process_group_m_cell.rb +0 -60
  222. data/app/cells/decidim/participatory_processes/process_group_s/image.erb +0 -1
  223. data/app/cells/decidim/participatory_processes/process_group_s/show.erb +0 -8
  224. data/app/cells/decidim/participatory_processes/process_m/data.erb +0 -21
  225. data/app/cells/decidim/participatory_processes/process_m/footer.erb +0 -14
  226. data/app/cells/decidim/participatory_processes/process_m/tags.erb +0 -8
  227. data/app/cells/decidim/participatory_processes/process_m_cell.rb +0 -87
  228. data/app/cells/decidim/participatory_processes/process_s/image.erb +0 -1
  229. data/app/cells/decidim/participatory_processes/process_s/show.erb +0 -14
  230. data/app/commands/decidim/participatory_processes/admin/create_participatory_process_admin.rb +0 -58
  231. data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_admin.rb +0 -58
  232. data/app/commands/decidim/participatory_processes/admin/notify_role_assigned_to_participatory_process.rb +0 -22
  233. data/app/commands/decidim/participatory_processes/admin/publish_participatory_process.rb +0 -40
  234. data/app/commands/decidim/participatory_processes/admin/unpublish_participatory_process.rb +0 -40
  235. data/app/commands/decidim/participatory_processes/admin/update_participatory_process_admin.rb +0 -56
  236. data/app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb +0 -28
  237. data/app/controllers/decidim/participatory_processes/widgets_controller.rb +0 -37
  238. data/app/packs/src/decidim/participatory_processes/filters.js +0 -28
  239. data/app/views/decidim/participatory_process_steps/_participatory_process_step.html.erb +0 -16
  240. data/app/views/decidim/participatory_processes/participatory_process_steps/_timeline.html.erb +0 -7
  241. data/app/views/decidim/participatory_processes/participatory_process_steps/index.html.erb +0 -18
  242. data/app/views/decidim/participatory_processes/participatory_processes/_metrics.html.erb +0 -10
  243. data/app/views/decidim/participatory_processes/participatory_processes/_order_by_processes.html.erb +0 -1
  244. data/app/views/decidim/participatory_processes/participatory_processes/_participatory_process_group.html.erb +0 -4
  245. data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process.html.erb +0 -39
  246. data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process_group.html.erb +0 -31
  247. data/app/views/layouts/decidim/_process_header_steps.html.erb +0 -37
  248. data/app/views/layouts/decidim/_process_navigation.html.erb +0 -20
  249. data/config/locales/he-IL.yml +0 -1
  250. data/db/seeds/Exampledocument.pdf +0 -0
  251. data/db/seeds/city.jpeg +0 -0
  252. data/db/seeds/city2.jpeg +0 -0
  253. data/db/seeds/homepage_image.jpg +0 -0
  254. data/decidim-participatory_processes.gemspec +0 -31
@@ -98,8 +98,8 @@ zh-TW:
98
98
  edit: 編輯
99
99
  filter:
100
100
  all_processes: 顯示所有流程
101
- process_groups: 程序群組
102
101
  import_process: 匯入
102
+ moderate: 管理
103
103
  new_process: 新的程序
104
104
  new_process_group: 新的程序群組
105
105
  new_process_step: 新階段
@@ -122,7 +122,6 @@ zh-TW:
122
122
  attachments: 附件
123
123
  categories: 類別
124
124
  components: 组件
125
- info: 資訊
126
125
  moderations: 版主
127
126
  private_users: 私人參與者
128
127
  process_admins: 程序管理員
@@ -132,7 +131,6 @@ zh-TW:
132
131
  fields:
133
132
  created_at: 建立於
134
133
  private: 隱私模式
135
- promoted: 重點顯示
136
134
  published: 已發佈
137
135
  title: 標題
138
136
  name: 參與程序
@@ -171,13 +169,6 @@ zh-TW:
171
169
  copy: 複製
172
170
  select: 請選擇您想要複製的資料
173
171
  title: 重複的參與性流程
174
- participatory_process_group_landing_page:
175
- edit:
176
- active_content_blocks: 啟用的內容區塊
177
- inactive_content_blocks: 停用的內容區塊
178
- participatory_process_group_landing_page_content_blocks:
179
- edit:
180
- update: 更新
181
172
  participatory_process_groups:
182
173
  destroy:
183
174
  error: 刪除參與性流程群組時發生錯誤。
@@ -242,8 +233,6 @@ zh-TW:
242
233
  edit:
243
234
  title: 編輯程序類型
244
235
  update: 更新
245
- form:
246
- title: 標題
247
236
  new:
248
237
  create: 建立
249
238
  title: 新的處理類型
@@ -274,7 +263,6 @@ zh-TW:
274
263
  edit:
275
264
  update: 更新
276
265
  index:
277
- not_published: 未發佈
278
266
  private: 隱私模式
279
267
  public: 公開
280
268
  published: 已發佈
@@ -359,9 +347,6 @@ zh-TW:
359
347
  description: 此組織中的參與式過程數量
360
348
  object: 參與程序
361
349
  title: 參與程序
362
- participatory_process:
363
- show:
364
- related_assemblies: 相關大會
365
350
  participatory_process_groups:
366
351
  content_blocks:
367
352
  html_1:
@@ -370,18 +355,12 @@ zh-TW:
370
355
  name: 第二個 HTML 區塊
371
356
  html_3:
372
357
  name: 第三個 HTML 區塊
373
- metadata:
374
- name: 元數據
375
- participatory_scope: 決定了什麼
376
- participatory_structure: 如何決定
377
- target: 誰參加
378
358
  participatory_processes:
379
359
  name: 參與程序
380
360
  stats:
381
361
  name: 統計資料
382
362
  title:
383
363
  meta_scope: 範圍
384
- name: 標題、描述和標籤
385
364
  participatory_processes:
386
365
  other: "One\n1 個程序\n\nOther\n%{count} 個程序"
387
366
  show:
@@ -389,7 +368,6 @@ zh-TW:
389
368
  participatory_process_steps:
390
369
  index:
391
370
  process_steps: 程序階段
392
- title: 參與式過程階段
393
371
  participatory_processes:
394
372
  admin:
395
373
  content_blocks:
@@ -401,7 +379,6 @@ zh-TW:
401
379
  participatory_process_groups:
402
380
  form:
403
381
  metadata: 元數據
404
- title: 基本資訊
405
382
  visibility: 可見度
406
383
  participatory_process_imports:
407
384
  form:
@@ -431,14 +408,6 @@ zh-TW:
431
408
  title: 參與程序
432
409
  last_activity:
433
410
  new_participatory_process: 新的參與程序
434
- pages:
435
- home:
436
- highlighted_processes:
437
- active_step: 進行中的階段
438
- more_information: 更多資訊
439
- participate: 參與
440
- participate_in: 參與程序 %{resource_name}
441
- processes_button_title: 鏈接到顯示所有程序的程序頁面
442
411
  participatory_process_steps:
443
412
  index:
444
413
  back_to_process: 返回程序頁
@@ -456,7 +425,7 @@ zh-TW:
456
425
  other: "One\n1 個即將到來的程序\nOther\n%{count} 個即將到來的程序"
457
426
  explanations:
458
427
  no_active: '"沒有進行中的流程'
459
- no_active_nor_upcoming: 沒有進行中或即將開始的流程
428
+ no_active_nor_upcoming: 沒有進行中或即將開始的流程.
460
429
  no_active_nor_upcoming_callout: 目前沒有進行中或即將開始的程序。以下是過去的程序清單
461
430
  filter_by: 顯示
462
431
  names:
@@ -465,24 +434,12 @@ zh-TW:
465
434
  past: 過去
466
435
  upcoming: 即將舉行
467
436
  see: 查看
468
- index:
469
- loading: 正在載入結果
470
437
  show:
471
438
  title: 關於此流程
472
439
  show:
473
- area: 區域
474
440
  belongs_to_group: 此程序屬於
475
- dates: 日期
476
- developer_group: 促銷團隊
477
- end_date: 結束日期
478
- participatory_scope: 決定了什麼
479
- participatory_structure: 如何決定
480
441
  private_space: 這是不公開程序。
481
442
  related_processes: 相關程序
482
- scope: 範圍
483
- start_date: 開始日期
484
- target: 誰參加
485
- unspecified: 未指定
486
443
  statistics:
487
444
  processes_count: 程序
488
445
  layouts:
@@ -492,29 +449,12 @@ zh-TW:
492
449
  browse: 瀏覽
493
450
  browse_resource: 瀏覽程序群組 %{resource_name}
494
451
  processes_count: '程序:'
495
- participatory_process_widgets:
496
- show:
497
- active_step: 進行中的階段
498
- take_part: 參與
499
452
  participatory_processes:
500
453
  index:
501
454
  promoted_processes: 精選程序
502
455
  participatory_process:
503
- active_step: '當前階段'
456
+ active_step: 當前階段
504
457
  more_info: 更多資訊
505
458
  more_info_about: 關於程序 %{resource_name} 的更多資訊
506
459
  take_part: 參與
507
460
  take_part_in: 參與程序 %{resource_name}
508
- promoted_process:
509
- active_step: '當前階段'
510
- more_info: 更多資訊
511
- more_info_about: 關於程序 %{resource_name} 的更多資訊
512
- take_part: 參與
513
- take_part_in: 參與程序 %{resource_name}
514
- promoted_process_group:
515
- more_info: 更多資訊
516
- process_header_steps:
517
- step: 第 %{current} 階段 / 共 %{total} 階段
518
- view_steps: 程序階段
519
- process_navigation:
520
- process_menu_item: 該程序
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ChangeStepsDatesToDatetime < ActiveRecord::Migration[6.0]
4
+ def change
5
+ change_column :decidim_participatory_process_steps, :start_date, :datetime
6
+ change_column :decidim_participatory_process_steps, :end_date, :datetime
7
+ end
8
+ end
@@ -12,8 +12,8 @@ module Decidim
12
12
 
13
13
  field :title, Decidim::Core::TranslatedFieldType, "The title of this step", null: false
14
14
  field :description, Decidim::Core::TranslatedFieldType, "The description of this step", null: true
15
- field :start_date, Decidim::Core::DateType, "This step's start date", null: true
16
- field :end_date, Decidim::Core::DateType, "This step's end date", null: true
15
+ field :start_date, Decidim::Core::DateTimeType, "This step's start date", null: true
16
+ field :end_date, Decidim::Core::DateTimeType, "This step's end date", null: true
17
17
  field :call_to_action_path, GraphQL::Types::String, "A call to action URL for this step", method: :cta_path, null: true
18
18
  field :call_to_action_text, Decidim::Core::TranslatedFieldType, "The call to action text for this step", method: :cta_text, null: true
19
19
  field :active, GraphQL::Types::Boolean, "If this step is the active one", null: true
@@ -4,6 +4,7 @@ require "rails"
4
4
  require "active_support/all"
5
5
 
6
6
  require "decidim/core"
7
+ require "decidim/participatory_processes/menu"
7
8
 
8
9
  module Decidim
9
10
  module ParticipatoryProcesses
@@ -17,7 +18,7 @@ module Decidim
17
18
  routes do
18
19
  resources :participatory_process_groups do
19
20
  resource :landing_page, only: [:edit, :update], controller: "participatory_process_group_landing_page" do
20
- resources :content_blocks, only: [:edit, :update], controller: "participatory_process_group_landing_page_content_blocks"
21
+ resources :content_blocks, only: [:edit, :update, :destroy, :create], controller: "participatory_process_group_landing_page_content_blocks"
21
22
  end
22
23
  end
23
24
  resources :participatory_process_types
@@ -36,18 +37,21 @@ module Decidim
36
37
  post :resend_invitation, to: "participatory_process_user_roles#resend_invitation"
37
38
  end
38
39
  end
39
- resources :attachment_collections, controller: "participatory_process_attachment_collections"
40
- resources :attachments, controller: "participatory_process_attachments"
40
+ resources :attachment_collections, controller: "participatory_process_attachment_collections", except: [:show]
41
+ resources :attachments, controller: "participatory_process_attachments", except: [:show]
41
42
 
42
43
  resource :export, controller: "participatory_process_exports", only: :create
43
44
 
44
45
  collection do
45
46
  resources :imports, controller: "participatory_process_imports", only: [:new, :create]
46
47
  end
48
+ resource :landing_page, only: [:edit, :update], controller: "participatory_process_landing_page" do
49
+ resources :content_blocks, only: [:edit, :update, :destroy, :create], controller: "participatory_process_landing_page_content_blocks"
50
+ end
47
51
  end
48
52
 
49
53
  scope "/participatory_processes/:participatory_process_slug" do
50
- resources :categories
54
+ resources :categories, except: [:show]
51
55
 
52
56
  resources :components do
53
57
  resource :permissions, controller: "component_permissions"
@@ -95,151 +99,28 @@ module Decidim
95
99
  end
96
100
  end
97
101
 
98
- initializer "decidim_participatory_processes.admin_menu" do
99
- Decidim.menu :admin_menu do |menu|
100
- menu.add_item :participatory_processes,
101
- I18n.t("menu.participatory_processes", scope: "decidim.admin"),
102
- decidim_admin_participatory_processes.participatory_processes_path,
103
- icon_name: "target",
104
- position: 2,
105
- active: is_active_link?(decidim_admin_participatory_processes.participatory_processes_path, :inclusive) ||
106
- is_active_link?(decidim_admin_participatory_processes.participatory_process_groups_path, :inclusive) ||
107
- is_active_link?(decidim_admin_participatory_processes.participatory_process_types_path),
108
- if: allowed_to?(:enter, :space_area, space_name: :processes) || allowed_to?(:enter, :space_area, space_name: :process_groups)
109
- end
102
+ initializer "decidim_participatory_processes_admin.menu" do
103
+ Decidim::ParticipatoryProcesses::Menu.register_admin_menu_modules!
110
104
  end
111
105
 
112
- initializer "decidim_participatory_processes.admin_participatory_processes_menu" do
113
- Decidim.menu :admin_participatory_processes_menu do |menu|
114
- menu.add_item :participatory_processes,
115
- I18n.t("menu.participatory_processes", scope: "decidim.admin"),
116
- decidim_admin_participatory_processes.participatory_processes_path,
117
- position: 1,
118
- if: allowed_to?(:enter, :space_area, space_name: :processes),
119
- active: is_active_link?(decidim_admin_participatory_processes.participatory_processes_path)
120
-
121
- menu.add_item :participatory_process_groups,
122
- I18n.t("menu.participatory_process_groups", scope: "decidim.admin"),
123
- decidim_admin_participatory_processes.participatory_process_groups_path,
124
- position: 2,
125
- if: allowed_to?(:enter, :space_area, space_name: :process_groups),
126
- active: is_active_link?(decidim_admin_participatory_processes.participatory_process_groups_path)
127
-
128
- menu.add_item :participatory_process_types,
129
- I18n.t("menu.participatory_process_types", scope: "decidim.admin"),
130
- decidim_admin_participatory_processes.participatory_process_types_path,
131
- position: 3,
132
- if: allowed_to?(:manage, :participatory_process_type),
133
- active: is_active_link?(decidim_admin_participatory_processes.participatory_process_types_path)
134
- end
106
+ initializer "decidim_participatory_processes_admin.participatory_processes_menu" do
107
+ Decidim::ParticipatoryProcesses::Menu.register_admin_participatory_processes_menu!
135
108
  end
136
109
 
137
- initializer "decidim_participatory_processes.admin_process_attachments_menu" do
138
- Decidim.menu :admin_participatory_process_attachments_menu do |menu|
139
- menu.add_item :participatory_process_attachment_collections,
140
- I18n.t("attachment_collections", scope: "decidim.admin.menu.participatory_processes_submenu"),
141
- decidim_admin_participatory_processes.participatory_process_attachment_collections_path(current_participatory_space),
142
- active: is_active_link?(decidim_admin_participatory_processes.participatory_process_attachment_collections_path(current_participatory_space)),
143
- if: allowed_to?(:read, :attachment_collection)
144
-
145
- menu.add_item :participatory_process_attachments,
146
- I18n.t("attachment_files", scope: "decidim.admin.menu.participatory_processes_submenu"),
147
- decidim_admin_participatory_processes.participatory_process_attachments_path(current_participatory_space),
148
- active: is_active_link?(decidim_admin_participatory_processes.participatory_process_attachments_path(current_participatory_space)),
149
- if: allowed_to?(:read, :attachment)
150
- end
110
+ initializer "decidim_participatory_processes_admin.process_attachments_menu" do
111
+ Decidim::ParticipatoryProcesses::Menu.register_participatory_process_admin_attachments_menu!
151
112
  end
152
113
 
153
- initializer "decidim_participatory_processes.admin_process_components_menu" do
154
- Decidim.menu :admin_participatory_process_components_menu do |menu|
155
- current_participatory_space.components.each do |component|
156
- caption = decidim_escape_translated(component.name)
157
- if component.primary_stat.present?
158
- caption += content_tag(:span, component.primary_stat, class: component.primary_stat.zero? ? "component-counter component-counter--off" : "component-counter")
159
- end
160
-
161
- menu.add_item [component.manifest_name, component.id].join("_"),
162
- caption.html_safe,
163
- manage_component_path(component),
164
- active: is_active_link?(manage_component_path(component)) ||
165
- is_active_link?(decidim_admin_participatory_processes.edit_component_path(current_participatory_space, component)) ||
166
- is_active_link?(decidim_admin_participatory_processes.edit_component_permissions_path(current_participatory_space, component)) ||
167
- participatory_space_active_link?(component),
168
- if: component.manifest.admin_engine && user_role_config.component_is_accessible?(component.manifest_name)
169
- end
170
- end
114
+ initializer "decidim_participatory_processes_admin.process_components_menu" do
115
+ Decidim::ParticipatoryProcesses::Menu.register_admin_participatory_process_components_menu!
171
116
  end
172
117
 
173
- initializer "decidim_participatory_processes.admin_process_group_menu" do
174
- Decidim.menu :admin_participatory_process_menu do |menu|
175
- menu.add_item :edit_participatory_process,
176
- I18n.t("info", scope: "decidim.admin.menu.participatory_processes_submenu"),
177
- decidim_admin_participatory_processes.edit_participatory_process_path(current_participatory_space),
178
- active: is_active_link?(decidim_admin_participatory_processes.edit_participatory_process_path(current_participatory_space)),
179
- if: allowed_to?(:update, :process, process: current_participatory_space)
180
-
181
- menu.add_item :participatory_process_steps,
182
- I18n.t("steps", scope: "decidim.admin.menu.participatory_processes_submenu"),
183
- decidim_admin_participatory_processes.participatory_process_steps_path(current_participatory_space),
184
- active: is_active_link?(decidim_admin_participatory_processes.participatory_process_steps_path(current_participatory_space)),
185
- if: allowed_to?(:read, :process_step)
186
-
187
- menu.add_item :components,
188
- I18n.t("components", scope: "decidim.admin.menu.participatory_processes_submenu"),
189
- decidim_admin_participatory_processes.components_path(current_participatory_space),
190
- active: is_active_link?(decidim_admin_participatory_processes.components_path(current_participatory_space)),
191
- if: allowed_to?(:read, :component),
192
- submenu: { target_menu: :admin_participatory_process_components_menu, options: { container_options: { id: "components-list" } } }
193
-
194
- menu.add_item :categories,
195
- I18n.t("categories", scope: "decidim.admin.menu.participatory_processes_submenu"),
196
- decidim_admin_participatory_processes.categories_path(current_participatory_space),
197
- active: is_active_link?(decidim_admin_participatory_processes.categories_path(current_participatory_space)),
198
- if: allowed_to?(:read, :category)
199
-
200
- menu.add_item :attachments,
201
- I18n.t("attachments", scope: "decidim.admin.menu.participatory_processes_submenu"),
202
- "#",
203
- active: is_active_link?(decidim_admin_participatory_processes.participatory_process_attachment_collections_path(current_participatory_space)) ||
204
- is_active_link?(decidim_admin_participatory_processes.participatory_process_attachments_path(current_participatory_space)),
205
- if: allowed_to?(:read, :attachment_collection) || allowed_to?(:read, :attachment),
206
- submenu: { target_menu: :admin_participatory_process_attachments_menu }
207
-
208
- menu.add_item :participatory_process_user_roles,
209
- I18n.t("process_admins", scope: "decidim.admin.menu.participatory_processes_submenu"),
210
- decidim_admin_participatory_processes.participatory_process_user_roles_path(current_participatory_space),
211
- active: is_active_link?(decidim_admin_participatory_processes.participatory_process_user_roles_path(current_participatory_space)),
212
- if: allowed_to?(:read, :process_user_role)
213
-
214
- menu.add_item :participatory_space_private_users,
215
- I18n.t("private_users", scope: "decidim.admin.menu.participatory_processes_submenu"),
216
- decidim_admin_participatory_processes.participatory_space_private_users_path(current_participatory_space),
217
- active: is_active_link?(decidim_admin_participatory_processes.participatory_space_private_users_path(current_participatory_space)),
218
- if: allowed_to?(:read, :space_private_user)
219
-
220
- menu.add_item :moderations,
221
- I18n.t("moderations", scope: "decidim.admin.menu.participatory_processes_submenu"),
222
- decidim_admin_participatory_processes.moderations_path(current_participatory_space),
223
- active: is_active_link?(decidim_admin_participatory_processes.moderations_path(current_participatory_space)),
224
- if: allowed_to?(:read, :moderation)
225
- end
118
+ initializer "decidim_participatory_processes_admin.process_menu" do
119
+ Decidim::ParticipatoryProcesses::Menu.register_admin_participatory_process_menu!
226
120
  end
227
121
 
228
- initializer "decidim_participatory_processes.admin_process_group_menu" do
229
- Decidim.menu :admin_participatory_process_group_menu do |menu|
230
- menu.add_item :edit_participatory_process_group,
231
- I18n.t("info", scope: "decidim.admin.menu.participatory_process_groups_submenu"),
232
- decidim_admin_participatory_processes.edit_participatory_process_group_path(participatory_process_group),
233
- position: 1,
234
- if: allowed_to?(:update, :process_group, process_group: participatory_process_group),
235
- active: is_active_link?(decidim_admin_participatory_processes.edit_participatory_process_group_path(participatory_process_group))
236
- menu.add_item :edit_participatory_process_group_landing_page,
237
- I18n.t("landing_page", scope: "decidim.admin.menu.participatory_process_groups_submenu"),
238
- decidim_admin_participatory_processes.edit_participatory_process_group_landing_page_path(participatory_process_group),
239
- position: 2,
240
- if: allowed_to?(:update, :process_group, process_group: participatory_process_group),
241
- active: is_active_link?(decidim_admin_participatory_processes.participatory_process_group_landing_page_path(participatory_process_group))
242
- end
122
+ initializer "decidim_participatory_processes_admin.process_group_menu" do
123
+ Decidim::ParticipatoryProcesses::Menu.register_admin_participatory_process_group_menu!
243
124
  end
244
125
  end
245
126
  end