improves admin image partial
This commit is contained in:
@@ -32,7 +32,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<%= render 'images/admin_image', imageable: @poll, f: f %>
|
<div class="small-12 column">
|
||||||
|
<%= render 'images/admin_image', imageable: @poll, f: f %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="images small-12 column">
|
<div class="images">
|
||||||
<div>
|
<div>
|
||||||
<%= f.label :image, t("images.form.admin_title") %>
|
<%= f.label :image, t("images.form.admin_title") %>
|
||||||
|
|
||||||
<%= link_to_add_association t('images.form.add_new_image'), f, :image,
|
<%= link_to_add_association t('images.form.add_new_image'), f, :image,
|
||||||
force_non_association_create: true,
|
force_non_association_create: true,
|
||||||
partial: "images/image_fields",
|
partial: "images/image_fields",
|
||||||
@@ -14,12 +14,12 @@
|
|||||||
association_insertion_node: "#nested-image",
|
association_insertion_node: "#nested-image",
|
||||||
association_insertion_method: "append"
|
association_insertion_method: "append"
|
||||||
} %>
|
} %>
|
||||||
|
|
||||||
<%= render_image(f.object.image, :thumb, false) if f.object.image %>
|
<%= render_image(f.object.image, :thumb, false) if f.object.image %>
|
||||||
|
|
||||||
<div id="nested-image">
|
<div id="nested-image">
|
||||||
<%= f.fields_for :image do |image_builder| %>
|
<%= f.fields_for :image do |image_builder| %>
|
||||||
|
|
||||||
<div id="<%= dom_id(image_builder.object) %>" class="image direct-upload nested-fields">
|
<div id="<%= dom_id(image_builder.object) %>" class="image direct-upload nested-fields">
|
||||||
<%= image_builder.hidden_field :id %>
|
<%= image_builder.hidden_field :id %>
|
||||||
<%= image_builder.hidden_field :user_id, value: current_user.id %>
|
<%= image_builder.hidden_field :user_id, value: current_user.id %>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user