diff --git a/app/controllers/budgets/results_controller.rb b/app/controllers/budgets/results_controller.rb index d92232f67..8da1e9ef7 100644 --- a/app/controllers/budgets/results_controller.rb +++ b/app/controllers/budgets/results_controller.rb @@ -5,7 +5,8 @@ module Budgets def show authorize! :read_results, @budget - @result = load_result + @investments = load_result.investments + @heading = heading end private @@ -19,4 +20,4 @@ module Budgets end end -end \ No newline at end of file +end diff --git a/app/views/budgets/results/_results_table.html.erb b/app/views/budgets/results/_results_table.html.erb index 9c40a1d22..993060562 100644 --- a/app/views/budgets/results/_results_table.html.erb +++ b/app/views/budgets/results/_results_table.html.erb @@ -1,14 +1,10 @@ -
| @@ -20,23 +16,19 @@ | <%= t("budgets.results.price") %> | -
- <%= format_price(heading.price) %> - <%= t("budgets.results.amount_available") %> - |
+ <% if results_type == :compatible %>
+
+ <%= format_price(heading_price) %> + <%= t("budgets.results.amount_available") %> + |
+ <% end %>
|
|---|---|---|---|---|
| <% if investment.winner? %> @@ -51,8 +43,7 @@ <% end %> - <%= link_to investment.title, - budget_investment_path(@budget, investment) %> + <%= link_to investment.title, budget_investment_path(@budget, investment) %> | <%= investment.ballot_lines_count %> @@ -60,11 +51,13 @@ | <%= format_price investment.price %> | -- <%= format_price amount_available - investment.price %> - <% amount_available -= investment.price if investment.winner? %> - | + <% if results_type == :compatible %> ++ <%= format_price amount_available - investment.price %> + <% amount_available -= investment.price if investment.winner? %> + | + <% end %>