Files
nairobi/app/views/budgets/groups/show.html.erb
Javi Martín 3cd2529791 Fix huge header in participatory budgets
The budget header was supposed to be huge, but only in the participatory
budgets index or show actions. It was still huge, with plenty of empty
space, when there was no budget, or in the "submit my ballot" and
"select a heading" pages.
2021-08-09 20:07:51 +02:00

72 lines
2.2 KiB
Plaintext

<% content_for :canonical do %>
<%= render "shared/canonical", href: budget_group_url(filter: @current_filter) %>
<% end %>
<main class="budget-group-show">
<header>
<%= back_link_to budget_path(@budget) %>
<h1><%= t("budgets.groups.show.title") %></h1>
</header>
<% 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 %>
</main>