diff options
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/blogs/_form.html.haml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/views/admin/blogs/_form.html.haml b/app/views/admin/blogs/_form.html.haml index f64ebe5..323d499 100644 --- a/app/views/admin/blogs/_form.html.haml +++ b/app/views/admin/blogs/_form.html.haml | |||
@@ -42,9 +42,13 @@ | |||
42 | .details-module.image-uploads | 42 | .details-module.image-uploads |
43 | %h4 Images | 43 | %h4 Images |
44 | - f.object.images.each do |image| | 44 | - f.object.images.each do |image| |
45 | = image_tag image.variant(:thumb) | 45 | - if image.representable? |
46 | = f.hidden_field :images, multiple: true, value: image.signed_id | 46 | = image_tag image.variant(:thumb) |
47 | %pre= rails_blob_url(image) | 47 | - else |
48 | = image.filename.to_s | ||
49 | - unless image.new_record? | ||
50 | = f.hidden_field :images, multiple: true, value: image.signed_id | ||
51 | %pre= rails_blob_url(image) | ||
48 | %hr | 52 | %hr |
49 | = f.file_field :images, multiple: true | 53 | = f.file_field :images, multiple: true |
50 | .details-module= f.submit | 54 | .details-module= f.submit |