diff --git a/app/views/merged/cards/index.haml b/app/views/merged/cards/index.haml index 9cc4b77..fdd8205 100644 --- a/app/views/merged/cards/index.haml +++ b/app/views/merged/cards/index.haml @@ -32,11 +32,17 @@ = card.updated_by .basis-96 - %h3.mt-4.text-lg.font-bold Image - -if( card.image.blank? ) - %p No image - -else - = image_for( card, "p-3") + = link_to(merged.images_path(card_id: card.id)) do + -if card.image + %h3.mt-4.text-lg.font-bold Image #{card.image.name} + .flex.align-center.justify-between.mb-4 + .text-lg.font-bold.mt-2.mx-2 + = card.image.size.to_s + "k" + %strong.inline-block.rounded.bg-yellow-200.px-3.py-1.text-md.font-medium + = card.image.aspect_ratio + = image_for( card ) + -else + %h3.mt-4.text-lg.font-bold No Image .basis-72.grow %h3.mt-4.text-lg.font-bold Fields = form_tag( merged.card_path(card.id) , {method: :patch , class: "mx-auto mt-8 mb-0 max-w space-y-4" } ) do