Files
nairobi/app/views/budgets/groups/show.html.erb
Javi Martín 135e154fe3 Fix "go back" link in budget group and investments
Even if we usually only access these pages for the current budget, that
might not always be the case, and now that we've unified budget landing
pages, there's no point in them pointing to the index anymore.
2021-03-19 15:08:33 +01:00

74 lines
2.2 KiB
Plaintext

<% content_for :canonical do %>
<%= render "shared/canonical", href: budget_group_url(filter: @current_filter) %>
<% end %>
<div class="budget-header">
<div class="row">
<div class="small-12 medium-9 column">
<%= back_link_to budget_path(@budget) %>
<h2><%= t("budgets.groups.show.title") %></h2>
</div>
</div>
</div>
<% if @current_filter == "unfeasible" %>
<div class="row margin-top">
<div class="small-12 column">
<h3><%= t("budgets.groups.show.unfeasible_title") %></h3>
</div>
</div>
<% elsif @current_filter == "unselected" %>
<div class="row margin-top">
<div class="small-12 column">
<h3><%= t("budgets.groups.show.unselected_title") %></h3>
</div>
</div>
<% end %>
<div class="row margin">
<div id="headings" class="small-12 medium-7 column select-district">
<div class="row">
<% @group.headings.sort_by_name.each_slice(7) do |slice| %>
<div class="small-6 medium-4 column end">
<% slice.each do |heading| %>
<span id="<%= dom_id(heading) %>"
class="<%= css_for_ballot_heading(heading) %>">
<%= link_to heading.name,
budget_investments_path(heading_id: heading.id,
filter: @current_filter) %><br>
</span>
<% end %>
</div>
<% end %>
</div>
</div>
<div class="medium-5 column show-for-medium text-center">
<%= image_tag(image_path_for("map.jpg")) %>
</div>
</div>
<% if @budget.balloting_or_later? %>
<% unless @current_filter == "unfeasible" %>
<div class="row">
<div class="small-12 column">
<small>
<%= link_to t("budgets.groups.show.unfeasible"),
budget_group_path(@budget, @group, filter: "unfeasible") %>
</small>
</div>
</div>
<% end %>
<% unless @current_filter == "unselected" %>
<div class="row">
<div class="small-12 column">
<small>
<%= link_to t("budgets.groups.show.unselected"),
budget_group_path(@budget, @group, filter: "unselected") %>
</small>
</div>
</div>
<% end %>
<% end %>