Add completed info on finished budgets
This commit is contained in:
24
app/assets/stylesheets/admin/budgets/index.scss
Normal file
24
app/assets/stylesheets/admin/budgets/index.scss
Normal file
@@ -0,0 +1,24 @@
|
||||
.admin .budgets-table {
|
||||
|
||||
.budget-completed {
|
||||
@include has-fa-icon(lock, solid);
|
||||
padding-left: calc(1em + #{rem-calc(10)});
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
color: $admin-border-color;
|
||||
left: rem-calc(4);
|
||||
position: absolute;
|
||||
transform: translateY(50%);
|
||||
}
|
||||
|
||||
span {
|
||||
color: $admin-text;
|
||||
display: block;
|
||||
font-size: $tiny-font-size;
|
||||
font-weight: bold;
|
||||
line-height: rem-calc(12);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
<% if @budgets.any? %>
|
||||
<h3><%= page_entries_info @budgets %></h3>
|
||||
|
||||
<table>
|
||||
<table class="budgets-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.budgets.index.table_name") %></th>
|
||||
@@ -20,8 +20,13 @@
|
||||
<tbody>
|
||||
<% @budgets.each do |budget| %>
|
||||
<tr id="<%= dom_id(budget) %>" class="budget">
|
||||
<td>
|
||||
<%= budget.name %>
|
||||
<td class="<%= "budget-completed" if budget.finished? %>">
|
||||
<% if budget.finished? %>
|
||||
<span>
|
||||
<%= t("admin.budgets.index.table_completed") %>
|
||||
</span>
|
||||
<% end %>
|
||||
<strong><%= budget.name %></strong>
|
||||
</td>
|
||||
<td class="small">
|
||||
<%= t("budgets.phase.#{budget.phase}") %>
|
||||
|
||||
@@ -75,6 +75,7 @@ en:
|
||||
finished: Finished
|
||||
help: "Participatory budgets allow citizens to propose and decide directly how to spend part of the budget, with monitoring and rigorous evaluation of proposals by the institution."
|
||||
budget_investments: Manage projects
|
||||
table_completed: Completed
|
||||
table_name: Name
|
||||
table_phase: Phase
|
||||
edit_groups: Edit headings groups
|
||||
|
||||
@@ -75,6 +75,7 @@ es:
|
||||
finished: Terminados
|
||||
help: "Los presupuestos participativos permiten que los ciudadanos propongan y decidan de manera directa cómo gastar parte del presupuesto, con un seguimiento y evaluación riguroso de las propuestas por parte de la institución."
|
||||
budget_investments: Gestionar proyectos de gasto
|
||||
table_completed: Completado
|
||||
table_name: Nombre
|
||||
table_phase: Fase
|
||||
edit_groups: Editar grupos de partidas
|
||||
|
||||
@@ -60,7 +60,11 @@ describe "Admin budgets", :admin do
|
||||
expect(page).to have_content(accepting_budget.name)
|
||||
expect(page).to have_content(selecting_budget.name)
|
||||
expect(page).to have_content(balloting_budget.name)
|
||||
expect(page).not_to have_content(finished_budget.name)
|
||||
expect(page).to have_content(finished_budget.name)
|
||||
|
||||
within "#budget_#{finished_budget.id}" do
|
||||
expect(page).to have_content("Completed")
|
||||
end
|
||||
|
||||
click_link "Finished"
|
||||
expect(page).not_to have_content(drafting_budget.name)
|
||||
|
||||
Reference in New Issue
Block a user