add image details on card index

This commit is contained in:
Torsten 2022-12-30 22:25:32 +02:00
parent 43b7f1e1c9
commit 322a9b64a9

View File

@ -32,11 +32,17 @@
= card.updated_by
.basis-96
%h3.mt-4.text-lg.font-bold Image
-if( card.image.blank? )
%p No image
= 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
= image_for( card, "p-3")
%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