Merge pull request #3012 from consul/budgets-admin

[Backport] Budgets admin
This commit is contained in:
Alberto
2018-11-07 11:07:38 +01:00
committed by GitHub
4 changed files with 50 additions and 36 deletions

View File

@@ -6,6 +6,7 @@
<%= render 'shared/filter_subnav', i18n_namespace: "admin.budgets.index" %>
<% if @budgets.any? %>
<h3><%= page_entries_info @budgets %></h3>
<table>
@@ -44,3 +45,8 @@
</table>
<%= paginate @budgets %>
<% else %>
<div class="callout primary">
<%= t("admin.budgets.index.no_budgets") %>
</div>
<% end %>

View File

@@ -87,6 +87,7 @@ en:
table_edit_budget: Edit
edit_groups: Edit headings groups
edit_budget: Edit budget
no_budgets: "There are no open budgets."
create:
notice: New participatory budget created successfully!
update:

View File

@@ -87,6 +87,7 @@ es:
table_edit_budget: Editar
edit_groups: Editar grupos de partidas
edit_budget: Editar presupuesto
no_budgets: "No hay presupuestos abiertos."
create:
notice: '¡Presupuestos participativos creados con éxito!'
update:

View File

@@ -25,6 +25,12 @@ feature 'Admin budgets' 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
budget = create(:budget)
visit admin_budgets_path
@@ -119,7 +125,7 @@ feature 'Admin budgets' do
click_link 'Delete budget'
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
scenario 'Try to destroy a budget with investments' do