diff --git a/app/views/admin/budget_investments/_filters_description.html.erb b/app/views/admin/budget_investments/_filters_description.html.erb new file mode 100644 index 000000000..43e48408f --- /dev/null +++ b/app/views/admin/budget_investments/_filters_description.html.erb @@ -0,0 +1,13 @@ +<% if params[:filter].present? && params[:second_filter].present? %> +

<%= t("#{i18n_namespace}.filters.two_filters_html", + filter: t("#{i18n_namespace}.filters.#{params[:filter]}"), + second_filter: t("#{i18n_namespace}.filters.#{params[:second_filter]}")) %>

+ +<% elsif params[:filter].present? %> +

<%= t("#{i18n_namespace}.filters.one_filter_html", + filter: t("#{i18n_namespace}.filters.#{params[:filter]}")) %>

+ +<% elsif params[:second_filter].present? %> +

<%= t("#{i18n_namespace}.filters.one_filter_html", + filter: t("#{i18n_namespace}.filters.#{params[:second_filter]}")) %>

+<% end %> diff --git a/app/views/admin/budget_investments/_investments.html.erb b/app/views/admin/budget_investments/_investments.html.erb index e3cea1026..3456021db 100644 --- a/app/views/admin/budget_investments/_investments.html.erb +++ b/app/views/admin/budget_investments/_investments.html.erb @@ -3,7 +3,10 @@ class: "float-right small" %> <% if @investments.any? %> -

<%= page_entries_info @investments %>

+

<%= page_entries_info @investments %>


+ + <%= render "filters_description", i18n_namespace: "admin.budget_investments.index" %> + diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 059cfaa9e..ea30543d9 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -150,6 +150,8 @@ en: max_per_heading: Max. supports per heading winners: Winners button: Filter + one_filter_html: "Current applied filter: %{filter}" + two_filters_html: "Current applied filters: %{filter}, %{second_filter}" download_current_selection: "Download current selection" no_budget_investments: "There are no investment projects." title: Investment projects diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 741cc7197..36dfb6be6 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -150,6 +150,8 @@ es: max_per_heading: Corte por partida winners: Ganadores button: Filtrar + one_filter_html: "Filtro en uso: %{filter}" + two_filters_html: "Filtros en uso: %{filter}, %{second_filter}" download_current_selection: "Descargar selección actual" no_budget_investments: "No hay proyectos de gasto." title: Proyectos de gasto