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
@@ -0,0 +1,16 @@
|
|
1
|
+
<li class="<%= "timeline__item #{step_status_class}" %>">
|
2
|
+
<div class="timeline__phase">
|
3
|
+
<span class="timeline__phase__number"><%= participatory_process_step.position + 1 %></span>
|
4
|
+
</div>
|
5
|
+
<div class="timeline__info">
|
6
|
+
<div class="timeline__header">
|
7
|
+
<span class="timeline__date text-small">
|
8
|
+
<%= participatory_process_step_dates(participatory_process_step) %>
|
9
|
+
</span>
|
10
|
+
<h6 class="timeline__title heading6"><%= translated_attribute(participatory_process_step.title) %></h6>
|
11
|
+
</div>
|
12
|
+
<div class="timeline__content">
|
13
|
+
<%= translated_attribute(participatory_process_step.description).html_safe %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</li>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div class="row collapse order-by">
|
2
|
+
<h2 class="order-by__text section-heading">
|
3
|
+
<%= t("participatory_processes.order_by_processes.processes", scope: "layouts.decidim", count: collection.count) %>
|
4
|
+
<% if include_filter %>
|
5
|
+
<span class="order-by__tabs">
|
6
|
+
<% %w(past active upcoming).each do |filter_name| %>
|
7
|
+
<%= link_to t(".#{filter_name}"), { filter: filter_name }, remote: true, class: "order-by__tab #{'is-active' if filter == filter_name }" %>
|
8
|
+
<% end %>
|
9
|
+
</span>
|
10
|
+
<% end %>
|
11
|
+
</h2>
|
12
|
+
</div>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<div class="column">
|
2
|
+
<article class="card card--process">
|
3
|
+
<%= link_to participatory_process_path(participatory_process), class: "card__link" do %>
|
4
|
+
<div class="card__image-top"
|
5
|
+
style="background-image:url(<%= participatory_process.hero_image.url %>)"></div>
|
6
|
+
<% end %>
|
7
|
+
<div class="card__content">
|
8
|
+
<%= link_to participatory_process_path(participatory_process), class: "card__link" do %>
|
9
|
+
<h4 class="card__title"><%= translated_attribute participatory_process.title %></h4>
|
10
|
+
<% end %>
|
11
|
+
<p class="card__desc"><%== html_truncate(translated_attribute(participatory_process.short_description), length: 630, separator: '...') %></p>
|
12
|
+
</div>
|
13
|
+
<div class="card__footer">
|
14
|
+
<div class="card__support">
|
15
|
+
<% if participatory_process.active_step %>
|
16
|
+
<span class="card--process__small">
|
17
|
+
<%= t("participatory_processes.participatory_process.active_step", scope: "layouts.decidim") %>
|
18
|
+
<strong><%= translated_attribute participatory_process.active_step.title %></strong>
|
19
|
+
</span>
|
20
|
+
<% end %>
|
21
|
+
<span class="card--process__small"></span>
|
22
|
+
<%= link_to participatory_process_path(participatory_process), class: "card__button button small" do %>
|
23
|
+
<%= t("participatory_processes.participatory_process.take_part", scope: "layouts.decidim") %>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</article>
|
28
|
+
</div>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_copies/_form.html.erb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
<div class="card" id="processes">
|
2
|
+
<div class="card-divider">
|
3
|
+
<h2 class="card-title"><%= title %></h2>
|
4
|
+
</div>
|
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">
|
13
|
+
<%= form.text_field :slug %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="card">
|
17
|
+
<div class="card-divider">
|
18
|
+
<legend><%= select %></legend>
|
19
|
+
</div>
|
20
|
+
<div class="card-section">
|
21
|
+
<div class="row">
|
22
|
+
<div class="columns xlarge-3">
|
23
|
+
<%= form.check_box :copy_steps %>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="columns xlarge-3">
|
27
|
+
<%= form.check_box :copy_categories %>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div class="columns xlarge-6">
|
31
|
+
<%= form.check_box :copy_features %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_copies/new.html.erb
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= decidim_form_for(@form, url: participatory_process_copies_path(current_participatory_process), method: :post, html: { class: "form copy_participatory_process" }) do |f| %>
|
2
|
+
<%= render partial: 'form', object: f, locals: { title: t('participatory_process_copies.new.title', scope: "decidim.admin"), select: t('participatory_process_copies.new.select', scope: "decidim.admin")} %>
|
3
|
+
|
4
|
+
<div class="button--double form-general-submit">
|
5
|
+
<%= f.submit t("participatory_process_copies.new.copy", scope: "decidim.admin") %>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_groups/_form.html.erb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="row column">
|
2
|
+
<%= form.translated :text_field, :name, autofocus: true %>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<div class="row column">
|
6
|
+
<%= form.translated :editor, :description, toolbar: :full, lines: 25 %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="row column">
|
10
|
+
<% if processes_for_select %>
|
11
|
+
<%= form.select :participatory_process_ids, processes_for_select, {}, { multiple: true, class: "chosen-select" } %>
|
12
|
+
<% end %>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div class="row column">
|
16
|
+
<%= form.upload :hero_image %>
|
17
|
+
</div>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_groups/edit.html.erb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
<%= decidim_form_for(@form, html: { class: "form edit_participatory_process_group" }) do |f| %>
|
3
|
+
<div class="card">
|
4
|
+
<div class="card-divider">
|
5
|
+
<h2 class="card-title">
|
6
|
+
<%= t "participatory_process_groups.edit.title", scope: "decidim.admin" %>
|
7
|
+
<% if can? :destroy, participatory_process_group %>
|
8
|
+
<%= 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") } %>
|
9
|
+
<% end %>
|
10
|
+
</h2>
|
11
|
+
</div>
|
12
|
+
<div class="card-section">
|
13
|
+
<%= render partial: 'form', object: f %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="button--double form-general-submit">
|
17
|
+
<%= f.submit t("participatory_process_groups.edit.update", scope: "decidim.admin") %>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_groups/index.html.erb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
<div class="card">
|
2
|
+
<div class="card-divider">
|
3
|
+
<h2 class="card-title">
|
4
|
+
<%= t "decidim.admin.titles.participatory_process_groups" %>
|
5
|
+
<%= link_to t("actions.new", scope: "decidim.admin", name: t("models.participatory_process_group.name", scope: "decidim.admin")), ['new', 'participatory_process_group'], class: 'button tiny button--title new' if can? :create, Decidim::ParticipatoryProcessGroup %>
|
6
|
+
</h2>
|
7
|
+
</div>
|
8
|
+
<div class="card-section">
|
9
|
+
<div class="table-scroll">
|
10
|
+
<table class="table-list">
|
11
|
+
<thead>
|
12
|
+
<tr>
|
13
|
+
<th><%= t("models.participatory_process_group.fields.name", scope: "decidim.admin") %></th>
|
14
|
+
<th></th>
|
15
|
+
</tr>
|
16
|
+
</thead>
|
17
|
+
<tbody>
|
18
|
+
<% collection.each do |group| %>
|
19
|
+
<tr>
|
20
|
+
<td>
|
21
|
+
<% if can? :update, group %>
|
22
|
+
<%= link_to translated_attribute(group.name), ['edit', group] %><br />
|
23
|
+
<% else %>
|
24
|
+
<%= translated_attribute(group.name) %>
|
25
|
+
<% end %>
|
26
|
+
</td>
|
27
|
+
<td class="table-list__actions">
|
28
|
+
<% if can? :update, group %>
|
29
|
+
<%= icon_link_to "pencil", ['edit', group], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
|
30
|
+
<% end %>
|
31
|
+
|
32
|
+
<%= icon_link_to "eye", decidim_participatory_processes.participatory_process_group_path(group), t("actions.preview", scope: "decidim.admin"), class: "action-icon--preview" %>
|
33
|
+
|
34
|
+
<% if can? :destroy, group %>
|
35
|
+
<%= icon_link_to "circle-x", group, t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
|
36
|
+
<% end %>
|
37
|
+
</td>
|
38
|
+
</tr>
|
39
|
+
<% end %>
|
40
|
+
</tbody>
|
41
|
+
</table>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
</div>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_groups/new.html.erb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= decidim_form_for(@form, html: { class: "form new_participatory_process_group" }) do |f| %>
|
2
|
+
<div class="card">
|
3
|
+
<div class="card-divider">
|
4
|
+
<h2 class="card-title"><%= t "participatory_process_groups.new.title", scope: "decidim.admin" %></h2>
|
5
|
+
</div>
|
6
|
+
<div class="card-section">
|
7
|
+
<%= render partial: 'form', object: f %>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
<div class="button--double form-general-submit">
|
11
|
+
<%= f.submit t("participatory_process_groups.new.create", scope: "decidim.admin") %>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_groups/show.html.erb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
<dl>
|
2
|
+
<%= display_for participatory_process_group,
|
3
|
+
:name,
|
4
|
+
:description
|
5
|
+
%>
|
6
|
+
|
7
|
+
<dt><%= display_label(participatory_process_group, :participatory_processes) %></dt>
|
8
|
+
<% if participatory_process_group.participatory_processes.any? %>
|
9
|
+
<dd>
|
10
|
+
<ul>
|
11
|
+
<% participatory_process_group.participatory_processes.each do |participatory_process| %>
|
12
|
+
<li><%= translated_attribute participatory_process.title %></li>
|
13
|
+
<% end %>
|
14
|
+
</ul>
|
15
|
+
</dd>
|
16
|
+
<% end %>
|
17
|
+
<dt><%= display_label(participatory_process_group, :hero_image) %></dt>
|
18
|
+
<dd>
|
19
|
+
<% if participatory_process_group.hero_image? %>
|
20
|
+
<%= image_tag participatory_process_group.hero_image.url.to_s %>
|
21
|
+
<% end %>
|
22
|
+
</dd>
|
23
|
+
</dl>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_steps/_form.html.erb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
<div class="card">
|
2
|
+
<div class="card-divider">
|
3
|
+
<h2 class="card-title"><%= title %></h2>
|
4
|
+
</div>
|
5
|
+
|
6
|
+
<div class="card-section">
|
7
|
+
<div class="row column">
|
8
|
+
<%= form.translated :text_field, :title, autofocus: true %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="row column">
|
12
|
+
<%= form.translated :editor, :description, toolbar: :full, lines: 25 %>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div class="row">
|
16
|
+
<div class="columns xlarge-6">
|
17
|
+
<%= form.date_field :start_date %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="columns xlarge-6">
|
21
|
+
<%= form.date_field :end_date %>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_steps/edit.html.erb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
|
2
|
+
<%= decidim_form_for(@form, url: participatory_process_step_path(@participatory_process_step.participatory_process, @participatory_process_step), html: { class: "form edit_participatory_process_step" }) do |f| %>
|
3
|
+
<%= render partial: 'form', object: f, locals: { title: t('participatory_process_steps.edit.title', scope: "decidim.admin") } %>
|
4
|
+
|
5
|
+
<div class="button--double form-general-submit">
|
6
|
+
<%= f.submit t("participatory_process_steps.edit.update", scope: "decidim.admin") %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_steps/index.html.erb
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
<div class="card" id="steps">
|
2
|
+
<div class="card-divider">
|
3
|
+
<h2 class="card-title">
|
4
|
+
<%= t("participatory_process_steps.index.steps_title", scope: "decidim.admin") %>
|
5
|
+
<% if can? :create, Decidim::ParticipatoryProcessStep %>
|
6
|
+
<%= link_to t("actions.new", scope: "decidim.admin", name: t("models.participatory_process_step.name", scope: "decidim.admin")), new_participatory_process_step_path(current_participatory_process), class: 'button tiny button--title' %>
|
7
|
+
<% end %>
|
8
|
+
</h2>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="card-section">
|
12
|
+
<div class="table-scroll">
|
13
|
+
<% if current_participatory_process.steps.any? %>
|
14
|
+
<table class="table-list">
|
15
|
+
<thead>
|
16
|
+
<tr>
|
17
|
+
<th><%= t("models.participatory_process_step.fields.title", scope: "decidim.admin") %></th>
|
18
|
+
<th><%= t("models.participatory_process_step.fields.start_date", scope: "decidim.admin") %></th>
|
19
|
+
<th><%= t("models.participatory_process_step.fields.end_date", scope: "decidim.admin") %></th>
|
20
|
+
<th class="actions"></th>
|
21
|
+
</tr>
|
22
|
+
</thead>
|
23
|
+
<tbody class="sortable" data-sort-url="<%= ordering_participatory_process_steps_path(current_participatory_process) %>">
|
24
|
+
<% current_participatory_process.steps.each do |step| %>
|
25
|
+
<tr data-id="<%= step.id %>">
|
26
|
+
<td>
|
27
|
+
<span class="table-list__actions"><%= icon("move", class: "action-icon") %></span>
|
28
|
+
<% if step.active? %>
|
29
|
+
<span class="icon-active"></span>
|
30
|
+
<% end %>
|
31
|
+
<%= link_to translated_attribute(step.title), edit_participatory_process_step_path(current_participatory_process, step) %><br />
|
32
|
+
</td>
|
33
|
+
<td>
|
34
|
+
<% if step.start_date %>
|
35
|
+
<%= l step.start_date.to_date, format: :long %>
|
36
|
+
<% end%>
|
37
|
+
</td>
|
38
|
+
<td>
|
39
|
+
<% if step.end_date %>
|
40
|
+
<%= l step.end_date.to_date, format: :long %>
|
41
|
+
<% end%>
|
42
|
+
</td>
|
43
|
+
<td class="table-list__actions">
|
44
|
+
<% if can?(:activate, step) && !step.active? %>
|
45
|
+
<%= icon_link_to "circle-check", participatory_process_step_activate_path(current_participatory_process, step), t("actions.activate", scope: "decidim.admin"), class: "action-icon--activate", method: :post %>
|
46
|
+
<% end %>
|
47
|
+
|
48
|
+
<% if can? :update, step %>
|
49
|
+
<%= icon_link_to "pencil", edit_participatory_process_step_path(current_participatory_process, step), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
|
50
|
+
<% end %>
|
51
|
+
|
52
|
+
<% if can? :destroy, step %>
|
53
|
+
<%= icon_link_to "circle-x", participatory_process_step_path(current_participatory_process, step), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
|
54
|
+
<% end %>
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<% end %>
|
58
|
+
</tbody>
|
59
|
+
</table>
|
60
|
+
<% end %>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
</div>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= decidim_form_for(@form, html: { class: "form new_participatory_process_step" }) do |f| %>
|
2
|
+
<%= render partial: 'form', object: f, locals: { title: t('participatory_process_steps.new.title', scope: "decidim.admin") } %>
|
3
|
+
|
4
|
+
<div class="button--double form-general-submit">
|
5
|
+
<%= f.submit t("participatory_process_steps.new.create", scope: "decidim.admin") %>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_steps/show.html.erb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
<h3><%= translated_attribute(@participatory_process_step.title) %></h3>
|
2
|
+
|
3
|
+
<div class="actions">
|
4
|
+
<hr />
|
5
|
+
<%= link_to t("decidim.admin.actions.edit"), edit_participatory_process_step_path(participatory_process, @participatory_process_step) if can? :update, @participatory_process_step %>
|
6
|
+
<%= link_to t("decidim.admin.actions.destroy"), participatory_process_step_path(participatory_process, @participatory_process_step), method: :delete, class: "alert button", data: { confirm: t("decidim.admin.actions.confirm_destroy") } if can? :destroy, @participatory_process_step %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<dl>
|
10
|
+
<%= display_for @participatory_process_step,
|
11
|
+
:title,
|
12
|
+
:description
|
13
|
+
%>
|
14
|
+
<dt><%= display_label(@participatory_process_step, :start_date) %></dt>
|
15
|
+
<dd><%= l @participatory_process_step.start_date, format: :short if @participatory_process_step.start_date.present? %></dd>
|
16
|
+
<dt><%= display_label(@participatory_process_step, :end_date) %></dt>
|
17
|
+
<dd><%= l @participatory_process_step.end_date, format: :short if @participatory_process_step.end_date.present? %></dd>
|
18
|
+
</dl>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/_form.html.erb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
<div class="card">
|
2
|
+
<div class="card-divider">
|
3
|
+
<h2 class="card-title">
|
4
|
+
<%= title %>
|
5
|
+
</h2>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="card-section">
|
9
|
+
<div class="row">
|
10
|
+
<div class="columns xlarge-4">
|
11
|
+
<%= form.text_field :name, readonly: @form.persisted? %>
|
12
|
+
</div>
|
13
|
+
<div class="columns xlarge-4">
|
14
|
+
<%= form.email_field :email, readonly: @form.persisted? %>
|
15
|
+
</div>
|
16
|
+
<div class="columns xlarge-4">
|
17
|
+
<%= form.label :role %>
|
18
|
+
<%= select :participatory_process_user_role, :role, @form.roles, include_blank: false %>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
</div>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/edit.html.erb
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= decidim_form_for(@form, url: participatory_process_user_role_path(@user_role.participatory_process, @user_role), html: { class: "form edit_participatory_process_user_roles" }) do |f| %>
|
2
|
+
<%= render partial: 'form', object: f, locals: { title: t('participatory_process_user_roles.edit.title', scope: "decidim.admin") } %>
|
3
|
+
|
4
|
+
<div class="button--double form-general-submit">
|
5
|
+
<%= f.submit t("participatory_process_user_roles.edit.update", scope: "decidim.admin") %>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
data/app/views/decidim/participatory_processes/admin/participatory_process_user_roles/index.html.erb
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
<div class='card' id="process_admins">
|
2
|
+
<div class="card-divider">
|
3
|
+
<h2 class="card-title">
|
4
|
+
<%= t("participatory_process_user_roles.index.process_admins_title", scope: "decidim.admin") %>
|
5
|
+
<% if can? :create, Decidim::ParticipatoryProcessUserRole %>
|
6
|
+
<%= link_to t("actions.new", scope: "decidim.admin", name: t("models.participatory_process_user_role.name", scope: "decidim.admin")), new_participatory_process_user_role_path(current_participatory_process), class: 'button tiny button--title new' %>
|
7
|
+
<% end %>
|
8
|
+
</h2>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="card-section">
|
12
|
+
<div class="table-scroll">
|
13
|
+
<table class="stack">
|
14
|
+
<thead>
|
15
|
+
<tr>
|
16
|
+
<th><%= t("models.participatory_process_user_role.fields.name", scope: "decidim.admin") %></th>
|
17
|
+
<th><%= t("models.participatory_process_user_role.fields.email", scope: "decidim.admin") %></th>
|
18
|
+
<th><%= t("models.user.fields.invitation_sent_at", scope: "decidim.admin") %></th>
|
19
|
+
<th><%= t("models.user.fields.invitation_accepted_at", scope: "decidim.admin") %></th>
|
20
|
+
<th><%= t("models.participatory_process_user_role.fields.role", scope: "decidim.admin") %></th>
|
21
|
+
<th class="actions"></th>
|
22
|
+
</tr>
|
23
|
+
</thead>
|
24
|
+
<tbody>
|
25
|
+
<% @participatory_process_user_roles.each do |role| %>
|
26
|
+
<tr>
|
27
|
+
<td>
|
28
|
+
<%= role.user.name %><br />
|
29
|
+
</td>
|
30
|
+
<td>
|
31
|
+
<%= role.user.email %><br />
|
32
|
+
</td>
|
33
|
+
<td>
|
34
|
+
<% if role.user.invitation_sent_at %>
|
35
|
+
<%= l role.user.invitation_sent_at, format: :short %>
|
36
|
+
<% end %>
|
37
|
+
</td>
|
38
|
+
<td>
|
39
|
+
<% if role.user.invitation_accepted_at %>
|
40
|
+
<%= l role.user.invitation_accepted_at, format: :short %>
|
41
|
+
<% end %>
|
42
|
+
</td>
|
43
|
+
<td>
|
44
|
+
<%= t("#{role.role}", scope: "decidim.admin.models.participatory_process_user_role.roles") %><br />
|
45
|
+
</td>
|
46
|
+
<td class="table-list__actions">
|
47
|
+
<% if can?(:invite, role) && role.user.invited_to_sign_up? %>
|
48
|
+
<%= icon_link_to "reload", resend_invitation_participatory_process_user_role_path(current_participatory_process, role), t("actions.resend_invitation", scope: "decidim.admin"), class: "resend-invitation", method: :post %>
|
49
|
+
<% end %>
|
50
|
+
|
51
|
+
<% if can? :update, role %>
|
52
|
+
<%= icon_link_to "pencil", edit_participatory_process_user_role_path(current_participatory_process, role), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
|
53
|
+
<% end %>
|
54
|
+
|
55
|
+
<% if can? :destroy, role %>
|
56
|
+
<%= icon_link_to "circle-x", participatory_process_user_role_path(current_participatory_process, role), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
|
57
|
+
<% end %>
|
58
|
+
</td>
|
59
|
+
</tr>
|
60
|
+
<% end %>
|
61
|
+
</tbody>
|
62
|
+
</table>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
</div>
|