finish image selection on section, polish image index

This commit is contained in:
2022-11-28 12:37:40 +02:00
parent 38caa2ea9a
commit 718ac49380
7 changed files with 56 additions and 42 deletions

View File

@ -1,10 +1,13 @@
.relative.block.border.border-gray-100
%h3.mt-4.text-lg.font-bold= key.upcase
%button.ml-3.inline-block.rounded-lg.bg-blue-500.px-5.py-3.text-sm.font-medium.text-white
=link_to "Update Image" , cms_page_section_select_image_url(@page.name,@section.id)
%button.ml-3.inline-block.rounded-lg.bg-blue-500.px-5.py-3.text-md.font-medium.text-white
=link_to "Change Image" , cms_page_section_select_image_url(@page.name,@section.id)
%button.ml-3.inline-block.rounded-lg.bg-red-500.px-5.py-3.text-md.font-medium.text-white
= link_to( "Remove image" , cms_page_section_set_image_path( @page.name, @section.id , image: ""))
.relative.block.border.border-gray-100
-if value
= image_tag "cms/" + value
-else
-if( value.blank? )
No image
-else
= image_tag( "cms/" + value)