Moves views from one folder to another
This commit is contained in:
@@ -1,66 +1,90 @@
|
||||
<div id="<%= dom_id(investment) %>" class="budget-investment clear">
|
||||
<div class="panel">
|
||||
<div class="row">
|
||||
|
||||
<div class="small-12 medium-9 column">
|
||||
<div class="budget-investment-content">
|
||||
<section class="budget-investment-show" id="<%= dom_id(investment) %>">
|
||||
|
||||
<% cache [locale_and_user_status(investment), 'index', investment, investment.author] do %>
|
||||
<span class="label-budget-investment float-left"><%= t("budget.investments.investment.title") %></span>
|
||||
<span class="icon-budget"></span>
|
||||
<h3><%= link_to investment.title, namespaced_budget_investment_path(investment) %></h3>
|
||||
<p class="investment-project-info">
|
||||
<ul class="breadcrumbs">
|
||||
<li><%= link_to investment.budget.name, budget_path(investment.budget) %></a></li>
|
||||
<li><%= investment.group.name %></a></li>
|
||||
<li><%= investment.heading.name %></a></li>
|
||||
</ul>
|
||||
|
||||
<%= l investment.created_at.to_date %>
|
||||
<div id="<%= dom_id(investment) %>" class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= link_to :back, class: "back" do %>
|
||||
<span class="icon-angle-left"></span>
|
||||
<%= t("shared.back") %>
|
||||
<% end %>
|
||||
|
||||
<% if investment.author.hidden? || investment.author.erased? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= t("budget.investments.show.author_deleted") %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="author">
|
||||
<%= investment.author.name %>
|
||||
</span>
|
||||
<% if investment.author.official? %>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round level-<%= investment.author.official_level %>">
|
||||
<%= investment.author.official_position %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h1><%= investment.title %></h1>
|
||||
|
||||
<span class="bullet"> • </span>
|
||||
<%= heading_name(investment.heading) %>
|
||||
</p>
|
||||
<div class="investment-project-description">
|
||||
<p><%= link_to investment.description, namespaced_budget_investment_path(investment) %></p>
|
||||
<div class="truncate"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="budget-investment-info">
|
||||
<%= render '/shared/author_info', resource: investment %>
|
||||
|
||||
<span class="bullet"> • </span>
|
||||
<%= l investment.created_at.to_date %>
|
||||
<span class="bullet"> • </span>
|
||||
<%= heading_name(investment.heading) %>
|
||||
</div>
|
||||
|
||||
<% unless investment.unfeasible? %>
|
||||
<br>
|
||||
<p id="investment_code">
|
||||
<%= t("budget.investments.show.code") %>
|
||||
<strong><%= investment.id %></strong>
|
||||
</p>
|
||||
|
||||
<% if @budget.selecting? || @budget.on_hold? %>
|
||||
<%= safe_html_with_links investment.description.html_safe %>
|
||||
|
||||
<div id="<%= dom_id(investment) %>_votes"
|
||||
class="small-12 medium-3 column text-center">
|
||||
<%= render 'votes',
|
||||
{ investment: investment,
|
||||
vote_url: vote_budget_investment_path(@budget, investment, value: 'yes') } %>
|
||||
</div>
|
||||
<% if investment.external_url.present? %>
|
||||
<div class="document-link">
|
||||
<%= text_with_links investment.external_url %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% elsif @budget.balloting? %>
|
||||
<div id="<%= dom_id(investment) %>_ballot"
|
||||
class="small-12 medium-3 column text-center">
|
||||
<%= render 'ballot', investment: investment %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if investment.unfeasible? && investment.unfeasibility_explanation.present? %>
|
||||
<h2><%= t('budget.investments.show.unfeasibility_explanation') %></h2>
|
||||
<p><%= investment.unfeasibility_explanation %></p>
|
||||
<% end %>
|
||||
|
||||
<% if investment.feasible? && investment.price_explanation.present? %>
|
||||
<h2><%= t('budget.investments.show.price_explanation') %></h2>
|
||||
<p><%= investment.price_explanation %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if investment.should_show_aside? %>
|
||||
<aside class="small-12 medium-3 column">
|
||||
<div class="sidebar-divider"></div>
|
||||
<h3><%= t("votes.supports") %></h3>
|
||||
<div class="text-center">
|
||||
|
||||
<% if investment.should_show_votes? %>
|
||||
<div id="<%= dom_id(investment) %>_votes">
|
||||
<%= render partial: '/budgets/investments/votes', locals: {
|
||||
investment: investment,
|
||||
investment_votes: investment_votes,
|
||||
vote_url: vote_budget_investment_path(investment.budget, investment, value: 'yes')
|
||||
} %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div id="<%= dom_id(investment) %>_ballot">
|
||||
<%= render 'ballot', investment: investment %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-divider"></div>
|
||||
<h3><%= t("budget.investments.show.share") %></h3>
|
||||
<div class="social-share-full">
|
||||
<%= social_share_button_tag("#{investment.title} #{setting['twitter_hashtag']}") %>
|
||||
<% if browser.device.mobile? %>
|
||||
<a href="whatsapp://send?text=<%= investment.title %> <%= budget_investment_url(budget_id: investment.budget_id, id: investment.id) %>" data-action="share/whatsapp/share">
|
||||
<span class="icon-whatsapp whatsapp"></span>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</aside>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
<% provide :title do %><%= @investment.title %><% end %>
|
||||
|
||||
<section class="budget-investment-show">
|
||||
|
||||
<ul class="breadcrumbs">
|
||||
<li><%= link_to @investment.budget.name, budget_path(@investment.budget) %></a></li>
|
||||
<li><%= @investment.group.name %></a></li>
|
||||
<li><%= @investment.heading.name %></a></li>
|
||||
</ul>
|
||||
|
||||
<div id="<%= dom_id(@investment) %>" class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= link_to :back, class: "back" do %>
|
||||
<span class="icon-angle-left"></span>
|
||||
<%= t("shared.back") %>
|
||||
<% end %>
|
||||
|
||||
<h1><%= @investment.title %></h1>
|
||||
|
||||
<div class="budget-investment-info">
|
||||
<%= render '/shared/author_info', resource: @investment %>
|
||||
|
||||
<span class="bullet"> • </span>
|
||||
<%= l @investment.created_at.to_date %>
|
||||
<span class="bullet"> • </span>
|
||||
<%= heading_name(@investment.heading) %>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<p id="investment_code">
|
||||
<%= t("budget.investments.show.code") %>
|
||||
<strong><%= @investment.id %></strong>
|
||||
</p>
|
||||
|
||||
<%= safe_html_with_links @investment.description.html_safe %>
|
||||
|
||||
<% if @investment.external_url.present? %>
|
||||
<div class="document-link">
|
||||
<%= text_with_links @investment.external_url %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @investment.unfeasible? && @investment.unfeasibility_explanation.present? %>
|
||||
<h2><%= t('budget.investments.show.unfeasibility_explanation') %></h2>
|
||||
<p><%= @investment.unfeasibility_explanation %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @investment.feasible? && @investment.price_explanation.present? %>
|
||||
<h2><%= t('budget.investments.show.price_explanation') %></h2>
|
||||
<p><%= @investment.price_explanation %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if (@investment.budget.selecting? && !@investment.unfeasible?) ||
|
||||
(@investment.budget.balloting? && @investment.feasible? ||
|
||||
(@investment.budget.on_hold?)) %>
|
||||
<aside class="small-12 medium-3 column">
|
||||
<div class="sidebar-divider"></div>
|
||||
<h3><%= t("votes.supports") %></h3>
|
||||
<div class="text-center">
|
||||
|
||||
<% if @investment.budget.selecting? || @investment.budget.on_hold? %>
|
||||
<div id="<%= dom_id(@investment) %>_votes">
|
||||
<%= render 'votes',
|
||||
{ investment: @investment,
|
||||
vote_url: vote_budget_investment_path(@investment.budget, @investment, value: 'yes') }
|
||||
%>
|
||||
</div>
|
||||
<% else %>
|
||||
<div id="<%= dom_id(@investment) %>_ballot">
|
||||
<%= render 'ballot', investment: @investment %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-divider"></div>
|
||||
<h3><%= t("budget.investments.show.share") %></h3>
|
||||
<div class="social-share-full">
|
||||
<%= social_share_button_tag("#{@investment.title} #{setting['twitter_hashtag']}") %>
|
||||
<% if browser.device.mobile? %>
|
||||
<a href="whatsapp://send?text=<%= @investment.title %> <%= budget_investment_url(budget_id: @investment.budget.id, id: @investment.id) %>" data-action="share/whatsapp/share">
|
||||
<span class="icon-whatsapp whatsapp"></span>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</aside>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<% unless namespace == 'management' %>
|
||||
<%= render "budgets/investments/comments" %>
|
||||
<% end %>
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="small-12 medium-9 column end">
|
||||
<h1 class=""><%= t("management.budget_investments.create") %></h1>
|
||||
|
||||
<%= 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 %>
|
||||
|
||||
<div class="row">
|
||||
@@ -1,9 +1,9 @@
|
||||
<main>
|
||||
<div class="row">
|
||||
<div id="investment-projects" class="investment-projects-list small-12 column">
|
||||
<div id="budget-investments" class="budget-investments-list small-12 column">
|
||||
|
||||
<div class="not-print">
|
||||
<%= 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 %>
|
||||
<div class="small-12 medium-4 column float-left">
|
||||
<%= select_tag :geozone,
|
||||
options_for_select(geozone_select_options.unshift([t("geozones.none"), "all"]), params[:geozone]),
|
||||
Reference in New Issue
Block a user