section image select and basic image show

This commit is contained in:
2022-12-19 09:45:47 +02:00
parent 0aca94cba2
commit 5654bb0743
7 changed files with 49 additions and 16 deletions

View File

@ -1,6 +1,6 @@
- content_for( :merged_menu ) do
.text-xl.font-bold.text-gray-900
All Images
= text_for_index
= render "layouts/merged_header"
- if Rails.env.development?

View File

@ -0,0 +1,7 @@
- content_for( :merged_menu ) do
.text-xl.font-bold.text-gray-900
Image #{@image.name}
= render "layouts/merged_header"
= image_tag(@image.asset_name)

View File

@ -19,7 +19,7 @@
%p No image
-else
= image_for( @section , "my-3")
= yellow_button("Change Image", section_select_image_url(@section.id))
= yellow_button("Change Image", images_url(section_id: @section.id))
= red_button( "Remove image", section_set_image_path( @section.id , image: ""))
.basis-80.grow