Groups and headings CRUD from budget view

Before, users needed to navigate to the list of groups in order to
add, edit or delete a group.

Also, they need to navigate to the list of groups first, and then to
the list of headings for that group in order to add, edit or delete a
heading.

Now, it's possible to do all these actions for any group or heading
from the participatory budget view to bring simplicity and to reduce
the number of clicks from a user perspective.

Co-Authored-By: Javi Martín <javim@elretirao.net>
This commit is contained in:
Julian Herrero
2020-03-24 07:20:22 +01:00
committed by Javi Martín
parent c8827f5c7f
commit 2b709f1a36
33 changed files with 309 additions and 223 deletions

View File

@@ -1,4 +1,4 @@
<%= back_link_to admin_budget_groups_path(@budget) %>
<%= back_link_to admin_budget_path(@budget) %>
<h2><%= @budget.name %></h2>

View File

@@ -1,11 +0,0 @@
<%= back_link_to admin_budgets_path, t("admin.budget_groups.index.back") %>
<div class="clear"></div>
<header>
<h2><%= @budget.name %></h2>
<%= link_to t("admin.budget_groups.form.create"), new_admin_budget_group_path %>
</header>
<%= render Admin::Budgets::HelpComponent.new("groups") %>
<%= render Admin::BudgetGroups::GroupsComponent.new(@groups) %>

View File

@@ -1,4 +1,4 @@
<%= back_link_to admin_budget_group_headings_path(@budget, @group) %>
<%= back_link_to admin_budget_path(@budget) %>
<h2><%= "#{@budget.name} / #{@group.name}" %></h2>

View File

@@ -1,9 +0,0 @@
<%= back_link_to admin_budget_groups_path(@budget), t("admin.budget_headings.index.back") %>
<header>
<h2><%= t("admin.budget_headings.index.title", budget: @budget.name, group: @group.name) %></h2>
<%= link_to t("admin.budget_headings.form.create"), new_admin_budget_group_heading_path %>
</header>
<%= render Admin::Budgets::HelpComponent.new("headings") %>
<%= render Admin::BudgetHeadings::HeadingsComponent.new(@headings) %>