Merge pull request #2733 from consul/ui-design

UI design
This commit is contained in:
Alberto
2018-07-06 12:03:14 +02:00
committed by GitHub
8 changed files with 57 additions and 66 deletions

View File

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

View File

@@ -413,11 +413,6 @@ a {
text-transform: uppercase;
}
figure img {
height: 100%;
width: 100%;
}
// 02. Header
// ----------
@@ -2400,6 +2395,7 @@ table {
.carousel-image .orbit-wrapper img {
display: block;
height: rem-calc(120);
@include breakpoint(small) {
margin: 0 auto;
@@ -2705,6 +2701,11 @@ table {
z-index: 2;
}
}
figure img {
height: 100%;
width: 100%;
}
}
.feeds-list {

View File

@@ -1368,6 +1368,10 @@
}
}
.heading-name {
padding: $line-height / 2;
}
span {
color: $text;
display: block;

View File

@@ -72,7 +72,7 @@
<%= heading_name_and_price_html(heading, current_budget) %>
<% end %>
<% else %>
<div>
<div class="heading-name">
<%= heading_name_and_price_html(heading, current_budget) %>
</div>
<% end %>

View File

@@ -1,9 +1,9 @@
<h2>
<%= @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>
<div class="row collapse">
<div class="row expanded collapse margin-bottom">
<% @heading_filters.each_slice(8) do |slice| %>
<div class="small-12 medium-4 column select-heading">
<% slice.each do |filter| %>
@@ -18,37 +18,43 @@
<%= 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>
<thead>
<tr>
<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_heading_name") %></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>
<table>
<thead>
<tr>
<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_heading_name") %></th>
<th><%= t("valuation.budget_investments.index.table_actions") %></th>
</tr>
<% end %>
</tbody>
</table>
</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>
<% 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_heading_name: Heading name
table_actions: Actions
no_investments: "There are no investment projects."
show:
back: Back
title: Investment project

View File

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

View File

@@ -91,33 +91,6 @@ feature 'Admin budget investments' do
end
end
scenario 'Display valuator group assignments' do
budget_investment1 = create(:budget_investment, budget: budget)
budget_investment2 = create(:budget_investment, budget: budget)
budget_investment3 = create(:budget_investment, budget: budget)
health_group = create(:valuator_group, name: "Health")
culture_group = create(:valuator_group, name: "Culture")
budget_investment1.valuator_groups << health_group
budget_investment2.valuator_group_ids = [health_group.id, culture_group.id]
visit admin_budget_budget_investments_path(budget_id: budget)
within("#budget_investment_#{budget_investment1.id}") do
expect(page).to have_content("Health")
end
within("#budget_investment_#{budget_investment2.id}") do
expect(page).to have_content("Health")
expect(page).to have_content("Culture")
end
within("#budget_investment_#{budget_investment3.id}") do
expect(page).to have_content("No valuation groups assigned")
end
end
scenario "Filtering by budget heading", :js do
group1 = create(:budget_group, name: "Streets", budget: budget)
group2 = create(:budget_group, name: "Parks", budget: budget)