From 32b8736245a952cde63d508bcc84b61df97dd13a Mon Sep 17 00:00:00 2001 From: Torsten Date: Fri, 30 Dec 2022 21:12:04 +0200 Subject: [PATCH] removed old set image stuff --- app/views/merged/cards/select_image.haml | 17 ----------------- app/views/merged/sections/index.haml | 11 ++++++++--- app/views/merged/sections/select_image.haml | 17 ----------------- 3 files changed, 8 insertions(+), 37 deletions(-) delete mode 100644 app/views/merged/cards/select_image.haml delete mode 100644 app/views/merged/sections/select_image.haml diff --git a/app/views/merged/cards/select_image.haml b/app/views/merged/cards/select_image.haml deleted file mode 100644 index 107a437..0000000 --- a/app/views/merged/cards/select_image.haml +++ /dev/null @@ -1,17 +0,0 @@ -= render "layouts/merged_header" - -.grid.grid-cols-6.gap-2.m-8 - - content_for :hidden do - = hidden_field_tag :redirect , merged.card_set_image_path(@card.id,image: "NEW") - = form_tag(merged.images_path, multipart: true) do - = render "merged/images/new_image" - - -@images.each do |image| - .flex.flex-col.justify-start.border.rounded.border-gray-100.drop-shadow-lg - .flex.justify-between - .text-xl.m-2= image.name - %strong.inline-block.rounded.bg-yellow-50.px-2.py-3.text-md.font-medium - = aspect_ratio(image) - .p-2.object-contain - = link_to( merged.card_set_image_path( image: image.name)) do - =image_tag( image.asset_name ) diff --git a/app/views/merged/sections/index.haml b/app/views/merged/sections/index.haml index 427a669..d558411 100644 --- a/app/views/merged/sections/index.haml +++ b/app/views/merged/sections/index.haml @@ -56,12 +56,17 @@ =link_to merged.section_cards_path(section.id) do =card_preview(section , class: "object-contain") - else - = link_to(merged.section_select_image_path(section.id)) do - %h3.mt-4.text-lg.font-bold Image + = link_to(merged.images_path(section_id: section.id)) do -if section.image + %h3.mt-4.text-lg.font-bold Image #{section.image.name} + .flex.align-center.justify-between.mb-4 + .text-lg.font-bold.mt-2.mx-2 + = section.image.size.to_s + "k" + %strong.inline-block.rounded.bg-yellow-200.px-3.py-1.text-md.font-medium + = section.image.aspect_ratio = image_for( section , "h-40") -else - %p No image + %h3.mt-4.text-lg.font-bold No Image .basis-96 %h3.mt-4.text-lg.font-bold Options .grid.grid-cols-2.gap-3.mx-10 diff --git a/app/views/merged/sections/select_image.haml b/app/views/merged/sections/select_image.haml deleted file mode 100644 index d57e88f..0000000 --- a/app/views/merged/sections/select_image.haml +++ /dev/null @@ -1,17 +0,0 @@ -= render "layouts/merged_header" - -.grid.grid-cols-6.gap-2.m-8 - - content_for :hidden do - = hidden_field_tag :redirect , merged.section_set_image_path(@section.id,image: "NEW") - = form_tag(merged.images_path, multipart: true) do - = render "merged/images/new_image" - - -@images.each do |image| - .flex.flex-col.justify-start.border.rounded.border-gray-100.drop-shadow-lg - .flex.justify-between - .text-xl.m-2= image.name - %strong.inline-block.rounded.bg-yellow-50.px-2.py-3.text-md.font-medium - = aspect_ratio(image) - .p-2.object-contain - = link_to( merged.section_set_image_path( image: image.name)) do - =image_tag(image.asset_name )