decidim-accountability 0.10.1 → 0.11.0.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/javascripts/decidim/accountability/accountability.js.es6 +2 -2
- data/app/assets/javascripts/decidim/accountability/admin/accountability_admin.js.es6 +11 -11
- data/app/commands/decidim/accountability/admin/create_result.rb +1 -1
- data/app/commands/decidim/accountability/admin/create_status.rb +1 -1
- data/app/commands/decidim/accountability/admin/destroy_result.rb +43 -0
- data/app/controllers/decidim/accountability/admin/application_controller.rb +2 -2
- data/app/controllers/decidim/accountability/admin/results_controller.rb +12 -10
- data/app/controllers/decidim/accountability/admin/statuses_controller.rb +1 -1
- data/app/controllers/decidim/accountability/admin/timeline_entries_controller.rb +1 -1
- data/app/controllers/decidim/accountability/application_controller.rb +2 -2
- data/app/controllers/decidim/accountability/result_widgets_controller.rb +1 -1
- data/app/controllers/decidim/accountability/results_controller.rb +3 -3
- data/app/controllers/decidim/accountability/versions_controller.rb +1 -1
- data/app/events/decidim/accountability/proposal_linked_event.rb +1 -1
- data/app/forms/decidim/accountability/admin/result_form.rb +5 -5
- data/app/helpers/decidim/accountability/application_helper.rb +4 -4
- data/app/helpers/decidim/accountability/breadcrumb_helper.rb +1 -1
- data/app/models/decidim/accountability/result.rb +10 -5
- data/app/models/decidim/accountability/status.rb +3 -3
- data/app/presenters/decidim/accountability/admin_log/result_presenter.rb +5 -4
- data/app/presenters/decidim/accountability/admin_log/value_types/parent_presenter.rb +29 -0
- data/app/services/decidim/accountability/result_search.rb +2 -2
- data/app/services/decidim/accountability/results_calculator.rb +4 -4
- data/app/views/decidim/accountability/admin/results/_form.html.erb +5 -6
- data/app/views/decidim/accountability/admin/results/_proposals.html.erb +2 -2
- data/app/views/decidim/accountability/admin/results/edit.html.erb +2 -2
- data/app/views/decidim/accountability/admin/results/index.html.erb +5 -5
- data/app/views/decidim/accountability/admin/results/new.html.erb +2 -2
- data/app/views/decidim/accountability/admin/shared/_subnav.html.erb +1 -1
- data/app/views/decidim/accountability/admin/statuses/edit.html.erb +2 -3
- data/app/views/decidim/accountability/admin/statuses/index.html.erb +3 -3
- data/app/views/decidim/accountability/admin/statuses/new.html.erb +2 -3
- data/app/views/decidim/accountability/admin/timeline_entries/edit.html.erb +2 -3
- data/app/views/decidim/accountability/admin/timeline_entries/index.html.erb +4 -4
- data/app/views/decidim/accountability/admin/timeline_entries/new.html.erb +2 -3
- data/app/views/decidim/accountability/results/_home_categories.html.erb +3 -3
- data/app/views/decidim/accountability/results/_home_header.html.erb +2 -2
- data/app/views/decidim/accountability/results/_nav_breadcrumb.html.erb +4 -4
- data/app/views/decidim/accountability/results/_results_leaf.html.erb +2 -2
- data/app/views/decidim/accountability/results/_results_parent.html.erb +2 -4
- data/app/views/decidim/accountability/results/_scope_filters.html.erb +1 -1
- data/app/views/decidim/accountability/results/_search.html.erb +2 -2
- data/app/views/decidim/accountability/results/_show_leaf.html.erb +2 -2
- data/app/views/decidim/accountability/results/_show_parent.html.erb +2 -2
- data/app/views/decidim/accountability/results/_stats_box.html.erb +1 -1
- data/app/views/decidim/accountability/versions/index.html.erb +1 -1
- data/app/views/decidim/participatory_processes/participatory_process_groups/_highlighted_results.html.erb +1 -1
- data/app/views/decidim/participatory_processes/participatory_process_groups/_result.html.erb +1 -1
- data/app/views/decidim/participatory_spaces/_highlighted_results.html.erb +2 -2
- data/app/views/decidim/participatory_spaces/_result.html.erb +1 -1
- data/config/locales/ca.yml +12 -8
- data/config/locales/en.yml +13 -9
- data/config/locales/es.yml +13 -9
- data/config/locales/eu.yml +13 -9
- data/config/locales/fi.yml +13 -9
- data/config/locales/fr.yml +14 -10
- data/config/locales/gl.yml +13 -9
- data/config/locales/it.yml +13 -9
- data/config/locales/nl.yml +22 -18
- data/config/locales/pl.yml +13 -9
- data/config/locales/pt-BR.yml +13 -9
- data/config/locales/pt.yml +13 -9
- data/config/locales/ru.yml +0 -1
- data/config/locales/sv.yml +13 -9
- data/config/locales/uk.yml +0 -1
- data/db/migrate/20180305133145_rename_features_to_components_at_accountability.rb +16 -0
- data/lib/decidim/accountability.rb +1 -1
- data/lib/decidim/accountability/{feature.rb → component.rb} +25 -25
- data/lib/decidim/accountability/engine.rb +4 -4
- data/lib/decidim/accountability/result_serializer.rb +3 -3
- data/lib/decidim/accountability/test/factories.rb +5 -5
- data/lib/decidim/accountability/version.rb +1 -1
- metadata +26 -23
@@ -17,10 +17,10 @@ module Decidim
|
|
17
17
|
|
18
18
|
def action_string
|
19
19
|
case action
|
20
|
-
when "create"
|
21
|
-
"decidim.accountability.admin_log.result
|
22
|
-
|
23
|
-
|
20
|
+
when "create", "delete", "update"
|
21
|
+
"decidim.accountability.admin_log.result.#{action}"
|
22
|
+
else
|
23
|
+
super
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -31,6 +31,7 @@ module Decidim
|
|
31
31
|
description: :i18n,
|
32
32
|
title: :i18n,
|
33
33
|
decidim_scope_id: :scope,
|
34
|
+
parent_id: "Decidim::Accountability::AdminLog::ValueTypes::ParentPresenter",
|
34
35
|
progress: :percentage
|
35
36
|
}
|
36
37
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Accountability
|
5
|
+
module AdminLog
|
6
|
+
module ValueTypes
|
7
|
+
# This class presents the given value as a Decidim::Accountability::Result. Check
|
8
|
+
# the `DefaultPresenter` for more info on how value presenters work.
|
9
|
+
class ParentPresenter < Decidim::Log::ValueTypes::DefaultPresenter
|
10
|
+
# Public: Presents the value as a Decidim::Accountability::Result. If the result can
|
11
|
+
# be found, it shows its title. Otherwise it shows its ID.
|
12
|
+
#
|
13
|
+
# Returns an HTML-safe String.
|
14
|
+
def present
|
15
|
+
return unless value
|
16
|
+
return h.translated_attribute(result.title) if result
|
17
|
+
I18n.t("not_found", id: value, scope: "decidim.accountability.admin_log.value_types.parent_presenter")
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def result
|
23
|
+
@result ||= Decidim::Accountability::Result.find_by(id: value)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Accountability
|
5
5
|
# This class handles search and filtering of results. Needs a
|
6
|
-
# `
|
6
|
+
# `current_component` param with a `Decidim::Component` in order to
|
7
7
|
# find the results.
|
8
8
|
class ResultSearch < ResourceSearch
|
9
9
|
# Public: Initializes the service.
|
@@ -11,7 +11,7 @@ module Decidim
|
|
11
11
|
# options - A hash of options to modify the search. These options will be
|
12
12
|
# converted to methods by SearchLight so they can be used on filter
|
13
13
|
# methods. (Default {})
|
14
|
-
# *
|
14
|
+
# * component - A Decidim::Component to get the results from.
|
15
15
|
# * organization - A Decidim::Organization object.
|
16
16
|
# * parent_id - The parent ID of the result. The value is forced to false to force
|
17
17
|
# the filter execution when the value is nil
|
@@ -5,8 +5,8 @@ module Decidim
|
|
5
5
|
# This class handles the calculation of progress for a set of results
|
6
6
|
class ResultsCalculator
|
7
7
|
# Public: Initializes the service.
|
8
|
-
def initialize(
|
9
|
-
@
|
8
|
+
def initialize(component, scope_id, category_id)
|
9
|
+
@component = component
|
10
10
|
@scope_id = scope_id
|
11
11
|
@category_id = category_id
|
12
12
|
end
|
@@ -19,11 +19,11 @@ module Decidim
|
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
|
-
attr_reader :
|
22
|
+
attr_reader :component, :scope_id, :category_id
|
23
23
|
|
24
24
|
def results
|
25
25
|
@results ||= ResultSearch.new(
|
26
|
-
|
26
|
+
component: component,
|
27
27
|
scope_id: scope_id,
|
28
28
|
category_id: category_id,
|
29
29
|
deep_search: false
|
@@ -44,7 +44,7 @@
|
|
44
44
|
|
45
45
|
<div class="row">
|
46
46
|
<div class="columns xlarge-6">
|
47
|
-
<%= form.select :decidim_accountability_status_id, statuses.map{|status| [translated_attribute(status.name), status.id, {
|
47
|
+
<%= form.select :decidim_accountability_status_id, statuses.map{|status| [translated_attribute(status.name), status.id, { "data-progress" => status.progress }] }, include_blank: true %>
|
48
48
|
</div>
|
49
49
|
|
50
50
|
<div class="columns xlarge-6">
|
@@ -54,9 +54,9 @@
|
|
54
54
|
|
55
55
|
<div class="row column">
|
56
56
|
<% if @form.proposals %>
|
57
|
-
<% picker_options = { id: "decidim_accountability_proposals", class: "picker-multiple", name:
|
58
|
-
prompt_params= { url:
|
59
|
-
<%= form.data_picker(:proposals, picker_options, prompt_params) {|item| { url:
|
57
|
+
<% picker_options = { id: "decidim_accountability_proposals", class: "picker-multiple", name: "result[proposal_ids]", multiple: true }
|
58
|
+
prompt_params= { url: "proposals", text: t(".add_proposal") } %>
|
59
|
+
<%= form.data_picker(:proposals, picker_options, prompt_params) {|item| { url: "proposals", text: "##{item.id}- #{item.title}" }} %>
|
60
60
|
<% end %>
|
61
61
|
</div>
|
62
62
|
|
@@ -65,8 +65,7 @@
|
|
65
65
|
<%= form.select :project_ids,
|
66
66
|
@form.projects,
|
67
67
|
{},
|
68
|
-
{ multiple: true, class: "chosen-select" }
|
69
|
-
%>
|
68
|
+
{ multiple: true, class: "chosen-select" } %>
|
70
69
|
<% end %>
|
71
70
|
</div>
|
72
71
|
|
@@ -2,11 +2,11 @@
|
|
2
2
|
<h1><%= t(".current_selection") %></h1>
|
3
3
|
</div>
|
4
4
|
<div class="picker-content">
|
5
|
-
<input type="text" name="proposal-search" id="data_picker-autocomplete"/>
|
5
|
+
<input type="text" name="proposal-search" id="data_picker-autocomplete" />
|
6
6
|
</div>
|
7
7
|
<div class="picker-footer">
|
8
8
|
<div class="buttons button--double">
|
9
|
-
<a id="proposal-picker-choose" class="button mute" href="proposals" data-picker-value="" data-picker-text=""
|
9
|
+
<a id="proposal-picker-choose" class="button mute" href="proposals" data-picker-value="" data-picker-text=""><%= t(".select") %></a>
|
10
10
|
<a class="button clear" data-close=""><%= t(".close") %></a>
|
11
11
|
</div>
|
12
12
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<%=
|
2
|
-
<%= render partial:
|
1
|
+
<%= decidim_form_for(@form, html: { class: "form edit_result" }) do |f| %>
|
2
|
+
<%= render partial: "form", object: f, locals: { title: t(".title") } %>
|
3
3
|
|
4
4
|
<div class="button--double form-general-submit">
|
5
5
|
<%= f.submit t(".update") %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%= link_to "#{translated_attribute(parent_result.title)} > ", edit_result_path(parent_result) if parent_result %>
|
5
5
|
<%= t(".title") %>
|
6
6
|
<div class="button--title">
|
7
|
-
<%= link_to t("actions.new", scope: "decidim.accountability", name: t("models.result.name", scope: "decidim.accountability.admin")), new_result_path(parent_id: parent_result), class:
|
7
|
+
<%= link_to t("actions.new", scope: "decidim.accountability", name: t("models.result.name", scope: "decidim.accountability.admin")), new_result_path(parent_id: parent_result), class: "button tiny button--simple" if can? :manage, current_component %>
|
8
8
|
<%= render partial: "decidim/accountability/admin/shared/subnav" unless parent_result %>
|
9
9
|
<%= export_dropdown %>
|
10
10
|
</div>
|
@@ -29,19 +29,19 @@
|
|
29
29
|
<td class="table-list__actions">
|
30
30
|
<%= icon_link_to "eye", resource_locator(result).path, t("actions.preview", scope: "decidim.accountability"), class: "action-icon--preview", target: :blank %>
|
31
31
|
|
32
|
-
<% if can? :update,
|
32
|
+
<% if can? :update, current_component %>
|
33
33
|
<%= icon_link_to "plus", results_path(parent_id: result.id), t("actions.new", scope: "decidim.accountability", name: t("models.result.name", scope: "decidim.accountability.admin")), class: "action-icon--plus" %>
|
34
34
|
<% end %>
|
35
35
|
|
36
|
-
<% if can? :update,
|
36
|
+
<% if can? :update, current_component %>
|
37
37
|
<%= icon_link_to "clock", result_timeline_entries_path(result), t("actions.timeline_entries", scope: "decidim.accountability"), class: "action-icon--clock" %>
|
38
38
|
<% end %>
|
39
39
|
|
40
|
-
<% if can? :update,
|
40
|
+
<% if can? :update, current_component %>
|
41
41
|
<%= icon_link_to "pencil", edit_result_path(result), t("actions.edit", scope: "decidim.accountability"), class: "action-icon--edit" %>
|
42
42
|
<% end %>
|
43
43
|
|
44
|
-
<% if can? :destroy,
|
44
|
+
<% if can? :destroy, current_component %>
|
45
45
|
<%= icon_link_to "circle-x", result_path(result), t("actions.destroy", scope: "decidim.accountability"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.accountability", name: t("models.result.name", scope: "decidim.accountability.admin")) } %>
|
46
46
|
<% end %>
|
47
47
|
</td>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<%=
|
2
|
-
<%= render partial:
|
1
|
+
<%= decidim_form_for(@form, html: { class: "form new_result" }) do |f| %>
|
2
|
+
<%= render partial: "form", object: f, locals: { title: t(".title") } %>
|
3
3
|
|
4
4
|
<div class="button--double form-general-submit">
|
5
5
|
<%= f.submit t(".create") %>
|
@@ -1 +1 @@
|
|
1
|
-
<%= link_to t(".statuses"), statuses_path, class:
|
1
|
+
<%= link_to t(".statuses"), statuses_path, class: "button tiny button--simple" %>
|
@@ -1,8 +1,7 @@
|
|
1
|
-
<%=
|
2
|
-
<%= render partial:
|
1
|
+
<%= decidim_form_for(@form, html: { class: "form edit_status" }) do |f| %>
|
2
|
+
<%= render partial: "form", object: f, locals: { title: t(".title") } %>
|
3
3
|
|
4
4
|
<div class="button--double form-general-submit">
|
5
5
|
<%= f.submit t(".update") %>
|
6
6
|
</div>
|
7
7
|
<% end %>
|
8
|
-
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="card-divider">
|
3
3
|
<h2 class="card-title">
|
4
4
|
<%= t(".title") %>
|
5
|
-
<%= link_to t("actions.new", scope: "decidim.accountability", name: t("models.status.name", scope: "decidim.accountability.admin")), new_status_path, class:
|
5
|
+
<%= link_to t("actions.new", scope: "decidim.accountability", name: t("models.status.name", scope: "decidim.accountability.admin")), new_status_path, class: "button tiny button--title" if can? :manage, current_component %>
|
6
6
|
<%= render partial: "decidim/accountability/admin/shared/subnav" %>
|
7
7
|
</h2>
|
8
8
|
</div>
|
@@ -27,11 +27,11 @@
|
|
27
27
|
<td><%= truncate translated_attribute(status.description), lenght: 50 %></td>
|
28
28
|
<td><%= status.progress %></td>
|
29
29
|
<td class="table-list__actions">
|
30
|
-
<% if can? :update,
|
30
|
+
<% if can? :update, current_component %>
|
31
31
|
<%= icon_link_to "pencil", edit_status_path(status), t("actions.edit", scope: "decidim.accountability"), class: "action-icon--edit" %>
|
32
32
|
<% end %>
|
33
33
|
|
34
|
-
<% if can? :destroy,
|
34
|
+
<% if can? :destroy, current_component %>
|
35
35
|
<%= icon_link_to "circle-x", status_path(status), t("actions.destroy", scope: "decidim.accountability"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.accountability", name: t("models.status.name", scope: "decidim.accountability.admin")) } %>
|
36
36
|
<% end %>
|
37
37
|
</td>
|
@@ -1,8 +1,7 @@
|
|
1
|
-
<%=
|
2
|
-
<%= render partial:
|
1
|
+
<%= decidim_form_for(@form, html: { class: "form new_status" }) do |f| %>
|
2
|
+
<%= render partial: "form", object: f, locals: { title: t(".title") } %>
|
3
3
|
|
4
4
|
<div class="button--double form-general-submit">
|
5
5
|
<%= f.submit t(".create") %>
|
6
6
|
</div>
|
7
7
|
<% end %>
|
8
|
-
|
@@ -1,8 +1,7 @@
|
|
1
|
-
<%=
|
2
|
-
<%= render partial:
|
1
|
+
<%= decidim_form_for([result, @form], html: { class: "form edit_timeline_entry" }) do |f| %>
|
2
|
+
<%= render partial: "form", object: f, locals: { title: t(".title") } %>
|
3
3
|
|
4
4
|
<div class="button--double form-general-submit">
|
5
5
|
<%= f.submit t(".update") %>
|
6
6
|
</div>
|
7
7
|
<% end %>
|
8
|
-
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<div class="card">
|
2
2
|
<div class="card-divider">
|
3
3
|
<h2 class="card-title">
|
4
|
-
<%= link_to "#{translated_attribute(result.title)} > ", edit_result_path(result)%>
|
4
|
+
<%= link_to "#{translated_attribute(result.title)} > ", edit_result_path(result) %>
|
5
5
|
<%= t(".title") %>
|
6
|
-
<%= link_to t("actions.new", scope: "decidim.accountability", name: t("models.timeline_entry.name", scope: "decidim.accountability.admin")), new_result_timeline_entry_path(result), class:
|
6
|
+
<%= link_to t("actions.new", scope: "decidim.accountability", name: t("models.timeline_entry.name", scope: "decidim.accountability.admin")), new_result_timeline_entry_path(result), class: "button tiny button--title" if can? :manage, current_component %>
|
7
7
|
</h2>
|
8
8
|
</div>
|
9
9
|
|
@@ -23,11 +23,11 @@
|
|
23
23
|
<td><%= timeline_entry.entry_date %><br /></td>
|
24
24
|
<td><%= translated_attribute(timeline_entry.description) %></td>
|
25
25
|
<td class="table-list__actions">
|
26
|
-
<% if can? :update,
|
26
|
+
<% if can? :update, current_component %>
|
27
27
|
<%= icon_link_to "pencil", edit_result_timeline_entry_path(timeline_entry.result, timeline_entry), t("actions.edit", scope: "decidim.accountability"), class: "action-icon--edit" %>
|
28
28
|
<% end %>
|
29
29
|
|
30
|
-
<% if can? :destroy,
|
30
|
+
<% if can? :destroy, current_component %>
|
31
31
|
<%= icon_link_to "circle-x", result_timeline_entry_path(timeline_entry.result, timeline_entry), t("actions.destroy", scope: "decidim.accountability"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.accountability") } %>
|
32
32
|
<% end %>
|
33
33
|
</td>
|
@@ -1,8 +1,7 @@
|
|
1
|
-
<%=
|
2
|
-
<%= render partial:
|
1
|
+
<%= decidim_form_for([result, @form], html: { class: "form new_timeline_entry" }) do |f| %>
|
2
|
+
<%= render partial: "form", object: f, locals: { title: t(".title") } %>
|
3
3
|
|
4
4
|
<div class="button--double form-general-submit">
|
5
5
|
<%= f.submit t(".create") %>
|
6
6
|
</div>
|
7
7
|
<% end %>
|
8
|
-
|
@@ -28,14 +28,14 @@
|
|
28
28
|
<p class="heading3">
|
29
29
|
<%= link_to translated_attribute(category.name),results_path(filter: { category_id: category, scope_id: current_scope }) %></p>
|
30
30
|
|
31
|
-
<% if
|
31
|
+
<% if component_settings.display_progress_enabled? && progress_calculator(current_scope, category.id).present? %>
|
32
32
|
<div class="progress">
|
33
33
|
<div class="progress-meter" style="width:<%= progress_calculator(current_scope, category.id) %>%"></div>
|
34
34
|
</div>
|
35
35
|
<% end %>
|
36
36
|
|
37
37
|
<div class="progress-info">
|
38
|
-
<% if
|
38
|
+
<% if component_settings.display_progress_enabled? && progress_calculator(current_scope, category.id).present? %>
|
39
39
|
<div class="progress-figure heading3">
|
40
40
|
<%= display_percentage progress_calculator(current_scope, category.id) %>
|
41
41
|
</div>
|
@@ -55,7 +55,7 @@
|
|
55
55
|
<div class="category--line">
|
56
56
|
<strong><%= translated_attribute(subcategory.name) %></strong>
|
57
57
|
|
58
|
-
<% if
|
58
|
+
<% if component_settings.display_progress_enabled? && progress_calculator(current_scope, subcategory.id).present? %>
|
59
59
|
<div class="progress-figure heading3">
|
60
60
|
<%= display_percentage progress_calculator(current_scope, subcategory.id) %>
|
61
61
|
</div>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<div class="intro section">
|
2
2
|
<div class="row">
|
3
3
|
<div class="small-12 medium-7 columns">
|
4
|
-
<%== translated_attribute
|
4
|
+
<%== translated_attribute component_settings.intro %>
|
5
5
|
</div>
|
6
6
|
|
7
|
-
<% if
|
7
|
+
<% if component_settings.display_progress_enabled? && progress_calculator(current_scope, nil).present? %>
|
8
8
|
<div class="small-12 medium-5 columns">
|
9
9
|
<div class="progress-level">
|
10
10
|
<p><%= t(".global_status") %></p>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="lines-breadcrumb">
|
2
2
|
<%= link_to t(".global"), root_path %>
|
3
|
-
<% if
|
3
|
+
<% if component_settings.display_progress_enabled? %>
|
4
4
|
<span class="percentage"><%= display_percentage progress_calculator(current_scope, nil) %></span>
|
5
5
|
<% end %>
|
6
6
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<span class="breadcrumb--separator">></span>
|
9
9
|
<div>
|
10
10
|
<%= link_to translated_attribute(category.parent.name), results_path(filter: { category_id: category.parent_id, scope_id: current_scope }) %>
|
11
|
-
<% if
|
11
|
+
<% if component_settings.display_progress_enabled? %>
|
12
12
|
<span class="percentage"><%= display_percentage progress_calculator(current_scope, category.parent_id) %></span>
|
13
13
|
<% end %>
|
14
14
|
</div>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<span class="breadcrumb--separator">></span>
|
19
19
|
<div>
|
20
20
|
<%= link_to translated_attribute(category.name), results_path(filter: { category_id: category.id, scope_id: current_scope }) %>
|
21
|
-
<% if
|
21
|
+
<% if component_settings.display_progress_enabled? %>
|
22
22
|
<span class="percentage"><%= display_percentage progress_calculator(current_scope, category.id) %></span>
|
23
23
|
<% end %>
|
24
24
|
</div>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<span class="breadcrumb--separator">></span>
|
29
29
|
<div>
|
30
30
|
<%= link_to translated_attribute(result.parent.title), result_path(result.parent, filter: { scope_id: current_scope }) %>
|
31
|
-
<% if
|
31
|
+
<% if component_settings.display_progress_enabled? %>
|
32
32
|
<span class="percentage"><%= display_percentage result.parent.progress %></span>
|
33
33
|
<% end %>
|
34
34
|
</div>
|
@@ -34,11 +34,11 @@
|
|
34
34
|
</div>
|
35
35
|
<% end %>
|
36
36
|
|
37
|
-
<% if
|
37
|
+
<% if component_settings.display_progress_enabled? && result.progress.present? %>
|
38
38
|
<div class="card--list__data">
|
39
39
|
<span class="card--list__data__number"><%= display_percentage result.progress %></span>
|
40
40
|
</div>
|
41
|
-
<% end%>
|
41
|
+
<% end %>
|
42
42
|
</div>
|
43
43
|
<% end %>
|
44
44
|
</div>
|
@@ -19,16 +19,14 @@
|
|
19
19
|
<span class="text-small"><%= heading_leaf_level_results(result.children.count) %></span>
|
20
20
|
<% end %>
|
21
21
|
|
22
|
-
<% if
|
22
|
+
<% if component_settings.display_progress_enabled? && result.progress.present? %>
|
23
23
|
<div class="card--list__data">
|
24
24
|
<span class="card--list__data__number"><%= display_percentage result.progress %></span>
|
25
25
|
</div>
|
26
|
-
<% end%>
|
26
|
+
<% end %>
|
27
27
|
</div>
|
28
28
|
<% end %>
|
29
29
|
</div>
|
30
30
|
<%= decidim_paginate results, order_start_time: params[:order_start_time], scope_id: params[:scope_id] %>
|
31
31
|
</div>
|
32
32
|
</div>
|
33
|
-
|
34
|
-
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="scope-filters section">
|
2
2
|
<% if current_participatory_space.has_subscopes? %>
|
3
|
-
<div><%= t(
|
3
|
+
<div><%= t("results.filters.scopes", scope: "decidim.accountability") %></div>
|
4
4
|
|
5
5
|
<ul class="tags tags--action">
|
6
6
|
<li <%= active_class_if_current(nil) %>><%= link_to t("results.filters.all", scope: "decidim.accountability"), url_for(filter: { category_id: category.try(:id) }) %></li>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<%= form_tag results_path, method: :get do %>
|
2
2
|
<div class="filters__search">
|
3
3
|
<div class="input-group">
|
4
|
-
<%= search_field_tag "filter[search_text]", nil, label: false, class: "input-group-field", placeholder: t(
|
4
|
+
<%= search_field_tag "filter[search_text]", nil, label: false, class: "input-group-field", placeholder: t(".search"), value: "" %>
|
5
5
|
<div class="input-group-button">
|
6
6
|
<button type="submit" class="button button--muted">
|
7
|
-
<%= icon "magnifying-glass", aria_label: t(
|
7
|
+
<%= icon "magnifying-glass", aria_label: t(".search") %>
|
8
8
|
</button>
|
9
9
|
</div>
|
10
10
|
</div>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
</div>
|
10
10
|
|
11
11
|
<div class="row">
|
12
|
-
<% if
|
12
|
+
<% if component_settings.display_progress_enabled? && result.progress.present? %>
|
13
13
|
<div class="columns section mediumlarge-3 mediumlarge-push-9">
|
14
14
|
<div class="progress-level">
|
15
15
|
<div class="progress-label">
|
@@ -58,7 +58,7 @@
|
|
58
58
|
</div>
|
59
59
|
</div>
|
60
60
|
|
61
|
-
<hr
|
61
|
+
<hr />
|
62
62
|
|
63
63
|
<div class="small-12 mediumlarge-8 large-9 columns">
|
64
64
|
<div class="section result-description">
|