Add image into investment show and add some change of css.

This commit is contained in:
Alessandro Cuoghi
2017-06-22 13:29:09 +02:00
committed by Senén Rodero Rodríguez
parent 0925d33c5b
commit dd1e73c5fd
3 changed files with 32 additions and 10 deletions

View File

@@ -927,6 +927,23 @@
}
}
.budget-investment-show{
.image{
text-align: center;
}
p.title-image{
font-size: 1rem;
margin-top:1.25rem;
margin-bottom:0;
}
}
.edit_budget_investment{
.note-marked p{
margin-bottom:0;
}
}
.investment-project-show .supports,
.budget-investment-show .supports {
border: 0;

View File

@@ -17,7 +17,7 @@ class Budget
acts_as_paranoid column: :hidden_at
include ActsAsParanoidAliases
has_attached_file :image, styles: { large: "600x600>", medium: "300x300#", thumb: "140x245#" }
has_attached_file :image, styles: { large: "x475", medium: "300x300#", thumb: "140x245#" }
belongs_to :author, -> { with_hidden }, class_name: 'User', foreign_key: 'author_id'
belongs_to :heading

View File

@@ -21,13 +21,25 @@
<div class="budget-investment-info">
<%= render '/shared/author_info', resource: investment %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<%= l investment.created_at.to_date %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<%= investment.heading.name %>
</div>
<br>
<!-- TODO: ROCK&ROR: Markup rework accordingly to mockup definition -->
<% if investment.image.exists? %>
<div class="row columns image">
<%= image_tag investment.image.url(:large),
title: investment.image_title,
alt: investment.image_title %>
</div>
<p class="text-right title-image">
<em><%= investment.image_title %></em>
</p>
<hr>
<% end %>
<p id="investment_code">
<%= t("budgets.investments.show.code_html", code: investment.id) %>
</p>
@@ -44,13 +56,6 @@
</p>
<% end %>
<!-- TODO: ROCK&ROR: Markup rework accordingly to mockup definition -->
<% if investment.image.exists? %>
<%= image_tag investment.image.url(:large),
title: investment.image_title,
alt: investment.image_title %>
<% end %>
<%= render 'shared/tags', taggable: investment %>
<%= safe_html_with_links investment.description.html_safe %>