diff --git a/app/views/budgets/investments/_investment.html.erb b/app/views/budgets/investments/_investment.html.erb index 773f11929..bc451ff3b 100644 --- a/app/views/budgets/investments/_investment.html.erb +++ b/app/views/budgets/investments/_investment.html.erb @@ -1,66 +1,90 @@ -
-
-
-
-
+
- <% 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 %> +
+
+ <%= link_to :back, class: "back" do %> + + <%= t("shared.back") %> + <% end %> - <% 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 %> +

<%= investment.title %>

-  •  - <%= heading_name(investment.heading) %> -

-
-

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

-
-
- <% end %> -
+
+ <%= render '/shared/author_info', resource: investment %> + +  •  + <%= l investment.created_at.to_date %> +  •  + <%= heading_name(investment.heading) %>
- <% unless investment.unfeasible? %> +
+

+ <%= t("budget.investments.show.code") %> + <%= investment.id %> +

- <% if @budget.selecting? || @budget.on_hold? %> + <%= safe_html_with_links investment.description.html_safe %> -
- <%= render 'votes', - { investment: investment, - vote_url: vote_budget_investment_path(@budget, investment, value: 'yes') } %> -
+ <% if investment.external_url.present? %> + + <% end %> - <% elsif @budget.balloting? %> -
- <%= render 'ballot', investment: investment %> -
- <% end %> + <% if investment.unfeasible? && investment.unfeasibility_explanation.present? %> +

<%= t('budget.investments.show.unfeasibility_explanation') %>

+

<%= investment.unfeasibility_explanation %>

+ <% end %> + <% if investment.feasible? && investment.price_explanation.present? %> +

<%= t('budget.investments.show.price_explanation') %>

+

<%= investment.price_explanation %>

<% end %>
+ + <% if investment.should_show_aside? %> + + <% end %> +
-
+ + + diff --git a/app/views/budgets/investments/show.html.erb b/app/views/budgets/investments/show.html.erb deleted file mode 100644 index f27daf0f7..000000000 --- a/app/views/budgets/investments/show.html.erb +++ /dev/null @@ -1,94 +0,0 @@ -<% provide :title do %><%= @investment.title %><% end %> - -
- - - -
-
- <%= link_to :back, class: "back" do %> - - <%= t("shared.back") %> - <% end %> - -

<%= @investment.title %>

- -
- <%= render '/shared/author_info', resource: @investment %> - -  •  - <%= l @investment.created_at.to_date %> -  •  - <%= heading_name(@investment.heading) %> -
- -
-

- <%= t("budget.investments.show.code") %> - <%= @investment.id %> -

- - <%= safe_html_with_links @investment.description.html_safe %> - - <% if @investment.external_url.present? %> - - <% end %> - - <% if @investment.unfeasible? && @investment.unfeasibility_explanation.present? %> -

<%= t('budget.investments.show.unfeasibility_explanation') %>

-

<%= @investment.unfeasibility_explanation %>

- <% end %> - - <% if @investment.feasible? && @investment.price_explanation.present? %> -

<%= t('budget.investments.show.price_explanation') %>

-

<%= @investment.price_explanation %>

- <% end %> -
- - <% if (@investment.budget.selecting? && !@investment.unfeasible?) || - (@investment.budget.balloting? && @investment.feasible? || - (@investment.budget.on_hold?)) %> - - <% end %> - -
-
- -<% unless namespace == 'management' %> - <%= render "budgets/investments/comments" %> -<% end %> diff --git a/app/views/budgets/investments/_comments.html.erb b/app/views/comments/_commentable_tree.html.erb similarity index 100% rename from app/views/budgets/investments/_comments.html.erb rename to app/views/comments/_commentable_tree.html.erb diff --git a/app/views/management/budget_investments/new.html.erb b/app/views/management/budgets/investments/new.html.erb similarity index 95% rename from app/views/management/budget_investments/new.html.erb rename to app/views/management/budgets/investments/new.html.erb index f51fe3ffb..d761f81a3 100644 --- a/app/views/management/budget_investments/new.html.erb +++ b/app/views/management/budgets/investments/new.html.erb @@ -7,7 +7,7 @@

<%= t("management.budget_investments.create") %>

- <%= form_for(@investment, url: management_budget_investments_path, method: :post) do |f| %> + <%= form_for(@investment, url: management_budgets_investments_path, method: :post) do |f| %> <%= render 'shared/errors', resource: @investment %>
diff --git a/app/views/management/budget_investments/print.html.erb b/app/views/management/budgets/investments/print.html.erb similarity index 88% rename from app/views/management/budget_investments/print.html.erb rename to app/views/management/budgets/investments/print.html.erb index 785202e1c..a80f7d673 100644 --- a/app/views/management/budget_investments/print.html.erb +++ b/app/views/management/budgets/investments/print.html.erb @@ -1,9 +1,9 @@
-
+
- <%= form_tag print_management_budget_investments_path, method: :get, enforce_utf8: false do %> + <%= form_tag print_management_budgets_investments_path, method: :get, enforce_utf8: false do %>
<%= select_tag :geozone, options_for_select(geozone_select_options.unshift([t("geozones.none"), "all"]), params[:geozone]), diff --git a/app/views/management/budget_investments/vote.js.erb b/app/views/management/budgets/investments/vote.js.erb similarity index 100% rename from app/views/management/budget_investments/vote.js.erb rename to app/views/management/budgets/investments/vote.js.erb