first go at page view, list of sections, wip
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
%th.whitespace-nowrap.px-4.py-2.text-left.font-medium.text-gray-900
|
||||
Status
|
||||
%tbody.divide-y.divide-gray-200
|
||||
- @cms_pages.each do |cms_page|
|
||||
- @pages.each do |cms_page|
|
||||
%tr
|
||||
%td.whitespace-nowrap.px-4.py-2.text-gray-700
|
||||
= link_to cms_page.name , cms_page_path(cms_page.name)
|
18
app/views/cms/pages/show.haml
Normal file
18
app/views/cms/pages/show.haml
Normal file
@ -0,0 +1,18 @@
|
||||
%p#notice= notice
|
||||
|
||||
-@page.sections.each_with_index do |section , index|
|
||||
.grid.grid-cols-6.gap-4.m-8{class: (index%2)==1 ? 'bg-emerald-50/50' : 'bg-yellow-50/50' }
|
||||
.relative.block.border.border-gray-100
|
||||
=#image_tag("cms/#{file}" , class: "h-56 w-full object-contain lg:h-72")
|
||||
.p-6
|
||||
%h3.mt-4.text-lg.font-bold= section.template #PREVIEW here
|
||||
%button.mt-4.block.w-full.rounded-sm.bg-yellow-500.p-4.text-sm.font-medium{:type => "button"}
|
||||
=index #up down delete actions here
|
||||
-section.content.each do |key , value|
|
||||
.p-6
|
||||
%h3.mt-4.text-lg.font-bold= key.upcase
|
||||
%p= value
|
||||
|
||||
= link_to 'Edit', edit_cms_page_path(@page.name)
|
||||
\|
|
||||
= link_to 'Back', cms_pages_path
|
@ -1,6 +0,0 @@
|
||||
%p#notice= notice
|
||||
|
||||
|
||||
= link_to 'Edit', edit_cms_page_path(@cms_page.name)
|
||||
\|
|
||||
= link_to 'Back', cms_pages_path
|
Reference in New Issue
Block a user