diff --git a/app/controllers/admin/budgets_controller.rb b/app/controllers/admin/budgets_controller.rb index 02894240e..2e8a28fe6 100644 --- a/app/controllers/admin/budgets_controller.rb +++ b/app/controllers/admin/budgets_controller.rb @@ -8,6 +8,9 @@ class Admin::BudgetsController < Admin::BaseController @budgets = Budget.send(@current_filter).order(created_at: :desc).page(params[:page]) end + def show + end + def new @budget = Budget.new end @@ -15,7 +18,7 @@ class Admin::BudgetsController < Admin::BaseController def create @budget = Budget.new(budget_params) if @budget.save - redirect_to admin_budgets_path, notice: t('admin.budgets.create.notice') + redirect_to admin_budget_path(@budget), notice: t('admin.budgets.create.notice') else render :new end diff --git a/app/views/admin/budgets/new.html.erb b/app/views/admin/budgets/new.html.erb index c7985b98f..019ca460f 100644 --- a/app/views/admin/budgets/new.html.erb +++ b/app/views/admin/budgets/new.html.erb @@ -26,5 +26,4 @@ " class="button success"> <% end %> - - + \ No newline at end of file diff --git a/app/views/admin/budgets/show.html.erb b/app/views/admin/budgets/show.html.erb new file mode 100644 index 000000000..20185b2ba --- /dev/null +++ b/app/views/admin/budgets/show.html.erb @@ -0,0 +1,12 @@ +
+ <%= t('admin.budgets.show.phase') %>: <%= t("budget.phase.#{@budget.phase}") %> | + <%= t('admin.budgets.show.currency') %>: <%= @budget.currency_symbol %> +
+