diff --git a/app/helpers/budget_investments_helper.rb b/app/helpers/budget_investments_helper.rb index d0a01b6af..6725fbf11 100644 --- a/app/helpers/budget_investments_helper.rb +++ b/app/helpers/budget_investments_helper.rb @@ -1,17 +1,14 @@ module BudgetInvestmentsHelper - def budget_investments_sorting_options - Budget::Investment::SORTING_OPTIONS.map do |so| - [t("admin.budget_investments.index.sort_by.#{so}"), so] - end - end - def budget_investments_advanced_filters(params) params.map { |af| t("admin.budget_investments.index.filters.#{af}") }.join(', ') end def link_to_investments_sorted_by(column) - sorting_option = budget_investments_sorting_options.select { |so| so[1] == column.downcase }.flatten - link_to t(sorting_option[0]), admin_budget_budget_investments_path(sort_by: sorting_option[1]) + sorting_option = column.downcase + link_to( + t("admin.budget_investments.index.sort_by.#{sorting_option}"), + admin_budget_budget_investments_path(sort_by: sorting_option) + ) end def investments_minimal_view_path diff --git a/app/views/admin/budget_investments/_investments.html.erb b/app/views/admin/budget_investments/_investments.html.erb index 9daef3ac3..f7aea9c33 100644 --- a/app/views/admin/budget_investments/_investments.html.erb +++ b/app/views/admin/budget_investments/_investments.html.erb @@ -1,12 +1,3 @@ -<%= form_tag(admin_budget_budget_investments_path(budget: @budget), method: :get) do %> -
- <%= select_tag :sort_by, options_for_select(budget_investments_sorting_options, params[:sort_by]), - { prompt: t("admin.budget_investments.index.sort_by.placeholder"), - label: false, - class: "js-submit-on-change" } %> -
-<% end %> - <%= link_to t("admin.budget_investments.index.download_current_selection"), admin_budget_budget_investments_path(csv_params), class: "float-right small clear" %>