decidim-accountability 0.27.5 → 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/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 +12 -9
- data/app/views/decidim/participatory_spaces/_result.html.erb +2 -2
- data/config/assets.rb +2 -2
- data/config/locales/ar.yml +22 -60
- data/config/locales/bg.yml +0 -36
- data/config/locales/ca.yml +53 -30
- data/config/locales/cs.yml +58 -29
- data/config/locales/da.yml +0 -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 +53 -30
- data/config/locales/eu.yml +53 -30
- data/config/locales/fi-plain.yml +51 -28
- data/config/locales/fi.yml +52 -29
- 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 +0 -30
- data/config/locales/is-IS.yml +0 -32
- data/config/locales/it.yml +0 -41
- data/config/locales/ja.yml +55 -39
- data/config/locales/kaa.yml +20 -1
- data/config/locales/ko.yml +0 -15
- data/config/locales/lb.yml +0 -41
- data/config/locales/lt.yml +60 -41
- data/config/locales/lv.yml +0 -36
- data/config/locales/nl.yml +0 -41
- data/config/locales/no.yml +8 -49
- data/config/locales/pl.yml +17 -40
- data/config/locales/pt-BR.yml +41 -29
- data/config/locales/pt.yml +0 -41
- data/config/locales/ro-RO.yml +14 -39
- data/config/locales/ru.yml +0 -30
- data/config/locales/si-LK.yml +0 -3
- data/config/locales/sk.yml +0 -40
- data/config/locales/sl.yml +0 -11
- data/config/locales/sq-AL.yml +82 -7
- data/config/locales/sr-CS.yml +0 -30
- data/config/locales/sv.yml +23 -38
- data/config/locales/tr-TR.yml +9 -62
- data/config/locales/uk.yml +0 -28
- data/config/locales/zh-CN.yml +0 -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 +3 -2
- data/lib/decidim/accountability/version.rb +1 -1
- metadata +61 -48
- 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/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/environment.rb +0 -3
@@ -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
14
|
index: params[:id],
|
13
|
-
versioned_resource
|
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
|
5
|
+
<h4 class="card--list__heading">
|
6
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>
|
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")
|
data/config/locales/ar.yml
CHANGED
@@ -8,6 +8,7 @@ ar:
|
|
8
8
|
decidim_scope_id: نطاق
|
9
9
|
description: وصف
|
10
10
|
end_date: تاريخ الانتهاء
|
11
|
+
meetings_ids: الاجتماعات ذات الصلة
|
11
12
|
progress: تقدم
|
12
13
|
project_ids: المشاريع المدرجة
|
13
14
|
proposals: المقترحات المدرجة
|
@@ -43,8 +44,6 @@ ar:
|
|
43
44
|
confirm_destroy: هل أنت متأكد أنك تريد حذف هذا %{name}؟
|
44
45
|
destroy: حذف
|
45
46
|
edit: تعديل
|
46
|
-
import_csv: استيراد CSV
|
47
|
-
new: '%{name} جديد'
|
48
47
|
preview: معاينة
|
49
48
|
timeline_entries: تطور المشروع
|
50
49
|
title: الإجراءات
|
@@ -56,43 +55,28 @@ ar:
|
|
56
55
|
new:
|
57
56
|
download_export: تحميل التصدير بصيغه CSV
|
58
57
|
import: استيراد
|
59
|
-
info: |
|
60
|
-
<p>نحن ننصح باتباع هذه الخطوات:</p>
|
61
|
-
<ol>
|
62
|
-
<li>قم بإنشاء حالات النتائج التي تريد إضافتها (<a href="%{link_new_status}" target="_blank">الرابط</a>)</li>
|
63
|
-
<li>قم بإنشاء نتيجة واحدة على الأقل يدويًا من خلال لوحة المدير هذه (<a href="%{link_new_result}" target="_blank">link</a>) قبل أستخدام الاستيراد, للحصول على فهم أفضل للتنسيق وما ستحتاج لملئه.</li>
|
64
|
-
<li>قم بتنزيل التصدير بتنسيق CSV(%{link_export_csv})</li>
|
65
|
-
<li>قم بإجراء التغييرات محليًا على جهازك. يمكنك فقط تغيير الأعمدة التالية من ملف CSV:</li>
|
66
|
-
</ol>
|
67
|
-
<ul>
|
68
|
-
<li><b>category/id:</b>رقم مٌعرف للفئه</li>
|
69
|
-
<li><b>scope/id:</b>رقم مٌعرف للمجال</li>
|
70
|
-
<li><b>parent/id:</b> رقم مٌعرف بالأب (للنتائج ذات الصلة). اختياري</li>
|
71
|
-
<li><b>title/I18N:</b> عنوان اللغه</li>
|
72
|
-
<li><b>description/I18N:</b> وصف اللغه</li>
|
73
|
-
<li><b>start_date:</b>التاريخ الذي يبدأ فيه تنفيذ النتيجة (التنسيق YYYY-MM-DD)</li>
|
74
|
-
<li><b>end_date:</b> التاريخ الذي ينتهى فيه تنفيذ النتيجة (التنسيق YYYY-MM-DD</li>
|
75
|
-
<li><b>status/id:</b> رقم مٌعرف لحالة النتيجة</li>
|
76
|
-
<li><b>progress:</b> النسبة المئوية (من 0 الى 100) للتنفيذ</li>
|
77
|
-
<li><b>proposals_ids:</b> رقم مُعرف داخلى للمقترحات ذات الصلة (مفصولاً بفاصلة). يتم تحويله تلقائيًا إلى <span class="attribute-name">رابط للمقترح</span></li>
|
78
|
-
</ul>
|
79
|
-
title: استيراد النتائج من ملف CSV
|
80
|
-
imports:
|
81
|
-
create:
|
82
|
-
success: لقد بدأ استيراد الملف. سوف تتلقى رسالة بريد إلكتروني في غصون الدقائق القادمة مع نتيجة الاستيراد
|
83
58
|
models:
|
84
59
|
result:
|
85
60
|
name: نتيجة
|
86
61
|
status:
|
87
62
|
name: الحالة
|
88
|
-
|
89
|
-
name: دخول الجدول الزمني
|
90
|
-
results:
|
63
|
+
projects_import:
|
91
64
|
create:
|
92
|
-
invalid:
|
93
|
-
|
94
|
-
|
95
|
-
|
65
|
+
invalid: كان هناك مشكله فى استيراد المشاريع إلى النتائج, يرجى اتباع التعليمات بعناية و التأكد من اختيار مشاريع للتنفيذ.
|
66
|
+
new:
|
67
|
+
create: استيراد
|
68
|
+
import_all_selected_projects: استيراد جميع المشاريع المحددة للتنفيذ
|
69
|
+
new_items:
|
70
|
+
zero: "%{count} مشروع محدد سوف يتم إستيراده"
|
71
|
+
one: مشروع واحد محدد سوف يتم إستيراده
|
72
|
+
two: "مشروع واحد محدد سوف يتم إستيراده"
|
73
|
+
few: "مشروع واحد محدد سوف يتم إستيراده"
|
74
|
+
many: "مشروع واحد محدد سوف يتم إستيراده"
|
75
|
+
other: "%{count} مشروع محدد سوف يتم إستيراده"
|
76
|
+
no_components: لا توجد أى مقومات فى الميزانيه فى هذا الحيز لتوريد المشاريع إلى نتائج.
|
77
|
+
origin_component_id: عنصر أساسى
|
78
|
+
select_component: اختيار المكون
|
79
|
+
results:
|
96
80
|
edit:
|
97
81
|
title: تحرير النتيجة
|
98
82
|
update: تحديث النتيجة
|
@@ -101,18 +85,10 @@ ar:
|
|
101
85
|
new:
|
102
86
|
create: إنشاء نتيجة
|
103
87
|
title: نتيجة جديدة
|
104
|
-
update:
|
105
|
-
invalid: حدثت مشكلة أثناء تحديث هذه النتيجة
|
106
|
-
success: تم تحديث النتيجة بنجاح
|
107
88
|
shared:
|
108
89
|
subnav:
|
109
90
|
statuses: الحالات
|
110
91
|
statuses:
|
111
|
-
create:
|
112
|
-
invalid: كانت هناك مشكلة في إنشاء هذه الحالة
|
113
|
-
success: تم إنشاء الحالة بنجاح
|
114
|
-
destroy:
|
115
|
-
success: تم حذف الحالة بنجاح
|
116
92
|
edit:
|
117
93
|
title: تحرير الحالة
|
118
94
|
update: تحديث الحالة
|
@@ -121,15 +97,7 @@ ar:
|
|
121
97
|
new:
|
122
98
|
create: إنشاء الحالة
|
123
99
|
title: حالة جديدة
|
124
|
-
update:
|
125
|
-
invalid: حدثت مشكلة أثناء تحديث هذه الحالة
|
126
|
-
success: تم تحديث الحالة بنجاح
|
127
100
|
timeline_entries:
|
128
|
-
create:
|
129
|
-
invalid: حدثت مشكلة أثناء إنشاء هذا الإدخال
|
130
|
-
success: تم إنشاء الدخول بنجاح
|
131
|
-
destroy:
|
132
|
-
success: تم حذف الإدخال بنجاح
|
133
101
|
edit:
|
134
102
|
title: تحرير الإدخال
|
135
103
|
update: تحديث الإدخال
|
@@ -138,9 +106,6 @@ ar:
|
|
138
106
|
new:
|
139
107
|
create: إنشاء الإدخال
|
140
108
|
title: إدخال جديد
|
141
|
-
update:
|
142
|
-
invalid: حدثت مشكلة أثناء تحديث هذا الإدخال
|
143
|
-
success: تم تحديث الإدخال بنجاح
|
144
109
|
admin_log:
|
145
110
|
result:
|
146
111
|
create: "%{user_name} أنشأ النتيجة %{resource_name} في %{space_name}"
|
@@ -159,18 +124,19 @@ ar:
|
|
159
124
|
not_found: 'لم يتم العثور على الأصل في قاعدة البيانات (الرقم-المُعرف: %{id})'
|
160
125
|
content_blocks:
|
161
126
|
highlighted_results:
|
162
|
-
dates: التواريخ
|
163
127
|
results: النتائج
|
164
|
-
unspecified: غير محدد
|
165
128
|
import_mailer:
|
166
129
|
import:
|
167
130
|
errors: أخطاء
|
168
|
-
errors_present: حدثت مشكلة في استيراد النتائج
|
169
131
|
row_number: الصف
|
170
132
|
subject: استيراد النتائج بنجاح
|
171
133
|
success: نجاح استيراد النتائج. يمكنك مراجعة النتائج في واجهة الإدارة.
|
134
|
+
import_projects_mailer:
|
135
|
+
import:
|
136
|
+
subject: استيراد المشاريع بنجاح
|
137
|
+
success: النتائج المستوردة إلى النتائج في مكون %{component_name}. يمكن معاينة النتائج في واجهة الإدارة.
|
172
138
|
last_activity:
|
173
|
-
|
139
|
+
new_result: 'النتيجة الجديدة:'
|
174
140
|
models:
|
175
141
|
result:
|
176
142
|
fields:
|
@@ -193,9 +159,6 @@ ar:
|
|
193
159
|
fields:
|
194
160
|
entry_date: تاريخ
|
195
161
|
title: العنوان
|
196
|
-
result_m:
|
197
|
-
executed: تم التنفيذ
|
198
|
-
view: عرض
|
199
162
|
results:
|
200
163
|
count:
|
201
164
|
results_count:
|
@@ -207,7 +170,6 @@ ar:
|
|
207
170
|
other: "%{count} النتائج"
|
208
171
|
filters:
|
209
172
|
all: الكل
|
210
|
-
scopes: نطاقات
|
211
173
|
home:
|
212
174
|
categories_label: الفئات
|
213
175
|
subcategories_label: الفئات الفرعية
|