Merge pull request #3012 from consul/budgets-admin
[Backport] Budgets admin
This commit is contained in:
@@ -6,9 +6,10 @@
|
|||||||
|
|
||||||
<%= render 'shared/filter_subnav', i18n_namespace: "admin.budgets.index" %>
|
<%= render 'shared/filter_subnav', i18n_namespace: "admin.budgets.index" %>
|
||||||
|
|
||||||
<h3><%= page_entries_info @budgets %></h3>
|
<% if @budgets.any? %>
|
||||||
|
<h3><%= page_entries_info @budgets %></h3>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t("admin.budgets.index.table_name") %></th>
|
<th><%= t("admin.budgets.index.table_name") %></th>
|
||||||
@@ -41,6 +42,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<%= paginate @budgets %>
|
<%= paginate @budgets %>
|
||||||
|
<% else %>
|
||||||
|
<div class="callout primary">
|
||||||
|
<%= t("admin.budgets.index.no_budgets") %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ en:
|
|||||||
table_edit_budget: Edit
|
table_edit_budget: Edit
|
||||||
edit_groups: Edit headings groups
|
edit_groups: Edit headings groups
|
||||||
edit_budget: Edit budget
|
edit_budget: Edit budget
|
||||||
|
no_budgets: "There are no open budgets."
|
||||||
create:
|
create:
|
||||||
notice: New participatory budget created successfully!
|
notice: New participatory budget created successfully!
|
||||||
update:
|
update:
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ es:
|
|||||||
table_edit_budget: Editar
|
table_edit_budget: Editar
|
||||||
edit_groups: Editar grupos de partidas
|
edit_groups: Editar grupos de partidas
|
||||||
edit_budget: Editar presupuesto
|
edit_budget: Editar presupuesto
|
||||||
|
no_budgets: "No hay presupuestos abiertos."
|
||||||
create:
|
create:
|
||||||
notice: '¡Presupuestos participativos creados con éxito!'
|
notice: '¡Presupuestos participativos creados con éxito!'
|
||||||
update:
|
update:
|
||||||
|
|||||||
@@ -25,6 +25,12 @@ feature 'Admin budgets' do
|
|||||||
|
|
||||||
context 'Index' do
|
context 'Index' do
|
||||||
|
|
||||||
|
scenario 'Displaying no open budgets text' do
|
||||||
|
visit admin_budgets_path
|
||||||
|
|
||||||
|
expect(page).to have_content("There are no open budgets.")
|
||||||
|
end
|
||||||
|
|
||||||
scenario 'Displaying budgets' do
|
scenario 'Displaying budgets' do
|
||||||
budget = create(:budget)
|
budget = create(:budget)
|
||||||
visit admin_budgets_path
|
visit admin_budgets_path
|
||||||
@@ -119,7 +125,7 @@ feature 'Admin budgets' do
|
|||||||
click_link 'Delete budget'
|
click_link 'Delete budget'
|
||||||
|
|
||||||
expect(page).to have_content('Budget deleted successfully')
|
expect(page).to have_content('Budget deleted successfully')
|
||||||
expect(page).to have_content('budgets cannot be found')
|
expect(page).to have_content('There are no open budgets.')
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Try to destroy a budget with investments' do
|
scenario 'Try to destroy a budget with investments' do
|
||||||
|
|||||||
Reference in New Issue
Block a user