Ability to attach an image to budgets
Co-authored-by: decabeza <alberto@decabeza.es>
This commit is contained in:
@@ -36,6 +36,13 @@
|
||||
<%= f.select :currency_symbol, currency_symbol_select_options %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if feature?(:allow_images) %>
|
||||
<div class="images small-12 column">
|
||||
<%= render "/images/nested_image", imageable: budget, f: f %>
|
||||
<p class="help-text"><%= t("admin.budgets.edit.image_description") %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
<div class="budget-header">
|
||||
<% if budget.image.present? %>
|
||||
<div class="budget-header with-background-image"
|
||||
style="background-image: url(<%= asset_url budget.image.attachment.url(:large) %>);">
|
||||
<% else %>
|
||||
<div class="budget-header">
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="small-12 column text-center">
|
||||
<span class="budget-title"><%= t("budgets.index.title") %></span>
|
||||
|
||||
Reference in New Issue
Block a user