Files
nairobi/app/components/images/fields_component.html.erb
Javi Martín 21fee9cff5 Simplify method names in image/document fields
We were using long, unique names because these methods used to be helper
methods. Helper methods should have unique names because otherwise one
method would overwrite the other.

Now that we're using components, we can omit the `image_` and
`document_` prefixes.
2021-07-13 16:58:13 +02:00

31 lines
901 B
Plaintext

<div id="<%= dom_id(image) %>" class="image direct-upload nested-fields">
<%= f.hidden_field :id %>
<%= f.hidden_field :user_id, value: current_user.id %>
<%= f.hidden_field :cached_attachment %>
<div class="small-12 margin-top title">
<%= f.text_field :title, placeholder: t("images.form.title_placeholder") %>
</div>
<%= render_image(image, :thumb, false) if image.attachment.exists? %>
<div class="small-12 column attachment-actions">
<div class="small-9 column action-add attachment-errors image-attachment">
<%= file_field %>
</div>
<div class="small-3 column action-remove text-right">
<%= destroy_link %>
</div>
</div>
<div class="small-6 column">
<p class="file-name"><%= file_name %></p>
</div>
<div class="small-12 column">
<div class="progress-bar-placeholder"><div class="loading-bar"></div></div>
</div>
<hr>
</div>