Merge pull request #2539 from consul/admin-budget-investments

Admin budget investment info
This commit is contained in:
Raimond Garcia
2018-03-27 20:21:03 +02:00
committed by GitHub
7 changed files with 106 additions and 18 deletions

View File

@@ -1,50 +1,53 @@
<div class="callout primary float-right">
<%= t "admin.budget_investments.show.info", budget_name: @budget.name, group_name: @investment.group.name, id: @investment.id %>
<div class="extra-info float-right">
<%= t "admin.budget_investments.show.info",
budget_name: @budget.name,
group_name: @investment.group.name,
id: @investment.id %>
</div>
<br>
<h1 class="inline-block"><%= @investment.title %></h1>
<div class="row small-collapse spending-proposal-info">
<div class="row">
<div class="admin-budget-investment-info">
<div class="row expanded">
<div class="small-12 medium-4 column">
<p title="<%= t("admin.budget_investments.show.group") %>: <%= @investment.group.name %>">
<strong><%= t("admin.budget_investments.show.heading") %>:</strong>
<strong><%= t("admin.budget_investments.show.heading") %></strong>:
<%= @investment.heading.name %>
</p>
</div>
<div class="small-12 medium-4 column">
<p>
<strong><%= t("admin.budget_investments.show.by") %>:</strong>
<strong><%= t("admin.budget_investments.show.by") %></strong>:
<%= link_to @investment.author.name, admin_hidden_user_path(@investment.author) %>
</p>
</div>
<div class="small-12 medium-4 column">
<p>
<strong><%= t("admin.budget_investments.show.sent") %>:</strong>
<strong><%= t("admin.budget_investments.show.sent") %></strong>:
<%= l @investment.created_at, format: :datetime %>
</p>
</div>
</div>
<div class="row">
<div class="row expanded">
<div class="small-12 medium-4 column">
<p>
<strong><%= t("admin.budget_investments.show.compatibility.title") %>:</strong>
<strong><%= t("admin.budget_investments.show.compatibility.title") %></strong>:
<%= t("admin.budget_investments.show.compatibility.#{@investment.incompatible?}") %>
</p>
</div>
<div class="small-12 medium-4 column">
<p>
<strong><%= t("admin.budget_investments.show.selection.title") %>:</strong>
<strong><%= t("admin.budget_investments.show.selection.title") %></strong>:
<%= t("admin.budget_investments.show.selection.#{@investment.selected?}") %>
</p>
</div>
<div class="small-12 medium-4 column">
<p>
<strong><%= t("admin.budget_investments.show.winner.title") %>:</strong>
<strong><%= t("admin.budget_investments.show.winner.title") %></strong>:
<%= t("admin.budget_investments.show.winner.#{@investment.winner?}") %>
</p>
</div>
@@ -52,11 +55,38 @@
</div>
<% if @investment.external_url.present? %>
<p><%= text_with_links @investment.external_url %>&nbsp;<span class="icon-external small"></span></p>
<p>
<%= text_with_links @investment.external_url %>&nbsp;<span class="icon-external small"></span>
</p>
<% end %>
<%= safe_html_with_links @investment.description %>
<p>
<strong><%= t("admin.budget_investments.show.image") %></strong>:
<% if @investment.image.present? %>
<%= link_to t("admin.budget_investments.show.see_image"),
namespaced_budget_investment_path(@investment, {anchor: 'image'}),
target: "blank" %>
<% else %>
<%= t("admin.budget_investments.show.no_image") %>
<% end %>
</p>
<p>
<strong><%= t("admin.budget_investments.show.documents") %></strong>:
<% if @investment.documents.present? %>
<%= link_to t("admin.budget_investments.show.see_documents",
count: @investment.documents.count),
namespaced_budget_investment_path(@investment, {anchor: 'documents'}),
target: "blank" %>
<% else %>
<%= t("admin.budget_investments.show.no_documents") %>
<% end %>
</p>
<p id="user-tags">
<strong><%= t("admin.budget_investments.show.user_tags") %>: </strong>
<%= @investment.tag_list.sort.join(', ') %>

View File

@@ -1,4 +1,4 @@
<div class="documents">
<div id="documents" class="documents">
<h2><%= t("documents.title") %>&nbsp;<span>(<%= documents.count %>)</span></h2>
<% if documents.any? %>

View File

@@ -1,4 +1,4 @@
<div class="small-12 column text-center image-preview">
<div id="image" class="small-12 column text-center image-preview">
<figure>
<%= image_tag image.attachment.url(version),
class: image_class(image),