From 98549d8e61c6d8f146615390bb92f458e632dc9b Mon Sep 17 00:00:00 2001 From: kikito Date: Fri, 2 Dec 2016 20:10:22 +0100 Subject: [PATCH] Restores investment/_investment view --- .../budgets/investments/_investment.html.erb | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 app/views/budgets/investments/_investment.html.erb diff --git a/app/views/budgets/investments/_investment.html.erb b/app/views/budgets/investments/_investment.html.erb new file mode 100644 index 000000000..e21b6dc00 --- /dev/null +++ b/app/views/budgets/investments/_investment.html.erb @@ -0,0 +1,70 @@ +
+
+
+ +
+
+ + <% cache [locale_and_user_status(investment), 'index', investment, investment.author] do %> + <%= t("budget.investments.investment.title") %> + +

<%= link_to investment.title, namespaced_budget_investment_path(investment) %>

+

+ + <%= l investment.created_at.to_date %> + + <% if investment.author.hidden? || investment.author.erased? %> +  •  + + <%= t("budget.investments.show.author_deleted") %> + + <% else %> +  •  + + <%= investment.author.name %> + + <% if investment.author.official? %> +  •  + + <%= investment.author.official_position %> + + <% end %> + <% end %> + +  •  + <%= heading_name(investment.heading) %> +

+
+

<%= link_to investment.description, namespaced_budget_investment_path(investment) %>

+
+
+ <% end %> +
+
+ + <% unless investment.unfeasible? %> + + <% if investment.should_show_votes? %> + +
+ <%= render partial: '/budgets/investments/votes', locals: { + investment: investment, + investment_votes: investment_votes, + vote_url: vote_budget_investment_path(investment.budget, investment, value: 'yes') + } %> +
+ + <% elsif investment.should_show_ballots? %> + +
+ <%= render 'ballot', investment: investment %> +
+ + <% end %> + + <% end %> +
+
+