
Untitled
By: a guest on Jan 28th, 2012 | syntax:
None | size: 0.60 KB | hits: 30 | expires: Never
%h1 Listing pages
%table
%tr
%th ID
%th Name
%th Page Name
%th Title
%th Parent
%th Page Type
%th{:colspan => 3} Actions
- Page.all.each do |page|
%tr
%td= h page.id
%td= h page.name
%td= h page.page_name
%td= h page.title
%td= h page.parent.nil? ? "n/a" : page.parent.page_name
%td= h PageType[page.page_type].display
%td{:class => :actions}
= link_to 'Show', page
|
= link_to 'Edit', edit_page_path(page)
|
= link_to 'Destroy', page, :confirm => 'Are you sure?', :method => :delete
%br
= link_to 'New page', new_page_path