Fixes valuation budget investments ui

This commit is contained in:
decabeza
2018-06-26 12:06:21 +02:00
parent 4d0a5838a6
commit 2b958de992
4 changed files with 46 additions and 33 deletions

View File

@@ -27,6 +27,10 @@ $sidebar-active: #f4fcd0;
font-weight: 100; font-weight: 100;
margin-bottom: $line-height; margin-bottom: $line-height;
small {
color: $text-medium;
}
&.title { &.title {
text-transform: uppercase; text-transform: uppercase;
} }
@@ -634,6 +638,7 @@ $sidebar-active: #f4fcd0;
.admin-content .select-heading { .admin-content .select-heading {
a { a {
color: $text;
display: block; display: block;
&.is-active { &.is-active {

View File

@@ -1,9 +1,9 @@
<h2> <h2>
<%= @budget.name %> - <%= t("valuation.budget_investments.index.title") %> <%= @budget.name %> - <%= t("valuation.budget_investments.index.title") %>
<small><%= t('valuation.budget_investments.index.assigned_to', valuator: current_user.name) %></small> <small><%= t("valuation.budget_investments.index.assigned_to", valuator: current_user.name) %></small>
</h2> </h2>
<div class="row collapse"> <div class="row expanded collapse margin-bottom">
<% @heading_filters.each_slice(8) do |slice| %> <% @heading_filters.each_slice(8) do |slice| %>
<div class="small-12 medium-4 column select-heading"> <div class="small-12 medium-4 column select-heading">
<% slice.each do |filter| %> <% slice.each do |filter| %>
@@ -18,37 +18,43 @@
<%= render 'shared/filter_subnav', i18n_namespace: "valuation.budget_investments.index" %> <%= render 'shared/filter_subnav', i18n_namespace: "valuation.budget_investments.index" %>
<h3><%= page_entries_info @investments %></h3> <% if @investments.any? %>
<h3><%= page_entries_info @investments %></h3>
<table> <table>
<thead> <thead>
<tr> <tr>
<th><%= t("valuation.budget_investments.index.table_id") %></th> <th><%= t("valuation.budget_investments.index.table_id") %></th>
<th><%= t("valuation.budget_investments.index.table_title") %></th> <th><%= t("valuation.budget_investments.index.table_title") %></th>
<th><%= t("valuation.budget_investments.index.table_heading_name") %></th> <th><%= t("valuation.budget_investments.index.table_heading_name") %></th>
<th><%= t("valuation.budget_investments.index.table_actions") %></th> <th><%= t("valuation.budget_investments.index.table_actions") %></th>
</tr>
</thead>
<tbody>
<% @investments.each do |investment| %>
<tr id="<%= dom_id(investment) %>" class="budget_investment">
<td>
<strong><%= investment.id %></strong>
</td>
<td>
<%= link_to investment.title, valuation_budget_budget_investment_path(@budget, investment) %>
</td>
<td class="small">
<%= investment.heading.name %>
</td>
<td class="small">
<%= link_to t("valuation.budget_investments.index.edit"),
edit_valuation_budget_budget_investment_path(@budget, investment),
class: "button hollow expanded" %>
</td>
</tr> </tr>
<% end %> </thead>
</tbody> <tbody>
</table> <% @investments.each do |investment| %>
<tr id="<%= dom_id(investment) %>" class="budget_investment">
<td>
<strong><%= investment.id %></strong>
</td>
<td>
<%= link_to investment.title, valuation_budget_budget_investment_path(@budget, investment) %>
</td>
<td class="small">
<%= investment.heading.name %>
</td>
<td class="small">
<%= link_to t("valuation.budget_investments.index.edit"),
edit_valuation_budget_budget_investment_path(@budget, investment),
class: "button hollow expanded" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @investments %> <%= paginate @investments %>
<% else %>
<div class="callout primary">
<%= t("valuation.budget_investments.index.no_investments") %>
</div>
<% end %>

View File

@@ -35,6 +35,7 @@ en:
table_title: Title table_title: Title
table_heading_name: Heading name table_heading_name: Heading name
table_actions: Actions table_actions: Actions
no_investments: "There are no investment projects."
show: show:
back: Back back: Back
title: Investment project title: Investment project

View File

@@ -35,6 +35,7 @@ es:
table_title: Título table_title: Título
table_heading_name: Nombre de la partida table_heading_name: Nombre de la partida
table_actions: Acciones table_actions: Acciones
no_investments: "No hay proyectos de gasto."
show: show:
back: Volver back: Volver
title: Proyecto de gasto title: Proyecto de gasto