1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00

Add pages show page.

This commit is contained in:
Dan Barber 2014-12-13 18:25:15 +00:00
parent 0bba99e627
commit ebecb060d8
5 changed files with 13 additions and 0 deletions

View File

@ -6,5 +6,6 @@
@import 'admin/flash'
@import 'admin/menu'
@import 'admin/photos'
@import 'admin/pages'
@import 'admin/simple_form'
@import 'admin/unlocks'

View File

@ -0,0 +1,2 @@
.page
max-width: 30em

View File

@ -12,6 +12,11 @@ class Admin::PagesController < Admin::AdminController
@page = Page.find(params[:id])
end
def show
page = Page.find(params[:id])
@page = PagePresenter.new(page)
end
def update
@page = Page.find(params[:id])

View File

@ -2,5 +2,6 @@
%td= page.name
%td= page.title
%td{ class: :actions }
= link_to 'Show', [:admin, page]
= link_to 'Edit', edit_admin_page_path(page)
= link_to 'Destroy', [:admin, page], confirm: 'Are you sure?', method: :delete

View File

@ -0,0 +1,4 @@
.page
%h2= @page.title
.content= @page.content_as_html