Add image into investment show and add some change of css.
This commit is contained in:
committed by
Senén Rodero Rodríguez
parent
0925d33c5b
commit
dd1e73c5fd
@@ -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,
|
.investment-project-show .supports,
|
||||||
.budget-investment-show .supports {
|
.budget-investment-show .supports {
|
||||||
border: 0;
|
border: 0;
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ class Budget
|
|||||||
acts_as_votable
|
acts_as_votable
|
||||||
acts_as_paranoid column: :hidden_at
|
acts_as_paranoid column: :hidden_at
|
||||||
include ActsAsParanoidAliases
|
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 :author, -> { with_hidden }, class_name: 'User', foreign_key: 'author_id'
|
||||||
belongs_to :heading
|
belongs_to :heading
|
||||||
|
|||||||
@@ -21,13 +21,25 @@
|
|||||||
|
|
||||||
<div class="budget-investment-info">
|
<div class="budget-investment-info">
|
||||||
<%= render '/shared/author_info', resource: investment %>
|
<%= render '/shared/author_info', resource: investment %>
|
||||||
|
|
||||||
<span class="bullet"> • </span>
|
<span class="bullet"> • </span>
|
||||||
<%= l investment.created_at.to_date %>
|
<%= l investment.created_at.to_date %>
|
||||||
<span class="bullet"> • </span>
|
<span class="bullet"> • </span>
|
||||||
<%= investment.heading.name %>
|
<%= investment.heading.name %>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<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">
|
<p id="investment_code">
|
||||||
<%= t("budgets.investments.show.code_html", code: investment.id) %>
|
<%= t("budgets.investments.show.code_html", code: investment.id) %>
|
||||||
</p>
|
</p>
|
||||||
@@ -44,13 +56,6 @@
|
|||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% 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 %>
|
<%= render 'shared/tags', taggable: investment %>
|
||||||
|
|
||||||
<%= safe_html_with_links investment.description.html_safe %>
|
<%= safe_html_with_links investment.description.html_safe %>
|
||||||
|
|||||||
Reference in New Issue
Block a user