card template selection process
This commit is contained in:
@ -1,7 +0,0 @@
|
||||
%h1 Editing merged_section
|
||||
|
||||
= render 'form'
|
||||
|
||||
= link_to 'Show', @merged_section
|
||||
\|
|
||||
= link_to 'Back', merged_sections_path
|
@ -3,5 +3,7 @@
|
||||
%p= value
|
||||
%p #{section.content['cards'].length} cards
|
||||
%p view cards (index)
|
||||
%button.ml-3.inline-block.rounded-lg.bg-blue-500.px-5.py-3.text-md.font-medium.text-white
|
||||
=link_to "Change Card Template" , page_section_select_card_template_url(@page.name,@section.id)
|
||||
.relative.block.border.border-gray-100
|
||||
=image_tag("merged/card_preview/#{value}" , class: "w-full object-contain")
|
||||
|
6
app/views/merged/sections/select_card_template.haml
Normal file
6
app/views/merged/sections/select_card_template.haml
Normal file
@ -0,0 +1,6 @@
|
||||
.grid.grid-cols-4.gap-2.m-8
|
||||
- @cards.each do |style|
|
||||
.relative.block.border.border-gray-100
|
||||
= link_to( page_section_set_card_template_path( card_template: style.template )) do
|
||||
=image_tag(style.card_preview , class: "h-56 w-full object-contain lg:h-72")
|
||||
= style.header
|
@ -12,7 +12,3 @@
|
||||
.grid.grid-cols-2.gap-2.m-8
|
||||
- @section.content.each do |key , value|
|
||||
= render "merged/sections/editors/#{key}", section: @section , key: key , value: value
|
||||
|
||||
= #link_to 'Edit', edit_section_path(@merged_section)
|
||||
\|
|
||||
= #link_to 'Back', sections_path
|
||||
|
Reference in New Issue
Block a user