diff --git a/app/views/decidim/accountability/results/_filters.html.erb b/app/views/decidim/accountability/results/_filters.html.erb index 17cfdad..72c8e97 100644 --- a/app/views/decidim/accountability/results/_filters.html.erb +++ b/app/views/decidim/accountability/results/_filters.html.erb @@ -1,54 +1,36 @@ -<%= filter_form_for filter do |form| %> -
-
-
-
-

<%= t(".title") %>

-
-
-
-
- +<%= filter_form_for filter, results_path, "aria-label": t(".label") do |form| %>
-
-
-
- <%= t(".search") %> - <%= form.search_field :search_text_cont, label: false, placeholder: t(".search"), title: t(".search"), "aria-label": t(".search"), data: { disable_dynamic_change: true } %> -
+
+
+ <%= form.search_field :search_text_cont, label: t(".term"), placeholder: t(".term"), data: { disable_dynamic_change: true } %>
<% if current_participatory_space.has_subscopes? %> -
"> -
-
- <%= t(".scope") %> - <% scopes = current_component.scope&.children || current_participatory_space.scope&.children || current_organization.scopes.top_level %> - <%= form.select(:with_scope, scope_picker_options(scopes, form.object.send(:with_scope)), { label: false, include_blank: t("forms.scopes_picker.prompt", item_name: t(".scope").downcase) }, "aria-label": t(".scope"), data: { disable_dynamic_change: true }) %> -
+
+
+ <% scopes = current_component.scope&.children || current_participatory_space.scope&.children || current_organization.scopes.top_level %> + <%= form.select(:with_scope, scope_picker_options(scopes, form.object.send(:with_scope)), { label: t(".scope"), include_blank: t(".scopes_values.all", item_name: t(".scope").downcase) }, data: { disable_dynamic_change: true }) %>
<% end %> <% if current_component.categories.any? %> -
-
-
- <%= t(".category") %> - <%= form.select(:with_category, filter_categories_values, { label: false, include_blank: t(".category_prompt") }, "aria-label": t(".category"), data: { disable_dynamic_change: true }) %> -
+
+
+ <%= form.select(:with_category, filter_categories_values, { label: t(".category"), include_blank: t(".categories_values.all") }, data: { disable_dynamic_change: true }) %>
<% end %>
-
- - +
<% end %> diff --git a/app/views/decidim/accountability/results/_listing.html.erb b/app/views/decidim/accountability/results/_listing.html.erb index 3d2b68f..b46e095 100644 --- a/app/views/decidim/accountability/results/_listing.html.erb +++ b/app/views/decidim/accountability/results/_listing.html.erb @@ -19,16 +19,21 @@
-
- <% if false %> -
- <%= render partial: "decidim/shared/results_per_page" %> +
+
+
+ <%= render partial: "decidim/accountability_simple/shared/results_count", locals: { results: results } %>
- <% end %> -
- -
-

<%= heading_parent_level_results(results.total_count) %>

+
+
+
+ <% if false %> +
+ <%= render partial: "decidim/shared/results_per_page" %> +
+ <% end %> +
+
diff --git a/app/views/decidim/accountability/results/_listing.js.erb b/app/views/decidim/accountability/results/_listing.js.erb index 1d1728f..3dfe228 100644 --- a/app/views/decidim/accountability/results/_listing.js.erb +++ b/app/views/decidim/accountability/results/_listing.js.erb @@ -1,6 +1,8 @@ var $results = $('#results'); +var $resultsCount = $('#results-count'); $results.html('<%= j(render partial: "decidim/accountability_simple/shared/results_parent", locals: { results: results, total_count: results.total_count }).strip.html_safe %>'); +$resultsCount.html('<%= j(render partial: "decidim/accountability_simple/shared/results_count", locals: { results: results }).strip.html_safe %>'); var $dropdownMenu = $('.dropdown.menu', $results); $dropdownMenu.foundation(); diff --git a/app/views/decidim/accountability/results/_show_parent.html.erb b/app/views/decidim/accountability/results/_show_parent.html.erb index 3dd47a0..c674bf6 100644 --- a/app/views/decidim/accountability/results/_show_parent.html.erb +++ b/app/views/decidim/accountability/results/_show_parent.html.erb @@ -42,10 +42,11 @@ root_result = root_result.parent while root_result.parent <%= render partial: "show_result_body", locals: { result: result } %> <% if show_map? %> -
+

<%= t(".locations") %>

+ + <%= render partial: "decidim/accountability_simple/shared/map", locals: { geocoded_results: geocoded_result } %>
- <%= render partial: "decidim/accountability_simple/shared/map", locals: { geocoded_results: geocoded_result } %> <% end %>
diff --git a/app/views/decidim/accountability_simple/shared/_results_count.html.erb b/app/views/decidim/accountability_simple/shared/_results_count.html.erb new file mode 100644 index 0000000..8a3af4a --- /dev/null +++ b/app/views/decidim/accountability_simple/shared/_results_count.html.erb @@ -0,0 +1 @@ +

<%= heading_parent_level_results(results.total_count) %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 4e1b06e..3923b85 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -88,13 +88,18 @@ en: one: Found 1 project other: "Found %{count} projects" filters: - category: Category - category_prompt: Choose category + category: Theme + categories_values: + all: All themes + label: Project search open: Open related_to: Related to reset: Clear filters scope: Area + scopes_values: + all: All areas search: Search + term: Keyword title: Search projects filters_small_view: close_modal: Close modal diff --git a/config/locales/fi.yml b/config/locales/fi.yml index f317135..dc95d88 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -88,13 +88,18 @@ fi: one: Löytyi 1 hanke other: "Löytyi %{count} hanketta" filters: - category: Aihepiiri - category_prompt: Valitse aihepiiri + category: Teema + categories_values: + all: Kaikki teemat + label: Hankkeiden haku open: Avaa related_to: Liittyy reset: Tyhjennä rajaukset scope: Alue + scopes_values: + all: Kaikki alueet search: Hae + term: Hakusana title: Etsi hankkeista filters_small_view: close_modal: Sulje ikkuna diff --git a/config/locales/sv.yml b/config/locales/sv.yml index fe9775e..abd76a6 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -88,13 +88,18 @@ sv: one: Hittade 1 projekt other: "Hittade %{count} projekt" filters: - category: Kategori - category_prompt: Välj kategori + category: Tema + categories_values: + all: Alla teman + label: Projektsökning open: Öppna related_to: Relaterade till reset: Rensa filter scope: Område + scopes_values: + all: Alla områden search: Sök + term: Nyckelord title: Sök projekt filters_small_view: close_modal: Stäng fönster