Files
nairobi/app/views/budgets/investments/milestones/_milestone.html.erb
iagirre 951d1c1695 Use a helper with yield Globalize.with_locale
A helper has been created to encapsule the logic
of Globalize.with_locale. Now, to call that function,
globalize(locale) do is called.
2018-05-09 16:07:21 +02:00

43 lines
1.2 KiB
Plaintext

<li>
<div class="milestone-content">
<% if milestone.publication_date.present? %>
<span class="milestone-date">
<strong>
<%= t("budgets.investments.show.milestone_publication_date",
publication_date: l(milestone.publication_date.to_date)) %>
</strong>
</span>
<% end %>
<% if milestone.image.present? %>
<%= image_tag(milestone.image_url(:large),
{ id: "image_#{milestone.id}",
alt: milestone.image.title,
class: "margin" }) %>
<% end %>
<p>
<% globalize(neutral_locale(locale)) do %>
<%= text_with_links milestone.description %>
<% end %>
</p>
<% if milestone.documents.present? %>
<div class="document-link text-center">
<p>
<span class="icon-document"></span>&nbsp;
<strong><%= t("shared.documentation") %></strong>
</p>
<% milestone.documents.each do |document| %>
<%= link_to document.title,
document.attachment.url,
target: "_blank",
rel: "nofollow" %><br>
<% end %>
</div>
<% end %>
</div>
</li>