A helper has been created to encapsule the logic of Globalize.with_locale. Now, to call that function, globalize(locale) do is called.
43 lines
1.2 KiB
Plaintext
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>
|
|
<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>
|