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" %>
|
||||
|
||||
<h3><%= page_entries_info @budgets %></h3>
|
||||
<% if @budgets.any? %>
|
||||
<h3><%= page_entries_info @budgets %></h3>
|
||||
|
||||
<table>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.budgets.index.table_name") %></th>
|
||||
@@ -41,6 +42,11 @@
|
||||
</tr>
|
||||
<% end %>
|
||||
</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
|
||||
edit_groups: Edit headings groups
|
||||
edit_budget: Edit budget
|
||||
no_budgets: "There are no open budgets."
|
||||
create:
|
||||
notice: New participatory budget created successfully!
|
||||
update:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user