decidim-participatory_processes 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +36 -0
- data/Rakefile +3 -0
- data/app/assets/config/admin/decidim_participatory_processes_manifest.js +1 -0
- data/app/assets/config/decidim_participatory_processes_manifest.js +2 -0
- data/app/assets/images/decidim/participatory_processes/process.svg +10 -0
- data/app/assets/javascripts/decidim/participatory_processes/admin/participatory_processes.js.es6 +12 -0
- data/app/assets/javascripts/decidim/participatory_processes/filters.js.es6 +25 -0
- data/app/commands/decidim/participatory_processes/admin/activate_participatory_process_step.rb +46 -0
- data/app/commands/decidim/participatory_processes/admin/copy_participatory_process.rb +116 -0
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process.rb +82 -0
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process_admin.rb +95 -0
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process_group.rb +57 -0
- data/app/commands/decidim/participatory_processes/admin/create_participatory_process_step.rb +49 -0
- data/app/commands/decidim/participatory_processes/admin/deactivate_participatory_process_step.rb +38 -0
- data/app/commands/decidim/participatory_processes/admin/destroy_participatory_process_step.rb +46 -0
- data/app/commands/decidim/participatory_processes/admin/publish_participatory_process.rb +34 -0
- data/app/commands/decidim/participatory_processes/admin/reorder_participatory_process_steps.rb +54 -0
- data/app/commands/decidim/participatory_processes/admin/unpublish_participatory_process.rb +34 -0
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process.rb +77 -0
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process_admin.rb +43 -0
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process_group.rb +60 -0
- data/app/commands/decidim/participatory_processes/admin/update_participatory_process_step.rb +51 -0
- data/app/constraints/decidim/participatory_processes/current_feature.rb +28 -0
- data/app/constraints/decidim/participatory_processes/current_participatory_process.rb +37 -0
- data/app/controllers/concerns/decidim/participatory_processes/admin/participatory_process_context.rb +21 -0
- data/app/controllers/concerns/decidim/participatory_processes/needs_participatory_process.rb +50 -0
- data/app/controllers/concerns/decidim/participatory_processes/participatory_process_context.rb +27 -0
- data/app/controllers/decidim/participatory_processes/admin/application_controller.rb +11 -0
- data/app/controllers/decidim/participatory_processes/admin/categories_controller.rb +13 -0
- data/app/controllers/decidim/participatory_processes/admin/concerns/participatory_process_admin.rb +26 -0
- data/app/controllers/decidim/participatory_processes/admin/exports_controller.rb +14 -0
- data/app/controllers/decidim/participatory_processes/admin/feature_permissions_controller.rb +14 -0
- data/app/controllers/decidim/participatory_processes/admin/features_controller.rb +14 -0
- data/app/controllers/decidim/participatory_processes/admin/moderations_controller.rb +12 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_attachments_controller.rb +27 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_copies_controller.rb +35 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_groups_controller.rb +90 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_publications_controller.rb +45 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_step_activations_controller.rb +39 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_step_ordering_controller.rb +29 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_steps_controller.rb +91 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_process_user_roles_controller.rb +99 -0
- data/app/controllers/decidim/participatory_processes/admin/participatory_processes_controller.rb +102 -0
- data/app/controllers/decidim/participatory_processes/participatory_process_groups_controller.rb +28 -0
- data/app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb +20 -0
- data/app/controllers/decidim/participatory_processes/participatory_process_widgets_controller.rb +21 -0
- data/app/controllers/decidim/participatory_processes/participatory_processes_controller.rb +64 -0
- data/app/forms/decidim/participatory_processes/admin/participatory_process_copy_form.rb +35 -0
- data/app/forms/decidim/participatory_processes/admin/participatory_process_form.rb +72 -0
- data/app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb +26 -0
- data/app/forms/decidim/participatory_processes/admin/participatory_process_step_form.rb +37 -0
- data/app/forms/decidim/participatory_processes/admin/participatory_process_user_role_form.rb +31 -0
- data/app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb +23 -0
- data/app/helpers/decidim/participatory_processes/admin/processes_for_select_helper.rb +25 -0
- data/app/helpers/decidim/participatory_processes/participatory_process_helper.rb +19 -0
- data/app/helpers/decidim/participatory_processes/participatory_process_steps_helper.rb +20 -0
- data/app/models/decidim/participatory_process.rb +62 -0
- data/app/models/decidim/participatory_process_group.rb +15 -0
- data/app/models/decidim/participatory_process_step.rb +39 -0
- data/app/models/decidim/participatory_processes/abilities/admin/admin_ability.rb +21 -0
- data/app/models/decidim/participatory_processes/abilities/admin_ability.rb +16 -0
- data/app/models/decidim/participatory_processes/abilities/everyone_ability.rb +19 -0
- data/app/presenters/decidim/participatory_processes/participatory_process_stats_presenter.rb +52 -0
- data/app/queries/decidim/participatory_processes/admin/admin_users.rb +46 -0
- data/app/queries/decidim/participatory_processes/filtered_participatory_process_groups.rb +29 -0
- data/app/queries/decidim/participatory_processes/filtered_participatory_processes.rb +26 -0
- data/app/queries/decidim/participatory_processes/highlighted_participatory_processes.rb +12 -0
- data/app/queries/decidim/participatory_processes/organization_participatory_process_groups.rb +16 -0
- data/app/queries/decidim/participatory_processes/organization_participatory_processes.rb +16 -0
- data/app/queries/decidim/participatory_processes/organization_prioritized_participatory_process_groups.rb +20 -0
- data/app/queries/decidim/participatory_processes/organization_prioritized_participatory_processes.rb +22 -0
- data/app/queries/decidim/participatory_processes/organization_published_participatory_processes.rb +19 -0
- data/app/queries/decidim/participatory_processes/prioritized_participatory_processes.rb +13 -0
- data/app/queries/decidim/participatory_processes/promoted_participatory_processes.rb +12 -0
- data/app/queries/decidim/participatory_processes/published_participatory_processes.rb +12 -0
- data/app/views/decidim/participatory_process_groups/_participatory_process_group.html.erb +22 -0
- data/app/views/decidim/participatory_process_steps/_participatory_process_step.html.erb +16 -0
- data/app/views/decidim/participatory_processes/_order_by_processes.html.erb +12 -0
- data/app/views/decidim/participatory_processes/_participatory_process.html.erb +28 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_copies/_form.html.erb +38 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_copies/new.html.erb +7 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/_form.html.erb +17 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/edit.html.erb +19 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/index.html.erb +44 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/new.html.erb +13 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_groups/show.html.erb +23 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_steps/_form.html.erb +25 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_steps/edit.html.erb +8 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_steps/index.html.erb +63 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_steps/new.html.erb +7 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_steps/show.html.erb +18 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/_form.html.erb +22 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/edit.html.erb +7 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/index.html.erb +65 -0
- data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/new.html.erb +7 -0
- data/app/views/decidim/participatory_processes/admin/participatory_processes/_form.html.erb +107 -0
- data/app/views/decidim/participatory_processes/admin/participatory_processes/edit.html.erb +19 -0
- data/app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb +66 -0
- data/app/views/decidim/participatory_processes/admin/participatory_processes/new.html.erb +11 -0
- data/app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb +11 -0
- data/app/views/decidim/participatory_processes/participatory_process_steps/_timeline.html.erb +7 -0
- data/app/views/decidim/participatory_processes/participatory_process_steps/index.html.erb +14 -0
- data/app/views/decidim/participatory_processes/participatory_process_widgets/show.html.erb +17 -0
- data/app/views/decidim/participatory_processes/participatory_processes/_no_processes_yet.html.erb +3 -0
- data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process.html.erb +32 -0
- data/app/views/decidim/participatory_processes/participatory_processes/_statistics.html.erb +10 -0
- data/app/views/decidim/participatory_processes/participatory_processes/index.html.erb +22 -0
- data/app/views/decidim/participatory_processes/participatory_processes/index.js.erb +6 -0
- data/app/views/decidim/participatory_processes/participatory_processes/show.html.erb +92 -0
- data/app/views/layouts/decidim/_process_header.html.erb +65 -0
- data/app/views/layouts/decidim/_process_header_steps.html.erb +27 -0
- data/app/views/layouts/decidim/admin/participatory_process.html.erb +64 -0
- data/app/views/layouts/decidim/admin/participatory_process_groups.html.erb +14 -0
- data/app/views/layouts/decidim/admin/participatory_processes.html.erb +14 -0
- data/app/views/layouts/decidim/participatory_process.html.erb +30 -0
- data/config/locales/ca.yml +281 -0
- data/config/locales/en.yml +281 -0
- data/config/locales/es.yml +281 -0
- data/config/locales/eu.yml +280 -0
- data/config/locales/fi.yml +280 -0
- data/config/locales/fr.yml +280 -0
- data/config/locales/it.yml +280 -0
- data/config/locales/nl.yml +280 -0
- data/config/locales/pl.yml +281 -0
- data/config/locales/uk.yml +282 -0
- data/db/migrate/20161005130108_add_participatory_processes.rb +19 -0
- data/db/migrate/20161010102356_translate_processes.rb +17 -0
- data/db/migrate/20161011125616_add_hero_image_to_processes.rb +7 -0
- data/db/migrate/20161011141033_add_banner_image_to_processes.rb +7 -0
- data/db/migrate/20161013134732_add_promoted_flag_to_processes.rb +7 -0
- data/db/migrate/20161017085822_add_participatory_process_steps.rb +18 -0
- data/db/migrate/20161019072016_add_active_flag_to_step.rb +13 -0
- data/db/migrate/20161020080756_add_position_to_steps.rb +9 -0
- data/db/migrate/20161025125300_add_published_at_to_processes.rb +7 -0
- data/db/migrate/20161107152228_remove_not_null_on_step_position.rb +7 -0
- data/db/migrate/20161110092735_add_index_for_process_slug_organization.rb +10 -0
- data/db/migrate/20161116115156_create_attachments.rb +18 -0
- data/db/migrate/20170116135237_loosen_step_requirements.rb +8 -0
- data/db/migrate/20170123134023_make_attachments_polymorphic.rb +20 -0
- data/db/migrate/20170125135937_rename_attachable_to_attached_to.rb +13 -0
- data/db/migrate/20170126151123_add_extra_info_to_processes.rb +10 -0
- data/db/migrate/20170206083118_rename_extra_info_on_processes.rb +14 -0
- data/db/migrate/20170220110740_remove_steps_short_description.rb +23 -0
- data/db/migrate/20170221094835_add_scopes_to_processes.rb +8 -0
- data/db/migrate/20170228142440_add_participatory_process_groups.rb +17 -0
- data/db/migrate/20170404132616_change_steps_end_and_start_date_to_date.rb +8 -0
- data/db/migrate/20170720120135_make_features_polymorphic.rb +27 -0
- data/db/migrate/20170725085104_add_show_statistics_to_participatory_processes.rb +7 -0
- data/db/migrate/20170804125402_attachment_description_nullable.rb +7 -0
- data/db/migrate/20170808080905_add_announcement_to_participatory_processes.rb +7 -0
- data/db/migrate/20170809084005_add_scopes_enabled_to_participatory_processes.rb +7 -0
- data/db/migrate/20170830081725_add_start_date_to_processes.rb +8 -0
- 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/lib/decidim/participatory_processes.rb +12 -0
- data/lib/decidim/participatory_processes/admin.rb +10 -0
- data/lib/decidim/participatory_processes/admin_engine.rb +98 -0
- data/lib/decidim/participatory_processes/engine.rb +55 -0
- data/lib/decidim/participatory_processes/participatory_space.rb +118 -0
- data/lib/decidim/participatory_processes/test/factories.rb +97 -0
- metadata +266 -0
data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/new.html.erb
ADDED
@@ -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('participatory_process_user_roles.new.title', scope: "decidim.admin") } %>
|
3
|
+
|
4
|
+
<div class="button--double form-general-submit">
|
5
|
+
<%= f.submit t("participatory_process_user_roles.new.create", scope: "decidim.admin") %>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
@@ -0,0 +1,107 @@
|
|
1
|
+
<div class="card">
|
2
|
+
<div class="card-divider">
|
3
|
+
<h2 class="card-title"><%= t "participatory_processes.form.title", scope: "decidim.admin" %></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">
|
26
|
+
<div class="columns xlarge-6">
|
27
|
+
<%= form.date_field :start_date %>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div class="columns xlarge-6">
|
31
|
+
<%= form.date_field :end_date %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div class="row column">
|
36
|
+
<%= form.check_box :promoted %>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="row column">
|
40
|
+
<%= form.translated :editor, :short_description %>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div class="row column">
|
44
|
+
<%= form.translated :editor, :description, toolbar: :full, lines: 25 %>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div class="row">
|
48
|
+
<div class="columns xlarge-6">
|
49
|
+
<%= form.upload :hero_image %>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<div class="columns xlarge-6">
|
53
|
+
<%= form.upload :banner_image %>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div class="row">
|
58
|
+
<div class="columns xlarge-6">
|
59
|
+
<%= form.translated :text_field, :developer_group %>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div class="columns xlarge-6">
|
63
|
+
<%= form.translated :text_field, :local_area %>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<div class="row column">
|
68
|
+
<%= form.translated :text_field, :meta_scope %>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<div class="row column">
|
72
|
+
<%= form.translated :text_field, :target %>
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<div class="row column">
|
76
|
+
<%= form.check_box :scopes_enabled %>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div class="row column">
|
80
|
+
<%= form.scopes_select :scope_id, prompt: t("decidim.scopes.global"), remote_path: decidim.scopes_search_path %>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
<div class="row column">
|
84
|
+
<%= form.translated :text_field, :participatory_scope %>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div class="row column">
|
88
|
+
<%= form.translated :text_field, :participatory_structure %>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div class="row column">
|
92
|
+
<% if process_groups_for_select %>
|
93
|
+
<%= form.select :participatory_process_group_id, process_groups_for_select, prompt: I18n.t("decidim.participatory_processes.participatory_process_groups.none") %>
|
94
|
+
<% end %>
|
95
|
+
</div>
|
96
|
+
|
97
|
+
<div class="row column">
|
98
|
+
<%= form.check_box :show_statistics %>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
<div class="row column">
|
102
|
+
<%= form.translated :editor, :announcement %>
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<%= javascript_include_tag "decidim/participatory_processes/admin/participatory_processes" %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%= decidim_form_for(@form, html: { class: "form edit_participatory_process" }) do |f| %>
|
2
|
+
<%= render partial: 'form', object: f %>
|
3
|
+
<div class="button--double form-general-submit">
|
4
|
+
<%= f.submit t("participatory_processes.edit.update", scope: "decidim.admin"), class: "button" %>
|
5
|
+
|
6
|
+
<% if can? :publish, current_participatory_process %>
|
7
|
+
<% if current_participatory_process.published? %>
|
8
|
+
<%= link_to t("actions.unpublish", scope: "decidim.admin"), participatory_process_publish_path(current_participatory_process), method: :delete, class: "button muted" %>
|
9
|
+
<% else %>
|
10
|
+
<%= link_to t("actions.publish", scope: "decidim.admin"), participatory_process_publish_path(current_participatory_process), method: :post, class: "button hollow" %>
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<% if can? :destroy, current_participatory_process %>
|
15
|
+
<%= link_to t("decidim.admin.actions.destroy"), current_participatory_process, method: :delete, class: "alert button", data: { confirm: t("decidim.admin.actions.confirm_destroy") } %>
|
16
|
+
<% end %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<div class="card" id="processes">
|
2
|
+
<div class="card-divider">
|
3
|
+
<h2 class="card-title">
|
4
|
+
<%= t "decidim.admin.titles.participatory_processes" %><%= link_to t("actions.new", scope: "decidim.admin", name: t("models.participatory_process.name", scope: "decidim.admin")), ['new', 'participatory_process'], class: 'button tiny button--title' if can? :create, Decidim::ParticipatoryProcess %>
|
5
|
+
</h2>
|
6
|
+
</div>
|
7
|
+
<div class="card-section">
|
8
|
+
<div class="table-scroll">
|
9
|
+
<table class="table-list">
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th><%= t("models.participatory_process.fields.title", scope: "decidim.admin") %></th>
|
13
|
+
<th><%= t("models.participatory_process.fields.created_at", scope: "decidim.admin") %></th>
|
14
|
+
<th class="table-list__actions"><%= t("models.participatory_process.fields.published", scope: "decidim.admin") %></th>
|
15
|
+
<th></th>
|
16
|
+
</tr>
|
17
|
+
</thead>
|
18
|
+
<tbody>
|
19
|
+
<% @participatory_processes.each do |process| %>
|
20
|
+
<tr>
|
21
|
+
<td>
|
22
|
+
<% if process.promoted? %>
|
23
|
+
<span data-tooltip class="icon-state icon-highlight" aria-haspopup="true" data-disable-hover="false" title="<%= t("models.participatory_process.fields.promoted", scope: "decidim.admin") %>">
|
24
|
+
<%= icon "star" %>
|
25
|
+
</span>
|
26
|
+
<% end %>
|
27
|
+
<% if can? :update, process %>
|
28
|
+
<%= link_to translated_attribute(process.title), edit_participatory_process_path(process) %><br />
|
29
|
+
<% elsif can? :preview, process %>
|
30
|
+
<%= link_to translated_attribute(process.title), decidim_participatory_processes.participatory_process_path(process) %><br />
|
31
|
+
<% elsif can? :read, Decidim::Moderation %>
|
32
|
+
<%= link_to translated_attribute(process.title), moderations_path(process) %><br />
|
33
|
+
<% else %>
|
34
|
+
<%= translated_attribute(process.title) %>
|
35
|
+
<% end %>
|
36
|
+
</td>
|
37
|
+
<td>
|
38
|
+
<%= l process.created_at, format: :short %>
|
39
|
+
</td>
|
40
|
+
<td class="table-list__state">
|
41
|
+
<% if process.published? %>
|
42
|
+
<strong class="text-success"><%= t('participatory_processes.index.published', scope: "decidim.admin") %></strong>
|
43
|
+
<% else %>
|
44
|
+
<strong class="text-alert"><%= t('participatory_processes.index.not_published', scope: "decidim.admin") %></strong>
|
45
|
+
<% end %>
|
46
|
+
</td>
|
47
|
+
<td class="table-list__actions">
|
48
|
+
<% if can? :create, process %>
|
49
|
+
<%= icon_link_to "clipboard", new_participatory_process_copy_path(process), t("actions.duplicate", scope: "decidim.admin"), class: "action-icon--copy" %>
|
50
|
+
<% end %>
|
51
|
+
|
52
|
+
<% if can? :update, process %>
|
53
|
+
<%= icon_link_to "pencil", edit_participatory_process_path(process), t("actions.configure", scope: "decidim.admin"), class: "action-icon--new" %>
|
54
|
+
<% end %>
|
55
|
+
|
56
|
+
<% if can? :preview, process %>
|
57
|
+
<%= icon_link_to "eye", decidim_participatory_processes.participatory_process_path(process), t("actions.preview", scope: "decidim.admin"), class: "action-icon--preview" %>
|
58
|
+
<% end %>
|
59
|
+
</td>
|
60
|
+
</tr>
|
61
|
+
<% end %>
|
62
|
+
</tbody>
|
63
|
+
</table>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<h2 class="process-title-summary">
|
2
|
+
<%= t "participatory_processes.new.title", scope: "decidim.admin" %>
|
3
|
+
</h2>
|
4
|
+
|
5
|
+
<%= decidim_form_for(@form, html: { class: "form new_participatory_process" }) do |f| %>
|
6
|
+
<%= render partial: 'form', object: f %>
|
7
|
+
|
8
|
+
<div class="button--double form-general-submit">
|
9
|
+
<%= f.submit t("participatory_processes.new.create", scope: "decidim.admin") %>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% provide :meta_title, t("participatory_process_groups.show.title", scope: "decidim") %>
|
2
|
+
|
3
|
+
<main class="wrapper">
|
4
|
+
<section id="processes-grid" class="section row collapse">
|
5
|
+
<h1 class="section-heading"><%= t("participatory_process_groups.show.group_participatory_processes", scope: "decidim", group: translated_attribute(group.name)) %></h1>
|
6
|
+
<%= render partial: "decidim/participatory_processes/order_by_processes", locals: { include_filter: false } %>
|
7
|
+
<div class="row small-up-1 medium-up-2 large-up-3 card-grid">
|
8
|
+
<%= render participatory_processes || render(partial: "no_processes_yet") %>
|
9
|
+
</div>
|
10
|
+
</section>
|
11
|
+
</main>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% add_decidim_page_title(t("participatory_process_steps.index.title", scope: "decidim")) %>
|
2
|
+
|
3
|
+
<main class="steps">
|
4
|
+
<div class="row column">
|
5
|
+
<div class="row">
|
6
|
+
<div class="columns mediumlarge-9 large-7">
|
7
|
+
<div class="section">
|
8
|
+
<h4 class="section-heading"><%= t('participatory_process_steps.index.process_steps', scope: "decidim") %></h4>
|
9
|
+
<%= render partial: 'timeline' %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</main>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% content_for(:header, "false") %>
|
2
|
+
<% content_for(:title, translated_attribute(model.title)) %>
|
3
|
+
<p class="card__desc"><%== html_truncate(translated_attribute(model.short_description), length: 630, separator: '...') %></p>
|
4
|
+
<% content_for(:footer) do %>
|
5
|
+
<div class="card__support">
|
6
|
+
<% if model.active_step %>
|
7
|
+
<span class="card--process__small">
|
8
|
+
<%= t("participatory_process_widgets.show.active_step", scope: "layouts.decidim") %>
|
9
|
+
<strong><%= translated_attribute model.active_step.title %></strong>
|
10
|
+
</span>
|
11
|
+
<% end %>
|
12
|
+
<span class="card--process__small"></span>
|
13
|
+
<%= link_to participatory_process_path(model), class: "card__button button small" do %>
|
14
|
+
<%= t("participatory_process_widgets.show.take_part", scope: "layouts.decidim") %>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
data/app/views/decidim/participatory_processes/participatory_processes/_promoted_process.html.erb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
<article class="card card--full card--process">
|
2
|
+
<div class="row collapse card--process__row">
|
3
|
+
<div class="columns mediumlarge-8 large-6 card--process__column">
|
4
|
+
<div class="card__content">
|
5
|
+
<%= link_to participatory_process_path(promoted_process), class: "card__link" do %>
|
6
|
+
<h2 class="card__title"><%= translated_attribute promoted_process.title %></h2>
|
7
|
+
<% end %>
|
8
|
+
<%== html_truncate(translated_attribute(promoted_process.short_description), length: 630, separator: '...') %>
|
9
|
+
<%= link_to participatory_process_path(promoted_process), class: "button secondary small hollow card__button" do %>
|
10
|
+
<%= t("participatory_processes.promoted_process.more_info", scope: "layouts.decidim") %>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
<div class="columns mediumlarge-8 large-6 card--process__column">
|
15
|
+
<div class="card--full__image"
|
16
|
+
style="background-image:url(<%= promoted_process.hero_image.url %>)">
|
17
|
+
<div class="card__content row collapse">
|
18
|
+
<div class="large-6 large-offset-6 columns">
|
19
|
+
<%= link_to participatory_process_path(promoted_process), class: "button expanded button--sc" do %>
|
20
|
+
<%= t("participatory_processes.promoted_process.take_part", scope: "layouts.decidim") %>
|
21
|
+
<% if promoted_process.active_step %>
|
22
|
+
<span class="button__info">
|
23
|
+
<%= t("participatory_processes.promoted_process.active_step", scope: "layouts.decidim") %> <%= translated_attribute promoted_process.active_step.title %>
|
24
|
+
</span>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
</article>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<section class="extended" id="participatory_process-statistics" class="statistics">
|
2
|
+
<div class="row column">
|
3
|
+
<h4 class="section-heading"><%= t("statistics.headline", scope: "decidim.participatory_processes", participatory_process: translated_attribute(current_participatory_process.title)) %></h3>
|
4
|
+
</div>
|
5
|
+
<div class="row">
|
6
|
+
<div class="columns small-centered mediumlarge-12 large-12 process_stats">
|
7
|
+
<%= stats.highlighted %>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
</section>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<% provide :meta_title, t("participatory_processes.index.title", scope: "decidim") %>
|
2
|
+
|
3
|
+
<main class="wrapper">
|
4
|
+
<% if promoted_participatory_processes.any? %>
|
5
|
+
<section id ="highlighted-processes" class="row section">
|
6
|
+
<h1 class="section-heading"><%= t("participatory_processes.index.promoted_processes", scope: "layouts.decidim") %></h1>
|
7
|
+
<%= render partial: "promoted_process", collection: promoted_participatory_processes, as: :promoted_process %>
|
8
|
+
</section>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<section id="processes-grid" class="section row collapse">
|
12
|
+
<div class="processes-grid-order-by">
|
13
|
+
<%= render partial: "decidim/participatory_processes/order_by_processes", locals: { include_filter: true } %>
|
14
|
+
</div>
|
15
|
+
<p class="loading"><%= t('.loading') %></p>
|
16
|
+
<div class="row small-up-1 medium-up-2 large-up-3 card-grid">
|
17
|
+
<%= render(collection) || render(partial: "no_processes_yet") %>
|
18
|
+
</div>
|
19
|
+
</section>
|
20
|
+
</main>
|
21
|
+
|
22
|
+
<%= javascript_include_tag "decidim/participatory_processes/filters" %>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
const $grid = $('#processes-grid');
|
2
|
+
const $loading = $grid.find('.loading');
|
3
|
+
|
4
|
+
$grid.find('.card-grid').html('<%= j render(collection) || render(partial: "no_processes_yet") %>');
|
5
|
+
$grid.find('.processes-grid-order-by').html('<%= j render(partial: "decidim/participatory_processes/order_by_processes", locals: { include_filter: true }) %>');
|
6
|
+
$loading.hide();
|
@@ -0,0 +1,92 @@
|
|
1
|
+
<% add_decidim_meta_tags({
|
2
|
+
image_url: current_participatory_process.hero_image.url,
|
3
|
+
description: translated_attribute(current_participatory_process.short_description),
|
4
|
+
title: translated_attribute(current_participatory_process.title),
|
5
|
+
url: participatory_process_url(current_participatory_process),
|
6
|
+
twitter_handler: current_organization.twitter_handler
|
7
|
+
}) %>
|
8
|
+
|
9
|
+
<% if translated_attribute(current_participatory_process.announcement).present? %>
|
10
|
+
<%= render partial: "decidim/shared/announcement", locals: { announcement: current_participatory_process.announcement } %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<div class="row column">
|
14
|
+
<div class="row">
|
15
|
+
<div class="columns medium-7 mediumlarge-8">
|
16
|
+
<div class="section">
|
17
|
+
<div class="lead">
|
18
|
+
<%== translated_attribute(current_participatory_process.short_description) %>
|
19
|
+
</div>
|
20
|
+
<%== translated_attribute(current_participatory_process.description) %>
|
21
|
+
</div>
|
22
|
+
<%= attachments_for current_participatory_process %>
|
23
|
+
</div>
|
24
|
+
<div class="section columns medium-5 mediumlarge-4 large-3">
|
25
|
+
<div class="card extra definition-data">
|
26
|
+
<% if translated_attribute(current_participatory_process.meta_scope).present? %>
|
27
|
+
<div class="definition-data__item scope">
|
28
|
+
<span class="definition-data__title"><%= t("participatory_processes.show.scope", scope: "decidim") %></span>
|
29
|
+
<%== translated_attribute(current_participatory_process.meta_scope) %>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
32
|
+
|
33
|
+
<% if current_participatory_process.start_date.present? %>
|
34
|
+
<div class="definition-data__item start-date">
|
35
|
+
<span class="definition-data__title"><%= t("participatory_processes.show.start_date", scope: "decidim") %></span>
|
36
|
+
<%== l(current_participatory_process.start_date, format: :long) %>
|
37
|
+
</div>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<% if current_participatory_process.end_date.present? %>
|
41
|
+
<div class="definition-data__item end-date">
|
42
|
+
<span class="definition-data__title"><%= t("participatory_processes.show.end_date", scope: "decidim") %></span>
|
43
|
+
<%== l(current_participatory_process.end_date, format: :long) %>
|
44
|
+
</div>
|
45
|
+
<% end %>
|
46
|
+
|
47
|
+
<% if translated_attribute(current_participatory_process.developer_group).present? %>
|
48
|
+
<div class="definition-data__item developer-group">
|
49
|
+
<span class="definition-data__title"><%= t("participatory_processes.show.developer_group", scope: "decidim") %></span>
|
50
|
+
<%== translated_attribute(current_participatory_process.developer_group) %>
|
51
|
+
</div>
|
52
|
+
<% end %>
|
53
|
+
|
54
|
+
<% if translated_attribute(current_participatory_process.local_area).present? %>
|
55
|
+
<div class="definition-data__item local_area">
|
56
|
+
<span class="definition-data__title"><%= t("participatory_processes.show.local_area", scope: "decidim") %></span>
|
57
|
+
<%== translated_attribute(current_participatory_process.local_area) %>
|
58
|
+
</div>
|
59
|
+
<% end %>
|
60
|
+
|
61
|
+
<% if translated_attribute(current_participatory_process.target).present? %>
|
62
|
+
<div class="definition-data__item target">
|
63
|
+
<span class="definition-data__title"><%= t("participatory_processes.show.target", scope: "decidim") %></span>
|
64
|
+
<%== translated_attribute(current_participatory_process.target) %>
|
65
|
+
</div>
|
66
|
+
<% end %>
|
67
|
+
|
68
|
+
<% if translated_attribute(current_participatory_process.participatory_scope).present? %>
|
69
|
+
<div class="definition-data__item participatory_scope">
|
70
|
+
<span class="definition-data__title"><%= t("participatory_processes.show.participatory_scope", scope: "decidim") %></span>
|
71
|
+
<%== translated_attribute(current_participatory_process.participatory_scope) %>
|
72
|
+
</div>
|
73
|
+
<% end %>
|
74
|
+
|
75
|
+
<% if translated_attribute(current_participatory_process.participatory_structure).present? %>
|
76
|
+
<div class="definition-data__item participatory_structure">
|
77
|
+
<span class="definition-data__title"><%= t("participatory_processes.show.participatory_structure", scope: "decidim") %></span>
|
78
|
+
<%== translated_attribute(current_participatory_process.participatory_structure) %>
|
79
|
+
</div>
|
80
|
+
<% end %>
|
81
|
+
</div>
|
82
|
+
<%= render partial: "decidim/shared/share_modal" %>
|
83
|
+
<%= embed_modal_for participatory_process_participatory_process_widget_url(current_participatory_process, format: :js) %>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
<% if current_participatory_process.show_statistics? %>
|
87
|
+
<%= render partial: 'statistics' %>
|
88
|
+
<% end %>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<%= javascript_include_tag "decidim/proposals/social_share" %>
|
92
|
+
<%= stylesheet_link_tag "decidim/proposals/social_share" %>
|