@@ -8,4 +8,23 @@ module BudgetInvestmentsHelper
|
||||
def budget_investments_advanced_filters(params)
|
||||
params.map { |af| t("admin.budget_investments.index.filters.#{af}") }.join(', ')
|
||||
end
|
||||
|
||||
def investments_minimal_view_path
|
||||
budget_investments_path(id: @heading.group.to_param,
|
||||
heading_id: @heading.to_param,
|
||||
filter: @current_filter,
|
||||
view: investments_secondary_view)
|
||||
end
|
||||
|
||||
def investments_default_view?
|
||||
@view == "default"
|
||||
end
|
||||
|
||||
def investments_current_view
|
||||
@view
|
||||
end
|
||||
|
||||
def investments_secondary_view
|
||||
investments_current_view == "default" ? "minimal" : "default"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -12,4 +12,20 @@ module DebatesHelper
|
||||
end
|
||||
end
|
||||
|
||||
def debates_minimal_view_path
|
||||
debates_path(view: debates_secondary_view)
|
||||
end
|
||||
|
||||
def debates_default_view?
|
||||
@view == "default"
|
||||
end
|
||||
|
||||
def debates_current_view
|
||||
@view
|
||||
end
|
||||
|
||||
def debates_secondary_view
|
||||
debates_current_view == "default" ? "minimal" : "default"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -48,4 +48,20 @@ module ProposalsHelper
|
||||
current_user && proposal.editable_by?(current_user)
|
||||
end
|
||||
|
||||
def proposals_minimal_view_path
|
||||
proposals_path(view: proposals_secondary_view)
|
||||
end
|
||||
|
||||
def proposals_default_view?
|
||||
@view == "default"
|
||||
end
|
||||
|
||||
def proposals_current_view
|
||||
@view
|
||||
end
|
||||
|
||||
def proposals_secondary_view
|
||||
proposals_current_view == "default" ? "minimal" : "default"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user