Allow attaching an image to budget phases
Co-authored-by: decabeza <alberto@decabeza.es>
This commit is contained in:
@@ -43,6 +43,13 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if feature?(:allow_images) %>
|
||||
<div class="images small-12 column">
|
||||
<%= render "images/nested_image", imageable: @phase, f: f %>
|
||||
<p class="help-text"><%= t("admin.budget_phases.edit.image_description") %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.submit t("admin.budget_phases.edit.save_changes"), class: "button success" %>
|
||||
</div>
|
||||
|
||||
@@ -43,9 +43,17 @@
|
||||
</div>
|
||||
|
||||
<div class="budget-phase">
|
||||
<h3><%= phase.name %></h3>
|
||||
<p><%= start_date(phase) %> - <%= end_date(phase) %></p>
|
||||
<%= auto_link_already_sanitized_html(wysiwyg(phase.description)) %>
|
||||
<div class="budget-phase-content">
|
||||
<h3><%= phase.name %></h3>
|
||||
<p><%= start_date(phase) %> - <%= end_date(phase) %></p>
|
||||
<%= auto_link_already_sanitized_html(wysiwyg(phase.description)) %>
|
||||
</div>
|
||||
|
||||
<% if phase.image.present? %>
|
||||
<div class="budget-phase-image">
|
||||
<%= image_tag phase.image.attachment.url(:large) %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user