Files
grecia/app/views/budgets/results/show.html.erb
2018-06-06 12:02:13 +02:00

90 lines
3.3 KiB
Plaintext

<% provide :title, t("budgets.results.page_title", budget: @budget.name) %>
<% content_for :meta_description do %><%= @budget.description_for_phase('finished') %><% end %>
<% provide :social_media_meta_tags do %>
<%= render "shared/social_media_meta_tags",
social_url: budget_results_url(@budget),
social_title: @budget.name,
social_description: @budget.description_for_phase('finished') %>
<% end %>
<% content_for :canonical do %>
<%= render "shared/canonical", href: budget_results_url(@budget) %>
<% end %>
<div class="budgets-stats">
<div class="expanded no-margin-top padding header">
<div class="row">
<div class="small-12 column">
<%= back_link_to budgets_path %>
<h2 class="margin-top">
<%= t("budgets.results.heading") %><br>
<span><%= @budget.name %></span>
</h2>
</div>
</div>
</div>
</div>
<div class="row margin-top">
<div class="small-12 column">
<ul class="tabs">
<li class="tabs-title is-active">
<span class="show-for-sr"><%= t("shared.you_are_in") %></span>
<%= link_to t("budgets.results.link"), budget_results_path(@budget), class: "is-active" %>
</li>
<li class="tabs-title">
<%# link_to t("budgets.stats.link"), budget_stats_path(@budget)%>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="small-12 medium-3 large-2 column">
<h3 class="margin-bottom">
<%= t("budgets.results.heading_selection_title") %>
</h3>
<ul class="menu vertical no-margin-top no-padding-top">
<% @budget.headings.order('id ASC').each do |heading| %>
<li>
<%= link_to heading.name,
budget_results_path(@budget, heading_id: heading.to_param),
class: heading.to_param == @heading.to_param ? 'is-active' : '' %>
</li>
<% end %>
</ul>
</div>
<div class="small-12 medium-9 large-10 column">
<%= link_to t("budgets.results.show_all_link"), "#",
class: "js-toggle-link button hollow margin-bottom float-right-medium",
data: {'toggle-selector' => '.js-discarded',
'toggle-text' => t("budgets.results.hide_discarded_link")} %>
<%= render 'results_table', results_type: :compatible,
title: @heading.name,
heading_price: @heading.price,
investments: @investments.compatible %>
<% if @investments.incompatible.present? %>
<%= render 'results_table', results_type: :incompatible,
title: t("budgets.results.incompatibles"),
heading_price: @heading.price,
investments: @investments.incompatible %>
<% end %>
<p>
<%= link_to budget_url(@budget) do %>
<small><%= t("budgets.results.investment_proyects") %></small>
<% end %><br>
<%= link_to budget_url(@budget, filter: 'unfeasible') do %>
<small><%= t("budgets.results.unfeasible_investment_proyects") %></small>
<% end %><br>
<%= link_to budget_url(@budget, filter: 'unselected') do %>
<small><%= t("budgets.results.not_selected_investment_proyects") %></small>
<% end %>
</p>
</div>
</div>