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

@@ -8,7 +8,6 @@ module Admin::BudgetHeadingsActions
before_action :load_budget
before_action :load_group
before_action :load_headings, only: :index
before_action :load_heading, only: [:edit, :update, :destroy]
end
@@ -51,10 +50,6 @@ module Admin::BudgetHeadingsActions
@group = @budget.groups.find_by_slug_or_id! params[:group_id]
end
def load_headings
@headings = @group.headings.order(:id)
end
def load_heading
@heading = @group.headings.find_by_slug_or_id! params[:id]
end