section template selection

This commit is contained in:
2022-11-29 20:03:48 +02:00
parent 6f6836630f
commit d1ecda07c4
6 changed files with 27 additions and 11 deletions

View File

@ -2,6 +2,6 @@
= render 'form'
= link_to 'Show', merged_page_url(@merged_page.name)
= link_to 'Show', page_url(@merged_page.name)
\|
= link_to 'Back', merged_pages_path
= link_to 'Back', pages_path

View File

@ -10,10 +10,10 @@
%tbody
- @merged_sections.each do |merged_section|
%tr
%td= link_to 'Show', merged_section
%td= link_to 'Edit', edit_merged_section_path(merged_section)
%td= link_to 'Destroy', merged_section, method: :delete, data: { confirm: 'Are you sure?' }
%td= link_to 'Show', section
%td= link_to 'Edit', edit_section_path(merged_section)
%td= link_to 'Destroy', section, method: :delete, data: { confirm: 'Are you sure?' }
%br
= link_to 'New Section', new_merged_section_path
= link_to 'New Section', new_section_path

View File

@ -2,4 +2,4 @@
= render 'form'
= link_to 'Back', merged_sections_path
= link_to 'Back', sections_path

View File

@ -0,0 +1,6 @@
.grid.grid-cols-4.gap-2.m-8
- @sections.each do |style|
.relative.block.border.border-gray-100
= link_to( page_section_set_template_path( template: style.template )) do
=image_tag(style.section_preview , class: "h-56 w-full object-contain lg:h-72")
= style.header

View File

@ -13,6 +13,6 @@
- @section.content.each do |key , value|
= render "merged/sections/editors/#{key}", section: @section , key: key , value: value
= #link_to 'Edit', edit_merged_section_path(@merged_section)
= #link_to 'Edit', edit_section_path(@merged_section)
\|
= #link_to 'Back', merged_sections_path
= #link_to 'Back', sections_path