displays unfeasible budgets link from home
This commit is contained in:
@@ -2,7 +2,6 @@ class BudgetsController < ApplicationController
|
||||
include FeatureFlags
|
||||
feature_flag :budgets
|
||||
|
||||
|
||||
load_and_authorize_resource
|
||||
respond_to :html, :js
|
||||
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-top">
|
||||
<% if params[:unfeasible] %>
|
||||
Propuestas inviables
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="row margin-top">
|
||||
<div id="select-district" class="small-12 medium-7 column select-district">
|
||||
<div class="row">
|
||||
@@ -16,7 +22,8 @@
|
||||
<span id="<%= dom_id(heading) %>"
|
||||
class="<%= css_for_ballot_heading(heading) %>">
|
||||
<%= link_to heading.name,
|
||||
budget_investments_path(heading_id: heading.id),
|
||||
budget_investments_path(heading_id: heading.id,
|
||||
unfeasible: params[:unfeasible]),
|
||||
data: { no_turbolink: true } %><br>
|
||||
</span>
|
||||
<% end %>
|
||||
@@ -29,3 +36,10 @@
|
||||
<%= image_tag "map.jpg" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if params[:unfeasible].blank? %>
|
||||
<div class="row margin-top">
|
||||
<%= link_to t("budgets.investments.index.sidebar.unfeasible"),
|
||||
budget_path(@budget, unfeasible: 1) %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= back_link_to budget_group_path(@budget, @heading.group) %>
|
||||
<%= back_link_to budget_group_path(@budget, @heading.group, unfeasible: params[:unfeasible]) %>
|
||||
|
||||
<% if can? :show, @ballot %>
|
||||
<%= link_to t("budgets.investments.header.check_ballot"),
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
<%= render "shared/tag_cloud", taggable: 'budget/investment' %>
|
||||
<%= render 'budgets/investments/categories' %>
|
||||
<%= render 'budgets/investments/feasibility_link' %>
|
||||
|
||||
<% if @heading && can?(:show, @ballot) %>
|
||||
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
<table class="table-fixed">
|
||||
<thead>
|
||||
<th><%= t('budgets.show.group') %></th>
|
||||
<% if params[:unfeasible] %>
|
||||
Propuestas inviables
|
||||
<% end %>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @budget.groups.each do |group| %>
|
||||
@@ -48,10 +51,14 @@
|
||||
<td>
|
||||
<% if group.headings.count == 1 %>
|
||||
<%= link_to group.name,
|
||||
budget_investments_path(@budget, heading_id: group.headings.first.id),
|
||||
budget_investments_path(@budget,
|
||||
heading_id: group.headings.first.id,
|
||||
unfeasible: params[:unfeasible]),
|
||||
data: { no_turbolink: true } %>
|
||||
<% else %>
|
||||
<%= link_to group.name, budget_group_path(@budget, group) %>
|
||||
<%= link_to group.name,
|
||||
budget_group_path(@budget, group,
|
||||
unfeasible: params[:unfeasible]) %>
|
||||
<% end %>
|
||||
<br>
|
||||
</td>
|
||||
@@ -61,3 +68,10 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% unless params[:unfeasible] %>
|
||||
<div class="row margin-top">
|
||||
<%= link_to t("budgets.investments.index.sidebar.unfeasible"),
|
||||
budget_path(@budget, unfeasible: 1) %>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user