decidim-participatory_processes 0.27.7 → 0.28.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/cells/decidim/participatory_process_groups/content_block_cell.rb +5 -1
- data/app/cells/decidim/participatory_process_groups/content_blocks/extra_data/recent_users.erb +1 -0
- data/app/cells/decidim/participatory_process_groups/content_blocks/extra_data_cell.rb +71 -0
- data/app/cells/decidim/participatory_process_groups/content_blocks/main_data/content.erb +30 -0
- data/app/cells/decidim/participatory_process_groups/content_blocks/main_data_cell.rb +77 -0
- data/app/cells/decidim/participatory_process_groups/content_blocks/related_processes_cell.rb +47 -0
- data/app/cells/decidim/participatory_process_groups/content_blocks/statistics_cell.rb +2 -2
- data/app/cells/decidim/participatory_process_groups/process_filters_cell.rb +4 -4
- data/app/cells/decidim/participatory_processes/content_block_cell.rb +21 -0
- data/app/cells/decidim/participatory_processes/content_blocks/extra_data/active_step.erb +1 -0
- data/app/cells/decidim/participatory_processes/content_blocks/extra_data_cell.rb +60 -0
- data/app/cells/decidim/participatory_processes/content_blocks/hero_cell.rb +29 -0
- data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes_cell.rb +14 -27
- data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes_settings_form/show.erb +1 -1
- data/app/cells/decidim/participatory_processes/content_blocks/main_data_cell.rb +34 -0
- data/app/cells/decidim/participatory_processes/content_blocks/metadata_cell.rb +23 -0
- data/app/cells/decidim/participatory_processes/content_blocks/metrics_cell.rb +25 -0
- data/app/cells/decidim/participatory_processes/content_blocks/processes_settings_form/show.erb +3 -0
- data/app/cells/decidim/participatory_processes/content_blocks/processes_settings_form_cell.rb +28 -0
- data/app/cells/decidim/participatory_processes/content_blocks/related_processes/content.erb +1 -0
- data/app/cells/decidim/participatory_processes/content_blocks/related_processes_cell.rb +53 -0
- data/app/cells/decidim/participatory_processes/content_blocks/stats_cell.rb +17 -0
- data/app/cells/decidim/participatory_processes/filtered_participatory_processes_cell.rb +1 -1
- data/app/cells/decidim/participatory_processes/process_cell.rb +2 -2
- data/app/cells/decidim/participatory_processes/process_dropdown_metadata/metadata.erb +22 -0
- data/app/cells/decidim/participatory_processes/process_dropdown_metadata_cell.rb +39 -0
- data/app/cells/decidim/participatory_processes/process_filters/show.erb +4 -5
- data/app/cells/decidim/participatory_processes/process_filters/type_filter.erb +1 -1
- data/app/cells/decidim/participatory_processes/process_filters_cell.rb +6 -6
- data/app/cells/decidim/participatory_processes/process_g_cell.rb +31 -0
- data/app/cells/decidim/participatory_processes/process_group_cell.rb +2 -2
- data/app/cells/decidim/participatory_processes/process_group_g_cell.rb +23 -0
- data/app/cells/decidim/participatory_processes/process_group_metadata_cell.rb +46 -0
- data/app/cells/decidim/participatory_processes/process_group_s_cell.rb +5 -13
- data/app/cells/decidim/participatory_processes/process_metadata_cell.rb +44 -0
- data/app/cells/decidim/participatory_processes/process_metadata_g_cell.rb +15 -0
- data/app/cells/decidim/participatory_processes/process_s_cell.rb +5 -25
- data/app/cells/decidim/participatory_processes/process_step/show.erb +48 -0
- data/app/cells/decidim/participatory_processes/process_step_cell.rb +30 -0
- data/app/cells/decidim/participatory_processes/processes/show.erb +16 -0
- data/app/cells/decidim/participatory_processes/processes_cell.rb +24 -0
- data/app/commands/decidim/participatory_processes/admin/activate_participatory_process_step.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/copy_participatory_process.rb +2 -2
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process.rb +3 -1
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process_group.rb +4 -2
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process_step.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process_type.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_group.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_step.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_type.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/import_participatory_process.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/reorder_participatory_process_steps.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process_group.rb +2 -2
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process_step.rb +1 -1
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process_type.rb +1 -1
- data/app/constraints/decidim/participatory_processes/current_participatory_process.rb +1 -1
- data/app/controllers/decidim/participatory_processes/admin/application_controller.rb +29 -0
- data/app/controllers/decidim/participatory_processes/admin/categories_controller.rb +2 -0
- data/app/controllers/decidim/participatory_processes/admin/concerns/participatory_process_admin.rb +3 -1
- data/app/controllers/decidim/participatory_processes/admin/moderations/reports_controller.rb +1 -1
- data/app/controllers/decidim/participatory_processes/admin/moderations_controller.rb +1 -1
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_attachment_collections_controller.rb +5 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_attachments_controller.rb +5 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_content_blocks_controller.rb +1 -5
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb +24 -7
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_groups_controller.rb +16 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_imports_controller.rb +14 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_landing_page_content_blocks_controller.rb +37 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_landing_page_controller.rb +37 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_publications_controller.rb +9 -29
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_step_activations_controller.rb +1 -1
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_steps_controller.rb +16 -4
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_types_controller.rb +19 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_user_roles_controller.rb +8 -91
- data/app/controllers/decidim/participatory_processes/admin/participatory_processes_controller.rb +3 -0
- data/app/controllers/decidim/participatory_processes/participatory_process_groups_controller.rb +14 -1
- data/app/controllers/decidim/participatory_processes/participatory_processes_controller.rb +19 -4
- data/app/events/decidim/participatory_process_role_assigned_event.rb +6 -6
- data/app/events/decidim/participatory_process_step_activated_event.rb +5 -4
- data/app/events/decidim/participatory_process_step_changed_event.rb +5 -4
- data/app/forms/decidim/participatory_processes/admin/participatory_process_copy_form.rb +1 -1
- data/app/forms/decidim/participatory_processes/admin/participatory_process_form.rb +1 -1
- data/app/forms/decidim/participatory_processes/admin/participatory_process_import_form.rb +1 -1
- data/app/forms/decidim/participatory_processes/admin/participatory_process_step_form.rb +2 -2
- data/app/forms/decidim/participatory_processes/admin/participatory_process_user_role_form.rb +2 -18
- data/app/helpers/decidim/participatory_processes/admin/participatory_process_helper.rb +1 -0
- data/app/helpers/decidim/participatory_processes/application_helper.rb +5 -0
- data/app/helpers/decidim/participatory_processes/participatory_process_helper.rb +37 -9
- data/app/helpers/decidim/participatory_processes/participatory_space_content_blocks_helper.rb +17 -0
- data/app/jobs/decidim/participatory_processes/change_active_step_job.rb +35 -0
- data/app/models/decidim/participatory_process.rb +5 -5
- data/app/models/decidim/participatory_process_group.rb +4 -0
- data/app/models/decidim/participatory_process_user_role.rb +5 -34
- data/app/packs/entrypoints/decidim_participatory_processes.js +0 -2
- data/app/packs/src/decidim/participatory_processes/admin/participatory_processes.js +2 -2
- data/app/permissions/decidim/participatory_processes/permissions.rb +11 -15
- data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_group_presenter.rb +2 -2
- data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_presenter.rb +2 -2
- data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_type_presenter.rb +2 -2
- data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_user_role_presenter.rb +2 -2
- data/app/presenters/decidim/participatory_processes/admin_log/step_presenter.rb +2 -2
- data/app/presenters/decidim/participatory_processes/participatory_process_group_stats_presenter.rb +4 -40
- data/app/presenters/decidim/participatory_processes/participatory_process_metric_charts_presenter.rb +0 -68
- data/app/presenters/decidim/participatory_processes/participatory_process_presenter.rb +6 -0
- data/app/presenters/decidim/participatory_processes/participatory_process_stats_presenter.rb +3 -42
- data/app/queries/decidim/participatory_processes/admin/admin_users.rb +1 -1
- data/app/queries/decidim/participatory_processes/admin/moderators.rb +1 -1
- data/app/serializers/decidim/participatory_processes/participatory_process_importer.rb +4 -4
- data/app/views/decidim/participatory_processes/admin/participatory_process_copies/_form.html.erb +24 -29
- data/app/views/decidim/participatory_processes/admin/participatory_process_copies/new.html.erb +16 -5
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/_form.html.erb +72 -50
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/edit.html.erb +15 -9
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/index.html.erb +49 -54
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/new.html.erb +28 -5
- data/app/views/decidim/participatory_processes/admin/participatory_process_imports/_form.html.erb +33 -39
- data/app/views/decidim/participatory_processes/admin/participatory_process_imports/new.html.erb +18 -5
- data/app/views/decidim/participatory_processes/admin/participatory_process_steps/_form.html.erb +18 -25
- data/app/views/decidim/participatory_processes/admin/participatory_process_steps/edit.html.erb +16 -5
- data/app/views/decidim/participatory_processes/admin/participatory_process_steps/index.html.erb +54 -54
- data/app/views/decidim/participatory_processes/admin/participatory_process_steps/new.html.erb +18 -5
- data/app/views/decidim/participatory_processes/admin/participatory_process_steps/show.html.erb +2 -2
- data/app/views/decidim/participatory_processes/admin/participatory_process_types/_form.html.erb +6 -8
- data/app/views/decidim/participatory_processes/admin/participatory_process_types/edit.html.erb +14 -6
- data/app/views/decidim/participatory_processes/admin/participatory_process_types/index.html.erb +47 -50
- data/app/views/decidim/participatory_processes/admin/participatory_process_types/new.html.erb +14 -6
- data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/_form.html.erb +14 -18
- data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/edit.html.erb +17 -6
- data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/index.html.erb +59 -60
- data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/new.html.erb +16 -5
- data/app/views/decidim/participatory_processes/admin/participatory_processes/_form.html.erb +193 -146
- data/app/views/decidim/participatory_processes/admin/participatory_processes/edit.html.erb +25 -11
- data/app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb +111 -128
- data/app/views/decidim/participatory_processes/admin/participatory_processes/new.html.erb +16 -9
- data/app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb +6 -10
- data/app/views/decidim/participatory_processes/participatory_processes/_collection.html.erb +8 -0
- data/app/views/decidim/participatory_processes/participatory_processes/all_metrics.html.erb +21 -8
- data/app/views/decidim/participatory_processes/participatory_processes/index.html.erb +19 -17
- data/app/views/decidim/participatory_processes/participatory_processes/index.js.erb +1 -8
- data/app/views/decidim/participatory_processes/participatory_processes/show.html.erb +14 -128
- data/app/views/layouts/decidim/_process_header.html.erb +15 -26
- data/app/views/layouts/decidim/_process_nav_item.html.erb +6 -0
- data/app/views/layouts/decidim/admin/_manage_processes.html.erb +36 -0
- data/app/views/layouts/decidim/admin/participatory_process.html.erb +12 -14
- data/app/views/layouts/decidim/admin/participatory_process_group.html.erb +23 -13
- data/app/views/layouts/decidim/admin/participatory_process_groups.html.erb +13 -0
- data/app/views/layouts/decidim/admin/participatory_process_type.html.erb +13 -11
- data/app/views/layouts/decidim/admin/participatory_processes.html.erb +14 -8
- data/app/views/layouts/decidim/participatory_process.html.erb +7 -14
- data/config/locales/ar.yml +1 -55
- data/config/locales/bg.yml +0 -518
- data/config/locales/ca.yml +50 -70
- data/config/locales/cs.yml +51 -71
- data/config/locales/de.yml +51 -71
- data/config/locales/el.yml +8 -64
- data/config/locales/en.yml +52 -72
- data/config/locales/es-MX.yml +49 -69
- data/config/locales/es-PY.yml +49 -69
- data/config/locales/es.yml +49 -69
- data/config/locales/eu.yml +89 -112
- data/config/locales/fi-plain.yml +50 -70
- data/config/locales/fi.yml +51 -71
- data/config/locales/fr-CA.yml +51 -71
- data/config/locales/fr.yml +52 -72
- data/config/locales/ga-IE.yml +0 -16
- data/config/locales/gl.yml +0 -67
- data/config/locales/hu.yml +6 -66
- data/config/locales/id-ID.yml +1 -55
- data/config/locales/is-IS.yml +0 -24
- data/config/locales/it.yml +0 -67
- data/config/locales/ja.yml +51 -71
- data/config/locales/lb.yml +1 -153
- data/config/locales/lt.yml +39 -65
- data/config/locales/lv.yml +1 -59
- data/config/locales/nl.yml +0 -67
- data/config/locales/no.yml +0 -92
- data/config/locales/pl.yml +0 -124
- data/config/locales/pt-BR.yml +1 -113
- data/config/locales/pt.yml +0 -67
- data/config/locales/ro-RO.yml +4 -64
- data/config/locales/ru.yml +0 -49
- data/config/locales/sk.yml +1 -56
- data/config/locales/sl.yml +0 -7
- data/config/locales/sr-CS.yml +0 -4
- data/config/locales/sv.yml +15 -66
- data/config/locales/tr-TR.yml +7 -68
- data/config/locales/uk.yml +0 -49
- data/config/locales/zh-CN.yml +2 -63
- data/config/locales/zh-TW.yml +3 -63
- data/db/migrate/20220315100140_change_steps_dates_to_datetime.rb +8 -0
- data/lib/decidim/api/participatory_process_step_type.rb +2 -2
- data/lib/decidim/participatory_processes/admin_engine.rb +20 -139
- data/lib/decidim/participatory_processes/content_blocks/registry_manager.rb +278 -0
- data/lib/decidim/participatory_processes/engine.rb +13 -103
- data/lib/decidim/participatory_processes/menu.rb +190 -0
- data/lib/decidim/participatory_processes/participatory_space.rb +7 -204
- data/lib/decidim/participatory_processes/query_extensions.rb +2 -2
- data/lib/decidim/participatory_processes/seeds.rb +164 -0
- data/lib/decidim/participatory_processes/test/factories.rb +58 -66
- data/lib/decidim/participatory_processes/version.rb +1 -1
- data/lib/tasks/decidim_participatory_processes.rake +8 -0
- metadata +62 -67
- data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/filters.erb +0 -21
- data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/filters_small_view.erb +0 -18
- data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/participatory_space_filters.erb +0 -6
- data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/show.erb +0 -8
- data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes/title_filter_order.erb +0 -8
- data/app/cells/decidim/participatory_process_groups/content_blocks/highlighted_participatory_processes_cell.rb +0 -60
- data/app/cells/decidim/participatory_process_groups/content_blocks/html/show.erb +0 -3
- data/app/cells/decidim/participatory_process_groups/content_blocks/html_cell.rb +0 -13
- data/app/cells/decidim/participatory_process_groups/content_blocks/metadata/show.erb +0 -28
- data/app/cells/decidim/participatory_process_groups/content_blocks/metadata_cell.rb +0 -15
- data/app/cells/decidim/participatory_process_groups/content_blocks/title/show.erb +0 -43
- data/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb +0 -64
- data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/_all_processes.erb +0 -9
- data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/show.erb +0 -14
- data/app/cells/decidim/participatory_processes/content_blocks/highlighted_processes/single_process.erb +0 -48
- data/app/cells/decidim/participatory_processes/process_group_m/footer.erb +0 -8
- data/app/cells/decidim/participatory_processes/process_group_m_cell.rb +0 -60
- data/app/cells/decidim/participatory_processes/process_group_s/image.erb +0 -1
- data/app/cells/decidim/participatory_processes/process_group_s/show.erb +0 -8
- data/app/cells/decidim/participatory_processes/process_m/data.erb +0 -21
- data/app/cells/decidim/participatory_processes/process_m/footer.erb +0 -14
- data/app/cells/decidim/participatory_processes/process_m/tags.erb +0 -8
- data/app/cells/decidim/participatory_processes/process_m_cell.rb +0 -87
- data/app/cells/decidim/participatory_processes/process_s/image.erb +0 -1
- data/app/cells/decidim/participatory_processes/process_s/show.erb +0 -14
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process_admin.rb +0 -58
- data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_admin.rb +0 -58
- data/app/commands/decidim/participatory_processes/admin/notify_role_assigned_to_participatory_process.rb +0 -22
- data/app/commands/decidim/participatory_processes/admin/publish_participatory_process.rb +0 -40
- data/app/commands/decidim/participatory_processes/admin/unpublish_participatory_process.rb +0 -40
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process_admin.rb +0 -56
- data/app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb +0 -28
- data/app/controllers/decidim/participatory_processes/widgets_controller.rb +0 -37
- data/app/packs/src/decidim/participatory_processes/filters.js +0 -28
- data/app/views/decidim/participatory_process_steps/_participatory_process_step.html.erb +0 -16
- data/app/views/decidim/participatory_processes/participatory_process_steps/_timeline.html.erb +0 -7
- data/app/views/decidim/participatory_processes/participatory_process_steps/index.html.erb +0 -18
- data/app/views/decidim/participatory_processes/participatory_processes/_metrics.html.erb +0 -10
- data/app/views/decidim/participatory_processes/participatory_processes/_order_by_processes.html.erb +0 -1
- data/app/views/decidim/participatory_processes/participatory_processes/_participatory_process_group.html.erb +0 -4
- data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process.html.erb +0 -39
- data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process_group.html.erb +0 -31
- data/app/views/layouts/decidim/_process_header_steps.html.erb +0 -37
- data/app/views/layouts/decidim/_process_navigation.html.erb +0 -20
- data/config/locales/he-IL.yml +0 -1
- data/db/seeds/Exampledocument.pdf +0 -0
- data/db/seeds/city.jpeg +0 -0
- data/db/seeds/city2.jpeg +0 -0
- data/db/seeds/homepage_image.jpg +0 -0
- data/decidim-participatory_processes.gemspec +0 -31
@@ -19,7 +19,6 @@ module Decidim
|
|
19
19
|
public_list_process_groups_action?
|
20
20
|
public_read_process_group_action?
|
21
21
|
public_read_process_action?
|
22
|
-
public_embed_process_action?
|
23
22
|
return permission_action
|
24
23
|
end
|
25
24
|
|
@@ -43,6 +42,8 @@ module Decidim
|
|
43
42
|
|
44
43
|
return permission_action unless process
|
45
44
|
|
45
|
+
user_can_read_private_users?
|
46
|
+
|
46
47
|
moderator_action?
|
47
48
|
collaborator_action?
|
48
49
|
valuator_action?
|
@@ -53,7 +54,14 @@ module Decidim
|
|
53
54
|
|
54
55
|
private
|
55
56
|
|
56
|
-
|
57
|
+
def user_can_read_private_users?
|
58
|
+
return unless permission_action.subject == :space_private_user
|
59
|
+
return unless process.private_space?
|
60
|
+
|
61
|
+
toggle_allow(user.admin? || can_manage_process?(role: :admin) || can_manage_process?(role: :collaborator))
|
62
|
+
end
|
63
|
+
|
64
|
+
# It is an admin user if it is an organization admin or is a space admin
|
57
65
|
# for the current `process`.
|
58
66
|
def admin_user?
|
59
67
|
user.admin? || (process ? can_manage_process?(role: :admin) : has_manageable_processes?)
|
@@ -113,17 +121,6 @@ module Decidim
|
|
113
121
|
toggle_allow(can_manage_process?)
|
114
122
|
end
|
115
123
|
|
116
|
-
def public_embed_process_action?
|
117
|
-
return unless permission_action.action == :embed &&
|
118
|
-
[:process, :participatory_space].include?(permission_action.subject) &&
|
119
|
-
process
|
120
|
-
|
121
|
-
return disallow! unless process.published?
|
122
|
-
return disallow! if process.private_space
|
123
|
-
|
124
|
-
allow!
|
125
|
-
end
|
126
|
-
|
127
124
|
def can_view_private_space?
|
128
125
|
return true unless process.private_space
|
129
126
|
return false unless user
|
@@ -207,6 +204,7 @@ module Decidim
|
|
207
204
|
# Collaborators can only preview their own processes.
|
208
205
|
def collaborator_action?
|
209
206
|
return unless can_manage_process?(role: :collaborator)
|
207
|
+
return if permission_action.subject == :space_private_user
|
210
208
|
|
211
209
|
allow! if permission_action.action == :preview
|
212
210
|
end
|
@@ -238,7 +236,6 @@ module Decidim
|
|
238
236
|
:process,
|
239
237
|
:process_step,
|
240
238
|
:process_user_role,
|
241
|
-
:space_private_user,
|
242
239
|
:export_space,
|
243
240
|
:import
|
244
241
|
].include?(permission_action.subject)
|
@@ -258,7 +255,6 @@ module Decidim
|
|
258
255
|
:process,
|
259
256
|
:process_step,
|
260
257
|
:process_user_role,
|
261
|
-
:space_private_user,
|
262
258
|
:export_space,
|
263
259
|
:import
|
264
260
|
].include?(permission_action.subject)
|
@@ -6,8 +6,8 @@ module Decidim
|
|
6
6
|
# This class holds the logic to present a `Decidim::ParticipatoryProcess`
|
7
7
|
# for the `AdminLog` log.
|
8
8
|
#
|
9
|
-
# Usage should be automatic and you
|
10
|
-
# directly, but here
|
9
|
+
# Usage should be automatic and you should not need to call this class
|
10
|
+
# directly, but here is an example:
|
11
11
|
#
|
12
12
|
# action_log = Decidim::ActionLog.last
|
13
13
|
# view_helpers # => this comes from the views
|
data/app/presenters/decidim/participatory_processes/admin_log/participatory_process_presenter.rb
CHANGED
@@ -6,8 +6,8 @@ module Decidim
|
|
6
6
|
# This class holds the logic to present a `Decidim::ParticipatoryProcess`
|
7
7
|
# for the `AdminLog` log.
|
8
8
|
#
|
9
|
-
# Usage should be automatic and you
|
10
|
-
# directly, but here
|
9
|
+
# Usage should be automatic and you should not need to call this class
|
10
|
+
# directly, but here is an example:
|
11
11
|
#
|
12
12
|
# action_log = Decidim::ActionLog.last
|
13
13
|
# view_helpers # => this comes from the views
|
@@ -7,8 +7,8 @@ module Decidim
|
|
7
7
|
# `Decidim::ParticipatoryProcessType`
|
8
8
|
# for the `AdminLog` log.
|
9
9
|
#
|
10
|
-
# Usage should be automatic and you
|
11
|
-
# directly, but here
|
10
|
+
# Usage should be automatic and you should not need to call this class
|
11
|
+
# directly, but here is an example:
|
12
12
|
#
|
13
13
|
# action_log = Decidim::ActionLog.last
|
14
14
|
# view_helpers # => this comes from the views
|
@@ -6,8 +6,8 @@ module Decidim
|
|
6
6
|
# This class holds the logic to present a `Decidim::ParticipatoryProcessUserRole`
|
7
7
|
# for the `AdminLog` log.
|
8
8
|
#
|
9
|
-
# Usage should be automatic and you
|
10
|
-
# directly, but here
|
9
|
+
# Usage should be automatic and you should not need to call this class
|
10
|
+
# directly, but here is an example:
|
11
11
|
#
|
12
12
|
# action_log = Decidim::ActionLog.last
|
13
13
|
# view_helpers # => this comes from the views
|
@@ -6,8 +6,8 @@ module Decidim
|
|
6
6
|
# This class holds the logic to present a `Decidim::Step`
|
7
7
|
# for the `AdminLog` log.
|
8
8
|
#
|
9
|
-
# Usage should be automatic and you
|
10
|
-
# directly, but here
|
9
|
+
# Usage should be automatic and you should not need to call this class
|
10
|
+
# directly, but here is an example:
|
11
11
|
#
|
12
12
|
# action_log = Decidim::ActionLog.last
|
13
13
|
# view_helpers # => this comes from the views
|
data/app/presenters/decidim/participatory_processes/participatory_process_group_stats_presenter.rb
CHANGED
@@ -2,54 +2,18 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module ParticipatoryProcesses
|
5
|
-
# A presenter to render statistics in
|
5
|
+
# A presenter to render statistics in a Participatory Process Group
|
6
6
|
class ParticipatoryProcessGroupStatsPresenter < Decidim::StatsPresenter
|
7
7
|
include Decidim::IconHelper
|
8
8
|
|
9
|
-
def participatory_process_group
|
10
|
-
__getobj__.fetch(:participatory_process_group)
|
11
|
-
end
|
12
|
-
|
13
|
-
# Public: returns a collection of stats (Hash) for the participatory
|
14
|
-
# process group landing page.
|
15
|
-
def collection
|
16
|
-
highlighted_stats = process_participants_stats
|
17
|
-
highlighted_stats.concat(process_followers_stats(priority: StatsRegistry::HIGH_PRIORITY))
|
18
|
-
highlighted_stats.concat(component_stats(priority: StatsRegistry::HIGH_PRIORITY))
|
19
|
-
highlighted_stats.concat(component_stats(priority: StatsRegistry::MEDIUM_PRIORITY))
|
20
|
-
highlighted_stats.concat(comments_stats(:participatory_processes))
|
21
|
-
highlighted_stats = highlighted_stats.reject(&:empty?)
|
22
|
-
highlighted_stats = highlighted_stats.reject { |_stat_manifest, _stat_title, stat_number| stat_number.zero? }
|
23
|
-
grouped_highlighted_stats = highlighted_stats.group_by(&:first)
|
24
|
-
|
25
|
-
statistics(grouped_highlighted_stats)
|
26
|
-
end
|
27
|
-
|
28
9
|
private
|
29
10
|
|
30
|
-
def
|
31
|
-
Decidim.stats.only([:participants_count]).with_context(participatory_process_group)
|
32
|
-
.map { |stat_title, stat_number| [:participatory_process_group, stat_title, stat_number] }
|
33
|
-
end
|
34
|
-
|
35
|
-
def component_stats(conditions)
|
36
|
-
Decidim.component_manifests.map do |component_manifest|
|
37
|
-
component_manifest.stats.except([:proposals_accepted])
|
38
|
-
.filter(conditions)
|
39
|
-
.with_context(published_components)
|
40
|
-
.map { |stat_title, stat_number| [component_manifest.name, stat_title, stat_number] }.flatten
|
41
|
-
end
|
42
|
-
end
|
11
|
+
def participatory_space = __getobj__.fetch(:participatory_process_group)
|
43
12
|
|
44
|
-
def
|
45
|
-
Decidim.stats.only([:followers_count])
|
46
|
-
.filter(conditions)
|
47
|
-
.with_context(participatory_process_group)
|
48
|
-
.map { |stat_title, stat_number| [:participatory_process_group, stat_title, stat_number] }
|
49
|
-
end
|
13
|
+
def participatory_space_sym = :participatory_process_group
|
50
14
|
|
51
15
|
def participatory_processes
|
52
|
-
@participatory_processes ||=
|
16
|
+
@participatory_processes ||= participatory_space.participatory_processes
|
53
17
|
end
|
54
18
|
|
55
19
|
def published_components
|
data/app/presenters/decidim/participatory_processes/participatory_process_metric_charts_presenter.rb
CHANGED
@@ -16,74 +16,6 @@ module Decidim
|
|
16
16
|
concat(hidden_field_tag(:metrics_space_id, participatory_process.id, id: :"metrics-space_id"))
|
17
17
|
end
|
18
18
|
end
|
19
|
-
|
20
|
-
def highlighted
|
21
|
-
render_highlighted(Decidim.metrics_registry.filtered(highlight: true, scope: "participatory_process"))
|
22
|
-
end
|
23
|
-
|
24
|
-
def not_highlighted
|
25
|
-
render_not_highlighted(Decidim.metrics_registry.filtered(highlight: false, scope: "participatory_process"))
|
26
|
-
end
|
27
|
-
|
28
|
-
def big_stats
|
29
|
-
safe_join(
|
30
|
-
Decidim.metrics_registry.filtered(scope: "participatory_process", block: "big", sort: true).map do |metric_manifest|
|
31
|
-
content_tag :div, class: "row" do
|
32
|
-
render_metrics_descriptive(metric_manifest.metric_name,
|
33
|
-
klass: "column",
|
34
|
-
graph_klass: "small",
|
35
|
-
title: I18n.t("decidim.metrics.#{metric_manifest.metric_name}.title"),
|
36
|
-
description: I18n.t("decidim.metrics.#{metric_manifest.metric_name}.description"),
|
37
|
-
download: true,
|
38
|
-
data: { ratio: "11:4", axis: true })
|
39
|
-
end
|
40
|
-
end
|
41
|
-
)
|
42
|
-
end
|
43
|
-
|
44
|
-
def medium_stats
|
45
|
-
safe_join(
|
46
|
-
Decidim.metrics_registry.filtered(scope: "participatory_process", block: "medium", sort: true).in_groups_of(2).map do |metrics_group|
|
47
|
-
content_tag :div, class: "row" do
|
48
|
-
safe_join(
|
49
|
-
metrics_group.map do |metric_manifest|
|
50
|
-
next "" if metric_manifest.blank?
|
51
|
-
|
52
|
-
render_metrics_descriptive(metric_manifest.metric_name,
|
53
|
-
klass: "column medium-6",
|
54
|
-
graph_klass: "small",
|
55
|
-
title: I18n.t("decidim.metrics.#{metric_manifest.metric_name}.title"),
|
56
|
-
description: I18n.t("decidim.metrics.#{metric_manifest.metric_name}.description"),
|
57
|
-
download: true,
|
58
|
-
data: { ratio: "16:9", axis: true })
|
59
|
-
end
|
60
|
-
)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
)
|
64
|
-
end
|
65
|
-
|
66
|
-
def small_stats
|
67
|
-
safe_join(
|
68
|
-
Decidim.metrics_registry.filtered(scope: "participatory_process", block: "small", sort: true).in_groups_of(3).map do |metrics_group|
|
69
|
-
content_tag :div, class: "row" do
|
70
|
-
safe_join(
|
71
|
-
metrics_group.map do |metric_manifest|
|
72
|
-
next "" if metric_manifest.blank?
|
73
|
-
|
74
|
-
render_metrics_data(metric_manifest.metric_name,
|
75
|
-
klass: "column medium-4",
|
76
|
-
ratio: "16:9",
|
77
|
-
margin: "margin-top: 30px",
|
78
|
-
graph_klass: "small",
|
79
|
-
download: true,
|
80
|
-
data: { ratio: "16:9" })
|
81
|
-
end
|
82
|
-
)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
)
|
86
|
-
end
|
87
19
|
end
|
88
20
|
end
|
89
21
|
end
|
@@ -11,6 +11,12 @@ module Decidim
|
|
11
11
|
process.attached_uploader(:banner_image).url(host: process.organization.host)
|
12
12
|
end
|
13
13
|
|
14
|
+
def area_name
|
15
|
+
return if process.area.blank?
|
16
|
+
|
17
|
+
Decidim::AreaPresenter.new(process.area).translated_name_with_type
|
18
|
+
end
|
19
|
+
|
14
20
|
def process
|
15
21
|
__getobj__
|
16
22
|
end
|
data/app/presenters/decidim/participatory_processes/participatory_process_stats_presenter.rb
CHANGED
@@ -2,54 +2,15 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module ParticipatoryProcesses
|
5
|
-
# A presenter to render statistics in
|
5
|
+
# A presenter to render statistics in a Participatory Process.
|
6
6
|
class ParticipatoryProcessStatsPresenter < Decidim::StatsPresenter
|
7
7
|
include Decidim::IconHelper
|
8
8
|
|
9
|
-
def participatory_process
|
10
|
-
__getobj__.fetch(:participatory_process)
|
11
|
-
end
|
12
|
-
|
13
|
-
# Public: returns a collection of stats (Hash) for the Process Home.
|
14
|
-
def collection
|
15
|
-
highlighted_stats = process_participants_stats
|
16
|
-
highlighted_stats.concat(process_followers_stats(priority: StatsRegistry::HIGH_PRIORITY))
|
17
|
-
highlighted_stats.concat(component_stats(priority: StatsRegistry::HIGH_PRIORITY))
|
18
|
-
highlighted_stats.concat(component_stats(priority: StatsRegistry::MEDIUM_PRIORITY))
|
19
|
-
highlighted_stats.concat(comments_stats(:participatory_processes))
|
20
|
-
highlighted_stats = highlighted_stats.reject(&:empty?)
|
21
|
-
highlighted_stats = highlighted_stats.reject { |_stat_manifest, _stat_title, stat_number| stat_number.zero? }
|
22
|
-
grouped_highlighted_stats = highlighted_stats.group_by(&:first)
|
23
|
-
|
24
|
-
statistics(grouped_highlighted_stats)
|
25
|
-
end
|
26
|
-
|
27
9
|
private
|
28
10
|
|
29
|
-
def
|
30
|
-
Decidim.stats.only([:participants_count]).with_context(participatory_process)
|
31
|
-
.map { |stat_title, stat_number| [participatory_process.manifest.name, stat_title, stat_number] }
|
32
|
-
end
|
33
|
-
|
34
|
-
def component_stats(conditions)
|
35
|
-
Decidim.component_manifests.map do |component_manifest|
|
36
|
-
component_manifest.stats.except([:proposals_accepted])
|
37
|
-
.filter(conditions)
|
38
|
-
.with_context(published_components)
|
39
|
-
.map { |stat_title, stat_number| [component_manifest.name, stat_title, stat_number] }.flatten
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
def process_followers_stats(conditions)
|
44
|
-
Decidim.stats.only([:followers_count])
|
45
|
-
.filter(conditions)
|
46
|
-
.with_context(participatory_process)
|
47
|
-
.map { |stat_title, stat_number| [participatory_process.manifest.name, stat_title, stat_number] }
|
48
|
-
end
|
11
|
+
def participatory_space = __getobj__.fetch(:participatory_process)
|
49
12
|
|
50
|
-
def
|
51
|
-
@published_components ||= Component.where(participatory_space: participatory_process).published
|
52
|
-
end
|
13
|
+
def participatory_space_sym = :participatory_processes
|
53
14
|
end
|
54
15
|
end
|
55
16
|
end
|
@@ -24,8 +24,8 @@ module Decidim
|
|
24
24
|
Decidim.traceability.perform_action!(:create, ParticipatoryProcess, @user, visibility: "all") do
|
25
25
|
@imported_process = ParticipatoryProcess.new(
|
26
26
|
organization: @organization,
|
27
|
-
title
|
28
|
-
slug
|
27
|
+
title:,
|
28
|
+
slug:,
|
29
29
|
subtitle: attributes["subtitle"],
|
30
30
|
hashtag: attributes["hashtag"],
|
31
31
|
description: attributes["description"],
|
@@ -174,8 +174,8 @@ module Decidim
|
|
174
174
|
private
|
175
175
|
|
176
176
|
def compact_translation(translation)
|
177
|
-
translation["machine_translations"] = translation["machine_translations"].
|
178
|
-
translation.
|
177
|
+
translation["machine_translations"] = translation["machine_translations"].compact_blank if translation["machine_translations"].present?
|
178
|
+
translation.compact_blank
|
179
179
|
end
|
180
180
|
|
181
181
|
def create_attachment_collection(attributes)
|
data/app/views/decidim/participatory_processes/admin/participatory_process_copies/_form.html.erb
CHANGED
@@ -1,35 +1,30 @@
|
|
1
|
-
<div class="
|
2
|
-
<div class="card-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
<div class="card-section">
|
7
|
-
<div class="row column">
|
8
|
-
<div class="row">
|
9
|
-
<div class="column xlarge-8">
|
10
|
-
<%= form.translated :text_field, :title, autofocus: true %>
|
11
|
-
</div>
|
12
|
-
<div class="column xlarge-4 slug">
|
13
|
-
<%= form.text_field :slug %>
|
14
|
-
<p class="help-text"><%== t(".slug_help", url: decidim_form_slug_url(:processes, form.object.slug)) %></p>
|
15
|
-
</div>
|
1
|
+
<div class="form__wrapper">
|
2
|
+
<div class="card pt-4" id="processes">
|
3
|
+
<div class="card-section">
|
4
|
+
<div class="row column">
|
5
|
+
<%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
|
16
6
|
</div>
|
17
|
-
<div class="
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<div class="card
|
22
|
-
<div class="
|
23
|
-
<
|
24
|
-
|
25
|
-
|
7
|
+
<div class="row column">
|
8
|
+
<%= form.text_field :slug, help_text: t(".slug_help_html", url: decidim_form_slug_url(:processes, form.object.slug)) %>
|
9
|
+
</div>
|
10
|
+
<div class="row column">
|
11
|
+
<div class="card">
|
12
|
+
<div class="card-divider">
|
13
|
+
<legend><%= t("participatory_process_copies.new.select", scope: "decidim.admin") %></legend>
|
14
|
+
</div>
|
15
|
+
<div class="card-section">
|
16
|
+
<div class="row">
|
17
|
+
<div class="columns">
|
18
|
+
<%= form.check_box :copy_steps %>
|
19
|
+
</div>
|
26
20
|
|
27
|
-
|
28
|
-
|
29
|
-
|
21
|
+
<div class="columns">
|
22
|
+
<%= form.check_box :copy_categories %>
|
23
|
+
</div>
|
30
24
|
|
31
|
-
|
32
|
-
|
25
|
+
<div class="columns">
|
26
|
+
<%= form.check_box :copy_components %>
|
27
|
+
</div>
|
33
28
|
</div>
|
34
29
|
</div>
|
35
30
|
</div>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_copies/new.html.erb
CHANGED
@@ -1,8 +1,19 @@
|
|
1
1
|
<% add_decidim_page_title(t("participatory_process_copies.new.title", scope: "decidim.admin")) %>
|
2
|
-
|
3
|
-
|
2
|
+
<div class="item_show__header">
|
3
|
+
<h2 class="item_show__header-title">
|
4
|
+
<%= t("participatory_process_copies.new.title", scope: "decidim.admin") %>
|
5
|
+
</h2>
|
6
|
+
</div>
|
4
7
|
|
5
|
-
|
6
|
-
|
8
|
+
<div class="item__edit item__edit-1col">
|
9
|
+
<div class="item__edit-form">
|
10
|
+
<%= decidim_form_for(@form, url: participatory_process_copies_path(current_participatory_process), method: :post, html: { class: "form form-defaults copy_participatory_process" }) do |f| %>
|
11
|
+
<%= render partial: "form", object: f %>
|
12
|
+
<div class="item__edit-sticky">
|
13
|
+
<div class="item__edit-sticky-container">
|
14
|
+
<%= f.submit t("participatory_process_copies.new.copy", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
7
18
|
</div>
|
8
|
-
|
19
|
+
</div>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_groups/_form.html.erb
CHANGED
@@ -1,72 +1,94 @@
|
|
1
|
-
<div class="
|
2
|
-
<div class="card-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
<div class="form__wrapper">
|
2
|
+
<div class="card" data-component="accordion" id="accordion-title">
|
3
|
+
<div class="card-divider">
|
4
|
+
<button class="card-divider-button" data-open="true" data-controls="panel-title" type="button">
|
5
|
+
<%= icon "arrow-right-s-line" %>
|
6
|
+
<h2 class="card-title" id="title">
|
7
|
+
<%= t("title", scope: "decidim.participatory_processes.admin.participatory_process_groups.form") %>
|
8
|
+
</h2>
|
9
|
+
</button>
|
8
10
|
</div>
|
11
|
+
<div id="panel-title" class="card-section">
|
12
|
+
<div class="row column">
|
13
|
+
<%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
|
14
|
+
</div>
|
9
15
|
|
10
|
-
|
11
|
-
|
12
|
-
|
16
|
+
<div class="row column">
|
17
|
+
<%= form.translated :editor, :description, aria: { label: :description } %>
|
18
|
+
</div>
|
13
19
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
20
|
+
<div class="row column">
|
21
|
+
<% if processes_for_select %>
|
22
|
+
<%= form.select :participatory_process_ids, processes_for_select, {}, { multiple: true, class: "chosen-select" } %>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
19
25
|
|
20
|
-
|
21
|
-
|
26
|
+
<div class="row column">
|
27
|
+
<%= form.upload :hero_image, button_class: "button button__sm button__transparent-secondary" %>
|
28
|
+
</div>
|
22
29
|
</div>
|
23
30
|
</div>
|
24
31
|
|
25
|
-
<div class="card-
|
26
|
-
<
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
+
<div class="card" data-component="accordion" id="accordion-metadata">
|
33
|
+
<div class="card-divider">
|
34
|
+
<button class="card-divider-button" data-open="true" data-controls="panel-metadata" type="button">
|
35
|
+
<%= icon "arrow-right-s-line" %>
|
36
|
+
<h2 class="card-title" id="metadata">
|
37
|
+
<%= t("metadata", scope: "decidim.participatory_processes.admin.participatory_process_groups.form") %>
|
38
|
+
</h2>
|
39
|
+
</button>
|
32
40
|
</div>
|
33
41
|
|
34
|
-
<div
|
35
|
-
|
36
|
-
|
42
|
+
<div id="panel-metadata" class="card-section">
|
43
|
+
<div class="row column">
|
44
|
+
<%= form.text_field :hashtag %>
|
45
|
+
</div>
|
37
46
|
|
38
|
-
|
39
|
-
|
40
|
-
|
47
|
+
<div class="row column">
|
48
|
+
<%= form.text_field :group_url %>
|
49
|
+
</div>
|
41
50
|
|
42
|
-
|
43
|
-
|
44
|
-
|
51
|
+
<div class="row column">
|
52
|
+
<%= form.translated :text_field, :developer_group, aria: { label: :developer_group } %>
|
53
|
+
</div>
|
45
54
|
|
46
|
-
|
47
|
-
|
48
|
-
|
55
|
+
<div class="row column">
|
56
|
+
<%= form.translated :text_field, :local_area, aria: { label: :local_area } %>
|
57
|
+
</div>
|
49
58
|
|
50
|
-
|
51
|
-
|
52
|
-
|
59
|
+
<div class="row column">
|
60
|
+
<%= form.translated :text_field, :meta_scope, aria: { label: :meta_scope } %>
|
61
|
+
</div>
|
53
62
|
|
54
|
-
|
55
|
-
|
56
|
-
|
63
|
+
<div class="row column">
|
64
|
+
<%= form.translated :text_field, :target, aria: { label: :target } %>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<div class="row column">
|
68
|
+
<%= form.translated :text_field, :participatory_scope, aria: { label: :participatory_scope } %>
|
69
|
+
</div>
|
57
70
|
|
58
|
-
|
59
|
-
|
71
|
+
<div class="row column">
|
72
|
+
<%= form.translated :text_field, :participatory_structure, aria: { label: :participatory_structure } %>
|
73
|
+
</div>
|
60
74
|
</div>
|
61
75
|
</div>
|
62
76
|
|
63
|
-
<div class="card-
|
64
|
-
<
|
65
|
-
|
77
|
+
<div class="card" data-component="accordion" id="accordion-visibility">
|
78
|
+
<div class="card-divider">
|
79
|
+
<button class="card-divider-button" data-open="true" data-controls="panel-visibility" type="button">
|
80
|
+
<%= icon "arrow-right-s-line" %>
|
81
|
+
<h2 class="card-title" id="visibility">
|
82
|
+
<%= t("visibility", scope: "decidim.participatory_processes.admin.participatory_process_groups.form") %>
|
83
|
+
</h2>
|
84
|
+
</button>
|
85
|
+
</div>
|
66
86
|
|
67
|
-
|
68
|
-
|
69
|
-
|
87
|
+
<div id="panel-visibility" class="card-section">
|
88
|
+
<div class="row column">
|
89
|
+
<%= form.check_box :promoted %>
|
90
|
+
</div>
|
70
91
|
</div>
|
71
92
|
</div>
|
93
|
+
|
72
94
|
</div>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_groups/edit.html.erb
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
<% add_decidim_page_title t("participatory_process_groups.edit.title", scope: "decidim.admin") %>
|
2
|
-
|
3
|
-
<h2 class="
|
2
|
+
<div class="item_show__header">
|
3
|
+
<h2 class="item_show__header-title">
|
4
4
|
<%= t "participatory_process_groups.edit.title", scope: "decidim.admin" %>
|
5
|
-
<% if allowed_to? :destroy, :process_group, process_group: participatory_process_group %>
|
6
|
-
<%= link_to t("decidim.admin.actions.destroy"), participatory_process_group, method: :delete, class: "button alert tiny button--title destroy", data: { confirm: t("decidim.admin.actions.confirm_destroy") } %>
|
7
|
-
<% end %>
|
8
5
|
</h2>
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="item__edit item__edit-1col">
|
9
|
+
<div class="item__edit-form">
|
10
|
+
<%= decidim_form_for(@form, html: { class: "form-defaults form edit_participatory_process_group" }) do |f| %>
|
11
|
+
<%= render partial: "form", object: f %>
|
12
|
+
<div class="item__edit-sticky">
|
13
|
+
<div class="item__edit-sticky-container">
|
14
|
+
<%= f.submit t("participatory_process_groups.edit.update", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
12
18
|
</div>
|
13
|
-
|
19
|
+
</div>
|