Move phases and actions out of the budget form
Having links in the middle of a form distracts users from the task of filling in the form, and following a link before submitting the form will mean whatever has been filled in is lost. And the budgets form is already very long and hard to fill in. Having the phases table in the middle of it made it even harder. And, since we're planning to add the option to manage groups and headings from the same page, it's better to have a dedicated page for the form.
This commit is contained in:
@@ -15,7 +15,6 @@ class Admin::BudgetsController < Admin::BaseController
|
||||
end
|
||||
|
||||
def show
|
||||
render :edit
|
||||
end
|
||||
|
||||
def edit
|
||||
@@ -23,7 +22,7 @@ class Admin::BudgetsController < Admin::BaseController
|
||||
|
||||
def publish
|
||||
@budget.publish!
|
||||
redirect_to edit_admin_budget_path(@budget), notice: t("admin.budgets.publish.notice")
|
||||
redirect_to admin_budget_path(@budget), notice: t("admin.budgets.publish.notice")
|
||||
end
|
||||
|
||||
def calculate_winners
|
||||
@@ -38,7 +37,7 @@ class Admin::BudgetsController < Admin::BaseController
|
||||
|
||||
def update
|
||||
if @budget.update(budget_params)
|
||||
redirect_to admin_budgets_path, notice: t("admin.budgets.update.notice")
|
||||
redirect_to admin_budget_path(@budget), notice: t("admin.budgets.update.notice")
|
||||
else
|
||||
render :edit
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user