Merge pull request #2358 from consul/budgets-results-page

Budgets results page
This commit is contained in:
Alberto García
2018-01-22 20:05:52 +01:00
committed by GitHub
4 changed files with 32 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
<div class="small-12 medium-9 large-10 column <%= results_type == :compatible ? 'success' : 'js-discarded' %>"
<div class="<%= results_type == :compatible ? 'success' : 'js-discarded' %>"
style="<%= results_type != :compatible ? 'display: none' : '' %>"
id="<%= results_type %>-container">

View File

@@ -14,7 +14,7 @@
<div class="expanded no-margin-top padding header">
<div class="row">
<div class="small-12 column text-center">
<%= back_link_to budget_path(@budget) %>
<%= back_link_to budgets_path %>
<h1 class="title"><%= t("budgets.results.heading") %><br><%= @budget.name %></h1>
</div>
</div>
@@ -55,16 +55,29 @@
<span class="float-right"><%= link_to t("budgets.results.show_all_link"), "#", class: "js-toggle-link button hollow margin-bottom", data: {'toggle-selector' => '.js-discarded', 'toggle-text' => t("budgets.results.hide_discarded_link")} %></span>
<%= 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"),
<div class="small-12 medium-9 large-10 column">
<%= render 'results_table', results_type: :compatible,
title: @heading.name,
heading_price: @heading.price,
investments: @investments.incompatible %>
<% end %>
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>

View File

@@ -166,6 +166,9 @@ en:
accepted: "Accepted spending proposal: "
discarded: "Discarded spending proposal: "
incompatibles: Incompatibles
investment_proyects: List of all investment projects
unfeasible_investment_proyects: List of all unfeasible investment projects
not_selected_investment_proyects: List of all investment projects not selected for balloting
phases:
errors:
dates_range_invalid: "Start date can't be equal or later than End date"

View File

@@ -166,6 +166,9 @@ es:
accepted: 'Proyecto de gasto aceptado: '
discarded: 'Proyecto de gasto descartado: '
incompatibles: Incompatibles
investment_proyects: Ver lista completa de proyectos de gasto
unfeasible_investment_proyects: Ver lista de proyectos de gasto inviables
not_selected_investment_proyects: Ver lista de proyectos de gasto no seleccionados para la votación final
phases:
errors:
dates_range_invalid: "La fecha de comienzo no puede ser igual o superior a la de finalización"