decidim-accountability 0.27.9 → 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/app/cells/decidim/accountability/content_blocks/highlighted_results_cell.rb +3 -8
- data/app/cells/decidim/accountability/highlighted_results/show.erb +3 -1
- data/app/cells/decidim/accountability/highlighted_results_for_component/show.erb +19 -19
- data/app/cells/decidim/accountability/highlighted_results_for_component_cell.rb +29 -6
- data/app/cells/decidim/accountability/project/show.erb +11 -0
- data/app/cells/decidim/accountability/project/timeline.erb +22 -0
- data/app/cells/decidim/accountability/project_cell.rb +75 -0
- data/app/cells/decidim/accountability/result_activity_cell.rb +1 -4
- data/app/cells/decidim/accountability/result_card_cell.rb +21 -0
- data/app/cells/decidim/accountability/result_cell.rb +2 -2
- data/app/cells/decidim/accountability/result_l/extra_data.erb +3 -0
- data/app/cells/decidim/accountability/result_l_cell.rb +30 -0
- data/app/cells/decidim/accountability/result_metadata/project_aside.erb +6 -0
- data/app/cells/decidim/accountability/result_metadata/show_footer.erb +11 -0
- data/app/cells/decidim/accountability/result_metadata/versions.erb +1 -0
- data/app/cells/decidim/accountability/result_metadata_cell.rb +136 -0
- data/app/cells/decidim/accountability/results/show.erb +7 -0
- data/app/cells/decidim/accountability/results_cell.rb +14 -0
- data/app/cells/decidim/accountability/status/show.erb +9 -0
- data/app/cells/decidim/accountability/status/status.erb +16 -0
- data/app/cells/decidim/accountability/status_cell.rb +91 -0
- data/app/commands/decidim/accountability/admin/import_projects_to_accountability.rb +37 -0
- data/app/controllers/concerns/decidim/accountability/admin/filterable.rb +2 -2
- data/app/controllers/decidim/accountability/admin/import_results_controller.rb +18 -6
- data/app/controllers/decidim/accountability/admin/projects_import_controller.rb +31 -0
- data/app/controllers/decidim/accountability/admin/results_controller.rb +4 -5
- data/app/controllers/decidim/accountability/admin/statuses_controller.rb +3 -3
- data/app/controllers/decidim/accountability/admin/timeline_entries_controller.rb +3 -3
- data/app/controllers/decidim/accountability/results_controller.rb +20 -2
- data/app/events/decidim/accountability/proposal_linked_event.rb +18 -1
- data/app/events/decidim/accountability/result_progress_updated_event.rb +18 -2
- data/app/forms/decidim/accountability/admin/import_results_form.rb +22 -0
- data/app/forms/decidim/accountability/admin/result_import_projects_form.rb +51 -0
- data/app/helpers/decidim/accountability/admin/application_helper.rb +1 -0
- data/app/helpers/decidim/accountability/application_helper.rb +43 -2
- data/app/helpers/decidim/accountability/breadcrumb_helper.rb +10 -0
- data/app/jobs/decidim/accountability/admin/import_projects_job.rb +72 -0
- data/app/mailers/decidim/accountability/import_projects_mailer.rb +25 -0
- data/app/models/decidim/accountability/result.rb +1 -1
- data/app/packs/entrypoints/decidim_accountability.js +4 -1
- data/app/packs/entrypoints/decidim_accountability_admin_imports.js +3 -0
- data/app/packs/images/decidim/accountability/breadcrumb_arrow.svg +3 -0
- data/app/packs/src/decidim/accountability/admin/imports.js +15 -0
- data/app/packs/stylesheets/accountability.scss +169 -0
- data/app/permissions/decidim/accountability/admin/permissions.rb +17 -6
- data/app/presenters/decidim/accountability/admin_log/result_presenter.rb +2 -2
- data/app/presenters/decidim/accountability/admin_log/status_presenter.rb +2 -2
- data/app/presenters/decidim/accountability/admin_log/timeline_entry_presenter.rb +2 -2
- data/app/queries/decidim/accountability/metrics/results_metric_manage.rb +1 -1
- data/app/services/decidim/accountability/results_calculator.rb +1 -1
- data/app/services/decidim/accountability/results_csv_importer.rb +2 -2
- data/app/views/decidim/accountability/admin/import_results/new.html.erb +27 -23
- data/app/views/decidim/accountability/admin/projects_import/new.html.erb +45 -0
- data/app/views/decidim/accountability/admin/results/_form.html.erb +46 -46
- data/app/views/decidim/accountability/admin/results/edit.html.erb +18 -7
- data/app/views/decidim/accountability/admin/results/index.html.erb +102 -91
- data/app/views/decidim/accountability/admin/results/new.html.erb +18 -8
- data/app/views/decidim/accountability/admin/shared/_subnav.html.erb +1 -1
- data/app/views/decidim/accountability/admin/statuses/_form.html.erb +15 -17
- data/app/views/decidim/accountability/admin/statuses/edit.html.erb +16 -6
- data/app/views/decidim/accountability/admin/statuses/index.html.erb +33 -36
- data/app/views/decidim/accountability/admin/statuses/new.html.erb +16 -6
- data/app/views/decidim/accountability/admin/timeline_entries/_form.html.erb +12 -14
- data/app/views/decidim/accountability/admin/timeline_entries/edit.html.erb +17 -6
- data/app/views/decidim/accountability/admin/timeline_entries/index.html.erb +35 -34
- data/app/views/decidim/accountability/admin/timeline_entries/new.html.erb +17 -6
- data/app/views/decidim/accountability/import_projects_mailer/import.html.erb +2 -0
- data/app/views/decidim/accountability/results/_home_categories.html.erb +28 -73
- data/app/views/decidim/accountability/results/_linked_results.html.erb +3 -12
- data/app/views/decidim/accountability/results/_project.html.erb +29 -0
- data/app/views/decidim/accountability/results/_projects_aside.html.erb +40 -0
- data/app/views/decidim/accountability/results/_scope_filters.html.erb +27 -27
- data/app/views/decidim/accountability/results/_search.html.erb +15 -9
- data/app/views/decidim/accountability/results/_stats_box.html.erb +3 -3
- data/app/views/decidim/accountability/results/home.html.erb +34 -8
- data/app/views/decidim/accountability/results/index.html.erb +15 -15
- data/app/views/decidim/accountability/results/index.js.erb +3 -0
- data/app/views/decidim/accountability/results/show.html.erb +9 -10
- data/app/views/decidim/accountability/versions/show.html.erb +13 -10
- data/app/views/decidim/participatory_spaces/_result.html.erb +4 -4
- data/config/assets.rb +2 -2
- data/config/locales/ar.yml +23 -61
- data/config/locales/bg.yml +0 -96
- data/config/locales/ca.yml +54 -31
- data/config/locales/cs.yml +58 -29
- data/config/locales/da.yml +1 -36
- data/config/locales/de.yml +59 -36
- data/config/locales/el.yml +62 -29
- data/config/locales/en.yml +55 -31
- data/config/locales/es-MX.yml +52 -29
- data/config/locales/es-PY.yml +52 -29
- data/config/locales/es.yml +55 -32
- data/config/locales/eu.yml +53 -30
- data/config/locales/fi-plain.yml +51 -28
- data/config/locales/fi.yml +54 -31
- data/config/locales/fr-CA.yml +51 -28
- data/config/locales/fr.yml +52 -29
- data/config/locales/ga-IE.yml +0 -4
- data/config/locales/gl.yml +0 -41
- data/config/locales/hu.yml +41 -29
- data/config/locales/id-ID.yml +1 -30
- data/config/locales/is-IS.yml +0 -32
- data/config/locales/it.yml +0 -43
- data/config/locales/ja.yml +55 -39
- data/config/locales/kaa.yml +20 -1
- data/config/locales/ko.yml +0 -188
- data/config/locales/lb.yml +1 -42
- data/config/locales/lt.yml +60 -41
- data/config/locales/lv.yml +1 -36
- data/config/locales/nl.yml +0 -41
- data/config/locales/no.yml +8 -49
- data/config/locales/pl.yml +17 -61
- data/config/locales/pt-BR.yml +41 -29
- data/config/locales/pt.yml +0 -42
- data/config/locales/ro-RO.yml +39 -66
- data/config/locales/ru.yml +1 -30
- data/config/locales/si-LK.yml +0 -4
- data/config/locales/sk.yml +1 -40
- data/config/locales/sl.yml +0 -11
- data/config/locales/sq-AL.yml +82 -7
- data/config/locales/sr-CS.yml +1 -30
- data/config/locales/sv.yml +36 -51
- data/config/locales/th-TH.yml +0 -140
- data/config/locales/tr-TR.yml +9 -75
- data/config/locales/uk.yml +1 -28
- data/config/locales/zh-CN.yml +1 -36
- data/config/locales/zh-TW.yml +52 -43
- data/lib/decidim/accountability/admin_engine.rb +3 -2
- data/lib/decidim/accountability/component.rb +4 -99
- data/lib/decidim/accountability/engine.rb +9 -1
- data/lib/decidim/accountability/result_serializer.rb +1 -1
- data/lib/decidim/accountability/seeds.rb +115 -0
- data/lib/decidim/accountability/test/factories.rb +18 -29
- data/lib/decidim/accountability/version.rb +1 -1
- data/lib/decidim/api/result_type.rb +1 -0
- metadata +62 -51
- data/app/cells/decidim/accountability/content_blocks/highlighted_results/elements.erb +0 -5
- data/app/cells/decidim/accountability/content_blocks/highlighted_results/heading.erb +0 -1
- data/app/cells/decidim/accountability/result_m/data.erb +0 -23
- data/app/cells/decidim/accountability/result_m/footer.erb +0 -22
- data/app/cells/decidim/accountability/result_m/tags.erb +0 -1
- data/app/cells/decidim/accountability/result_m_cell.rb +0 -37
- data/app/events/decidim/accountability/base_result_event.rb +0 -29
- data/app/packs/stylesheets/decidim/accountability/_accountability.scss +0 -4
- data/app/packs/stylesheets/decidim/accountability/accountability/_cards.scss +0 -11
- data/app/packs/stylesheets/decidim/accountability/accountability/_categories.scss +0 -121
- data/app/packs/stylesheets/decidim/accountability/accountability/_lines_breadcrumb.scss +0 -37
- data/app/packs/stylesheets/decidim/accountability/accountability/_results.scss +0 -148
- data/app/views/decidim/accountability/admin/results/proposals_picker.html.erb +0 -1
- data/app/views/decidim/accountability/result_widgets/show.html.erb +0 -2
- data/app/views/decidim/accountability/results/_home_header.html.erb +0 -23
- data/app/views/decidim/accountability/results/_results_leaf.html.erb +0 -47
- data/app/views/decidim/accountability/results/_results_parent.html.erb +0 -32
- data/app/views/decidim/accountability/results/_show_leaf.html.erb +0 -81
- data/app/views/decidim/accountability/results/_show_parent.html.erb +0 -30
- data/app/views/decidim/accountability/results/_stats.html.erb +0 -15
- data/app/views/decidim/accountability/results/_timeline.html.erb +0 -30
- data/app/views/decidim/accountability/versions/index.html.erb +0 -12
- data/config/locales/he-IL.yml +0 -219
- data/decidim-accountability.gemspec +0 -38
@@ -1,79 +1,34 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
</div>
|
15
|
-
|
16
|
-
</div>
|
1
|
+
<div class="accountability__grid">
|
2
|
+
<% first_class_categories.each do |category| %>
|
3
|
+
<% subelements = cell(
|
4
|
+
"decidim/accountability/status",
|
5
|
+
category,
|
6
|
+
extra_classes: "accountability__status__background",
|
7
|
+
url: results_path(filter: { with_category: category, with_scope: current_scope }),
|
8
|
+
render_blank: true
|
9
|
+
) %>
|
10
|
+
|
11
|
+
<div>
|
12
|
+
<span class="accountability__grid-title"><%= categories_label %></span>
|
13
|
+
<%= subelements.call %>
|
17
14
|
</div>
|
18
|
-
</div>
|
19
|
-
|
20
|
-
<div class="categories--list">
|
21
|
-
<div class="row">
|
22
|
-
<div class="small-12 columns">
|
23
|
-
<% first_class_categories.each do |category| %>
|
24
|
-
<% next if (category_results_count = count_calculator(current_scope, category.id)) == 0 %>
|
25
|
-
<div class="categories--group row">
|
26
|
-
<div class="category--section small-12 medium-4 columns">
|
27
|
-
<div class="category--title">
|
28
|
-
<p class="heading3">
|
29
|
-
<%= link_to translated_attribute(category.name),results_path(filter: { with_category: category, with_scope: current_scope }) %></p>
|
30
|
-
|
31
|
-
<% if component_settings.display_progress_enabled? && progress_calculator(current_scope, category.id).present? %>
|
32
|
-
<div class="progress">
|
33
|
-
<div class="progress-meter" style="width:<%= progress_calculator(current_scope, category.id) %>%"></div>
|
34
|
-
</div>
|
35
|
-
<% end %>
|
36
15
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
<div class="category--elements show-for-medium medium-8 columns">
|
51
|
-
<div class="row">
|
52
|
-
<% category.subcategories.each do |subcategory| %>
|
53
|
-
<% if (subcategory_results_count = count_calculator(current_scope, subcategory.id)) > 0 %>
|
54
|
-
<%= link_to results_path(filter: { with_category: subcategory, with_scope: current_scope }), class: "medium-4 columns end card__link card__link--block" do %>
|
55
|
-
<div class="category--line">
|
56
|
-
<strong><%= translated_attribute(subcategory.name) %></strong>
|
57
|
-
|
58
|
-
<% if component_settings.display_progress_enabled? && progress_calculator(current_scope, subcategory.id).present? %>
|
59
|
-
<div class="progress-figure heading3">
|
60
|
-
<%= display_percentage progress_calculator(current_scope, subcategory.id) %>
|
61
|
-
</div>
|
62
|
-
<% end %>
|
63
|
-
|
64
|
-
<div class="category--count">
|
65
|
-
<%= display_count subcategory_results_count %>
|
66
|
-
</div>
|
67
|
-
</div>
|
68
|
-
<% end %>
|
69
|
-
<% end %>
|
70
|
-
<% end %>
|
71
|
-
|
72
|
-
</div>
|
73
|
-
</div>
|
16
|
+
<div>
|
17
|
+
<span class="accountability__grid-title"><%= subcategories_label %></span>
|
18
|
+
<% if subelements.has_results? %>
|
19
|
+
<div class="accountability__subgrid">
|
20
|
+
<% category.subcategories.each do |subcategory| %>
|
21
|
+
<%= cell(
|
22
|
+
"decidim/accountability/status",
|
23
|
+
subcategory,
|
24
|
+
extra_classes: "accountability__status__border",
|
25
|
+
url: results_path(filter: { with_category: subcategory, with_scope: current_scope })
|
26
|
+
) %>
|
27
|
+
<% end %>
|
74
28
|
</div>
|
29
|
+
<% else %>
|
30
|
+
<%= cell("decidim/announcement", t("no_results", scope: "decidim.accountability.results")) %>
|
75
31
|
<% end %>
|
76
32
|
</div>
|
77
|
-
|
78
|
-
</div>
|
33
|
+
<% end %>
|
79
34
|
</div>
|
@@ -1,12 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%= icon "actions", class: "card--list__icon", role: "img", "aria-hidden": true, remove_icon_class: true %>
|
5
|
-
<%= link_to resource_locator(result).path, class: "card--list__text card__link card__link--block" do %>
|
6
|
-
<h5 class="card--list__heading">
|
7
|
-
<%= translated_attribute(result.title) %>
|
8
|
-
</h5>
|
9
|
-
<% end %>
|
10
|
-
</div>
|
11
|
-
<% end %>
|
12
|
-
</div>
|
1
|
+
<% resources.each do |result| %>
|
2
|
+
<%= cell "decidim/accountability/result_l", result, url_extra_params: { included_in: resource.to_gid } %>
|
3
|
+
<% end %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<%= render layout: "layouts/decidim/shared/layout_item", locals: nav_paths do %>
|
2
|
+
<%= cell("decidim/accountability/project", result) %>
|
3
|
+
|
4
|
+
<section class="layout-main__section layout-main__buttons" data-buttons>
|
5
|
+
<%= cell "decidim/comments_button", nil %>
|
6
|
+
<div class="ml-auto">
|
7
|
+
<%= cell "decidim/tags", result %>
|
8
|
+
</div>
|
9
|
+
</section>
|
10
|
+
|
11
|
+
<% content_for :aside do %>
|
12
|
+
<section class="layout-aside__section layout-aside__buttons accountability__project-aside">
|
13
|
+
<% if component_settings.display_progress_enabled? %>
|
14
|
+
<%= cell(
|
15
|
+
"decidim/accountability/status",
|
16
|
+
result,
|
17
|
+
title: t("models.result.fields.progress", scope: "decidim.accountability"),
|
18
|
+
extra_classes: "accountability__status__project"
|
19
|
+
) %>
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
<%= cell("decidim/accountability/result_metadata", result, template: :project_aside) %>
|
23
|
+
</section>
|
24
|
+
<% end %>
|
25
|
+
<% content_for :item_footer do %>
|
26
|
+
<%= comments_for result %>
|
27
|
+
<%= cell "decidim/accountability/result_metadata", result, template: :show_footer %>
|
28
|
+
<% end %>
|
29
|
+
<% end %>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<% if local_assigns[:main_action] %>
|
2
|
+
<h1 class="title-decorator"><%= component_name %></h1>
|
3
|
+
<% else %>
|
4
|
+
<h2 class="title-decorator"><%= component_name %></h2>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<div class="accountability__status-container">
|
8
|
+
<%= cell(
|
9
|
+
"decidim/accountability/status",
|
10
|
+
nil,
|
11
|
+
url: root_path,
|
12
|
+
title: t("decidim.accountability.results.home_header.global_status"),
|
13
|
+
extra_classes: "accountability__status__parent",
|
14
|
+
render_blank: true
|
15
|
+
) %>
|
16
|
+
<% categories_hierarchy.each do |category| %>
|
17
|
+
<%= cell(
|
18
|
+
"decidim/accountability/status",
|
19
|
+
category,
|
20
|
+
url: results_path(filter: { with_category: category, with_scope: current_scope }),
|
21
|
+
extra_classes: "accountability__status__parent",
|
22
|
+
render_count: false,
|
23
|
+
render_blank: true
|
24
|
+
) %>
|
25
|
+
<% end %>
|
26
|
+
<% if category.present? %>
|
27
|
+
<div>
|
28
|
+
<%= external_icon "media/images/breadcrumb_arrow.svg" %>
|
29
|
+
<%= cell(
|
30
|
+
"decidim/accountability/status",
|
31
|
+
category,
|
32
|
+
extra_classes: "accountability__status__child",
|
33
|
+
url: results_path(filter: { with_category: category, with_scope: current_scope }),
|
34
|
+
render_blank: true
|
35
|
+
) %>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<%= render partial: "scope_filters" if current_component.has_subscopes? %>
|
@@ -1,31 +1,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<ul class="tags tags--action">
|
6
|
-
<li <%= active_class_if_current(nil) %>>
|
7
|
-
<%= link_to url_for(filter: { with_category: category.try(:id) }) do %>
|
8
|
-
<span class="show-for-sr"><%= Decidim::Scope.model_name.human(count: 2) %></span>
|
9
|
-
<%= t("results.filters.all", scope: "decidim.accountability") %>
|
10
|
-
<% end %>
|
11
|
-
</li>
|
1
|
+
<% items = filter_items_for(participatory_space: current_participatory_space, category:) %>
|
2
|
+
<div class="accountability__filters">
|
3
|
+
<%= render partial: "search" %>
|
12
4
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<% current_participatory_space.subscopes.each do |scope| %>
|
22
|
-
<li <%= active_class_if_current(scope.id) %>>
|
23
|
-
<%= link_to url_for(filter: { with_scope: scope.id, with_category: category.try(:id) }) do %>
|
24
|
-
<span class="show-for-sr"><%= Decidim::Scope.model_name.human(count: 1) %></span>
|
25
|
-
<%= translated_attribute(scope.name) %>
|
5
|
+
<% if current_component.has_subscopes? %>
|
6
|
+
<div class="filter-container">
|
7
|
+
<button id="dropdown-trigger-accountability" data-component="dropdown" data-target="dropdown-menu-accountability" data-auto-close="true" data-disabled-md="true">
|
8
|
+
<% items.each do |item| %>
|
9
|
+
<%= content_tag :span, class: "#{"is-active" if item[:active]}" do %>
|
10
|
+
<span class="sr-only"><%= item[:sr_text] %></span>
|
11
|
+
<%= icon item[:icon] %>
|
12
|
+
<span><%= item[:text] %></span>
|
26
13
|
<% end %>
|
27
|
-
|
28
|
-
|
29
|
-
|
14
|
+
<% end %>
|
15
|
+
<%= icon "arrow-down-s-line", class: "w-8 h-8 flex-none text-secondary fill-current" %>
|
16
|
+
<%= icon "arrow-up-s-line", class: "w-8 h-8 flex-none text-secondary fill-current" %>
|
17
|
+
</button>
|
18
|
+
<ul id="dropdown-menu-accountability" data-scope-filters>
|
19
|
+
<% items.each do |item| %>
|
20
|
+
<li>
|
21
|
+
<%= link_to item[:url], class: "filter#{" is-active" if item[:active]}" do %>
|
22
|
+
<span class="sr-only"><%= item[:sr_text] %></span>
|
23
|
+
<%= icon item[:icon] %>
|
24
|
+
<span><%= item[:text] %></span>
|
25
|
+
<% end %>
|
26
|
+
</li>
|
27
|
+
<% end %>
|
28
|
+
</ul>
|
29
|
+
</div>
|
30
30
|
<% end %>
|
31
31
|
</div>
|
@@ -1,12 +1,18 @@
|
|
1
1
|
<%= form_tag results_path, method: :get do %>
|
2
|
-
<div class="
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
<div class="filter-search">
|
3
|
+
<label>
|
4
|
+
<span class="sr-only"><%= t("search", scope: "decidim.accountability.results.search") %></span>
|
5
|
+
<%= search_field_tag(
|
6
|
+
"filter[search_text_cont]",
|
7
|
+
nil,
|
8
|
+
class: "input-group-field",
|
9
|
+
placeholder: t("search", scope: "decidim.accountability.results.search"),
|
10
|
+
value: "",
|
11
|
+
title: t("search", scope: "decidim.accountability.results.search")
|
12
|
+
) %>
|
13
|
+
<button type="submit" aria-label="<%= t("search", scope: "decidim.accountability.results.search") %>">
|
14
|
+
<%= icon "search-line" %>
|
15
|
+
</button>
|
16
|
+
</label>
|
11
17
|
</div>
|
12
18
|
<% end %>
|
@@ -21,14 +21,14 @@
|
|
21
21
|
<% if result.versions.any? %>
|
22
22
|
<div class="definition-data__item versions_count">
|
23
23
|
<div>
|
24
|
-
<%= resource_version_number(result.versions_count
|
25
|
-
<small
|
24
|
+
<%= resource_version_number(result.versions_count) %>
|
25
|
+
<small>
|
26
26
|
<%= resource_version_of(result.versions_count) %>
|
27
27
|
</small>
|
28
28
|
</div>
|
29
29
|
|
30
30
|
<div>
|
31
|
-
<span
|
31
|
+
<span>
|
32
32
|
<%= link_to_other_resource_versions(result_versions_path(result)) %>
|
33
33
|
</span>
|
34
34
|
</div>
|
@@ -1,11 +1,37 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<% add_decidim_page_title component_name %>
|
2
|
+
<%= append_javascript_pack_tag "decidim_accountability" %>
|
3
|
+
<%= append_stylesheet_pack_tag "decidim_accountability" %>
|
4
|
+
|
5
|
+
<% content_for :aside do %>
|
6
|
+
<h1 class="title-decorator"><%= component_name %></h1>
|
7
|
+
|
8
|
+
<% if component_settings.display_progress_enabled? %>
|
9
|
+
<%= cell(
|
10
|
+
"decidim/accountability/status",
|
11
|
+
nil,
|
12
|
+
title: t("decidim.accountability.results.home_header.global_status"),
|
13
|
+
progress: progress_calculator(current_scope, nil).presence,
|
14
|
+
extra_classes: "accountability__status__home"
|
15
|
+
) %>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<%= render partial: "scope_filters" %>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<%= render layout: "layouts/decidim/shared/layout_two_col" do %>
|
22
|
+
|
23
|
+
<section class="layout-main__section">
|
24
|
+
<div class="editor-content"><%== translated_attribute component_settings.intro %></div>
|
25
|
+
</section>
|
26
|
+
|
27
|
+
<section class="layout-main__section">
|
28
|
+
<% if first_class_categories.empty? %>
|
29
|
+
<%= cell("decidim/announcement",
|
30
|
+
params[:filter].present? ?
|
31
|
+
t("empty_filters", scope: "decidim.accountability.results.home") :
|
32
|
+
t("empty", scope: "decidim.accountability.results.home")) %>
|
33
|
+
<% end %>
|
5
34
|
<%= render partial: "home_categories" %>
|
6
|
-
</
|
7
|
-
</div>
|
35
|
+
</section>
|
8
36
|
|
9
|
-
<% content_for :js_content do %>
|
10
|
-
<%= javascript_pack_tag "decidim_accountability" %>
|
11
37
|
<% end %>
|
@@ -1,17 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<%= render partial: "scope_filters", locals: { url_method: :results_path } %>
|
4
|
-
</div>
|
1
|
+
<%= append_javascript_pack_tag "decidim_accountability" %>
|
2
|
+
<%= append_stylesheet_pack_tag "decidim_accountability" %>
|
5
3
|
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
<% content_for :aside do %>
|
5
|
+
<%= render partial: "projects_aside", locals: { main_action: true } %>
|
6
|
+
<% end %>
|
9
7
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
8
|
+
<%= render layout: "layouts/decidim/shared/layout_two_col" do %>
|
9
|
+
<section class="layout-main__section">
|
10
|
+
<h2 class="h4"><%= category.present? ? translated_attribute(category.name) : t("decidim.accountability.results.home_header.global_status") %></h2>
|
11
|
+
</section>
|
12
|
+
|
13
|
+
<section id="results" class="layout-main__section">
|
14
|
+
<%= cell "decidim/accountability/results", results %>
|
15
|
+
<%= decidim_paginate results, order_start_time: params[:order_start_time], with_scope: params.dig(:filter, :with_scope) %>
|
16
|
+
</section>
|
17
|
+
<% end %>
|
@@ -1,20 +1,19 @@
|
|
1
1
|
<% add_decidim_meta_tags({
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
}) %>
|
2
|
+
description: translated_attribute(result.description),
|
3
|
+
title: translated_attribute(result.title),
|
4
|
+
url: result_url(result.id)
|
5
|
+
}) %>
|
6
6
|
|
7
7
|
<%
|
8
8
|
edit_link(
|
9
9
|
resource_locator(result).edit,
|
10
10
|
:update,
|
11
11
|
:result,
|
12
|
-
result:
|
12
|
+
result:
|
13
13
|
)
|
14
14
|
%>
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
<% end %>
|
16
|
+
<%= append_javascript_pack_tag "decidim_accountability" %>
|
17
|
+
<%= append_stylesheet_pack_tag "decidim_accountability" %>
|
18
|
+
|
19
|
+
<%= render partial: "project", locals: { result: } %>
|
@@ -1,17 +1,20 @@
|
|
1
|
-
<% content_for :
|
2
|
-
<%=
|
1
|
+
<% content_for :aside do %>
|
2
|
+
<%= cell(
|
3
|
+
"decidim/versions_list",
|
4
|
+
versioned_resource,
|
5
|
+
version_path: proc { |version_index| url_for(action: :show, id: version_index) },
|
6
|
+
i18n_scope: "decidim.meetings.versions"
|
7
|
+
) %>
|
3
8
|
<% end %>
|
4
|
-
<div class="row accountability">
|
5
|
-
<div class="small-12 columns">
|
6
|
-
<%= render partial: "decidim/accountability/results/nav_breadcrumb", locals: { category: versioned_resource.parent.try(:category) || versioned_resource.try(:category) } %>
|
7
|
-
</div>
|
8
9
|
|
10
|
+
<%= render layout: "layouts/decidim/shared/layout_item" do %>
|
9
11
|
<%= cell(
|
10
12
|
"decidim/version",
|
11
13
|
current_version,
|
12
|
-
index: params[:id]
|
13
|
-
versioned_resource
|
14
|
+
index: params[:id],
|
15
|
+
versioned_resource:,
|
16
|
+
path: proc { |extra_params| url_for(action: :show, id: params[:id], **extra_params) },
|
14
17
|
versions_path: proc { url_for(action: :index) },
|
15
|
-
i18n_scope: "decidim.
|
18
|
+
i18n_scope: "decidim.meetings.versions"
|
16
19
|
) %>
|
17
|
-
|
20
|
+
<% end %>
|
@@ -2,11 +2,11 @@
|
|
2
2
|
<%= icon "actions", class: "card--list__icon", role: "img", "aria-hidden": true, remove_icon_class: true %>
|
3
3
|
|
4
4
|
<%= link_to resource_locator(result).path, class: "card--list__text card__link card__link--block" do %>
|
5
|
-
<h4 class="card--list__heading
|
6
|
-
<%=
|
5
|
+
<h4 class="card--list__heading">
|
6
|
+
<%= translated_attribute(result.title) %>
|
7
7
|
</h4>
|
8
8
|
|
9
|
-
<div class="
|
9
|
+
<div class="card--meta">
|
10
10
|
<% if result.start_date %>
|
11
11
|
<strong><%= t("models.result.fields.start_date", scope: "decidim.accountability") %></strong>
|
12
12
|
<span><%= l result.start_date, format: :short %></span>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
<% if result.status %>
|
21
21
|
<strong><%= t("models.result.fields.status", scope: "decidim.accountability") %></strong>
|
22
|
-
<span><%=
|
22
|
+
<span><%= translated_attribute(result.status.name) %></span>
|
23
23
|
<% end %>
|
24
24
|
</div>
|
25
25
|
<% end %>
|
data/config/assets.rb
CHANGED
@@ -5,6 +5,6 @@ base_path = File.expand_path("..", __dir__)
|
|
5
5
|
Decidim::Webpacker.register_path("#{base_path}/app/packs")
|
6
6
|
Decidim::Webpacker.register_entrypoints(
|
7
7
|
decidim_accountability: "#{base_path}/app/packs/entrypoints/decidim_accountability.js",
|
8
|
-
decidim_accountability_admin: "#{base_path}/app/packs/entrypoints/decidim_accountability_admin.js"
|
8
|
+
decidim_accountability_admin: "#{base_path}/app/packs/entrypoints/decidim_accountability_admin.js",
|
9
|
+
decidim_accountability_admin_imports: "#{base_path}/app/packs/entrypoints/decidim_accountability_admin_imports.js"
|
9
10
|
)
|
10
|
-
Decidim::Webpacker.register_stylesheet_import("stylesheets/decidim/accountability/accountability")
|