From e1367d4463ea578caba09012cde4fc5518b8dcc8 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 4 Jan 2017 13:52:04 +0100 Subject: [PATCH] improves table of admin budgets index --- app/views/admin/budgets/index.html.erb | 42 ++++++++++++++++++-------- config/locales/admin.en.yml | 11 +++++-- config/locales/admin.es.yml | 11 +++++-- 3 files changed, 47 insertions(+), 17 deletions(-) diff --git a/app/views/admin/budgets/index.html.erb b/app/views/admin/budgets/index.html.erb index d4de771db..7bf4b0659 100644 --- a/app/views/admin/budgets/index.html.erb +++ b/app/views/admin/budgets/index.html.erb @@ -6,23 +6,39 @@ <%= render 'shared/filter_subnav', i18n_namespace: "admin.budgets.index" %> -

<%= page_entries_info @budgets %>

- <% @budgets.each do |budget| %> - - - - + + + + + + + - <% end %> + + + <% @budgets.each do |budget| %> + + + + + + + + <% end %> +
- <%= link_to budget.name, admin_budget_budget_investments_path(budget_id: budget.id) %> - - <%= t("budget.phase.#{budget.phase}") %> - - <%= link_to t("admin.budgets.index.info_link"), admin_budget_path(budget) %> -
<%= t("admin.budgets.index.table_name") %><%= t("admin.budgets.index.table_phase") %><%= t("admin.budgets.index.table_investments") %><%= t("admin.budgets.index.table_edit_groups") %><%= t("admin.budgets.index.table_edit_budget") %>
+ <%= budget.name %> + + <%= t("budget.phase.#{budget.phase}") %> + + <%= link_to t("admin.budgets.index.budget_investments"), admin_budget_budget_investments_path(budget_id: budget.id) %> + + <%= link_to t("admin.budgets.index.edit_groups"), admin_budget_path(budget) %> + + <%= link_to t("admin.budgets.index.edit_budget"), edit_admin_budget_path(budget) %> +
<%= paginate @budgets %> \ No newline at end of file diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index 8f27677e7..e34c2183c 100755 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -62,10 +62,17 @@ en: index: title: Participatory budgets new_link: Create new budget - info_link: Info filters: - open: Open + current: Open finished: Finished + budget_investments: See budget investments + table_name: Name + table_phase: Phase + table_investments: Investments + table_edit_groups: Headings groups + table_edit_budget: Edit + edit_groups: Edit headings groups + edit_budget: Edit budget create: notice: New participatory budget created successfully! update: diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index 5f7f66ab6..8109251f1 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -62,10 +62,17 @@ es: index: title: Presupuestos participativos new_link: Crear nuevo presupuesto - info_link: Info filters: - open: Abiertos + current: Abiertos finished: Terminados + budget_investments: Ver propuestas de inversión + table_name: Nombre + table_phase: Fase + table_investments: Propuestas de inversión + table_edit_groups: Grupos de partidas + table_edit_budget: Editar + edit_groups: Editar grupos de partidas + edit_budget: Editar presupuesto create: notice: ¡Nueva campaña de presupuestos participativos creada con éxito! update: