From 57ba414a34161c58e9a70c856995865cdec887f1 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 21 Jun 2017 19:50:04 +0200 Subject: [PATCH] Add button on Admin Budget edit form to call calculate winners if budget is reviewing_ballots --- app/views/admin/budgets/_form.html.erb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/views/admin/budgets/_form.html.erb b/app/views/admin/budgets/_form.html.erb index 5d323b45c..58a56d564 100644 --- a/app/views/admin/budgets/_form.html.erb +++ b/app/views/admin/budgets/_form.html.erb @@ -16,5 +16,15 @@ <%= f.select :currency_symbol, budget_currency_symbol_select_options %> - <%= f.submit nil, class: "button success" %> +
+ <%= f.submit nil, class: "button success" %> + <% if @budget.balloting_process? %> +
+ <%= link_to t("admin.budgets.winners.calculate"), + calculate_winners_admin_budget_path(@budget), + method: :put, + class: "button hollow" %> +
+ <% end %> +
<% end %>