Removed unnecessary code
This commit is contained in:
@@ -6,26 +6,6 @@ module BudgetsHelper
|
||||
csv_params
|
||||
end
|
||||
|
||||
def investment_selected_link(investment)
|
||||
options = investment_selected_link_options(investment)
|
||||
path = toggle_selection_admin_budget_budget_investment_path(@budget,
|
||||
investment, filter: params[:filter], page: params[:page])
|
||||
link_options = {method: :patch, remote: true, class: options[:link_class]}
|
||||
link_to options[:text], path, link_options
|
||||
end
|
||||
|
||||
def investment_selected_link_options(investment)
|
||||
if investment.selected?
|
||||
{link_class: "button small expanded",
|
||||
text: t("admin.budget_investments.index.selected") }
|
||||
elsif investment.feasible? && investment.valuation_finished?
|
||||
{link_class: "button small hollow expanded",
|
||||
text: t("admin.budget_investments.index.select")}
|
||||
else
|
||||
{}
|
||||
end
|
||||
end
|
||||
|
||||
def budget_phases_select_options
|
||||
Budget::PHASES.map { |ph| [ t("budgets.phase.#{ph}"), ph ] }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user