Created
March 16, 2012 10:31
-
-
Save egrouse/2049481 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%section#unit-settings | |
%h1 | |
= "Editing Unit: #{@unit.name}" | |
%a{ :href => '#', :class => 'toggle-box', :rel => 'unit-settings' } Hide | |
.box | |
= form_for @unit, :url => edit_unit_path( @unit ), :html => { :multipart => true } do |f| | |
.field | |
= f.label :name | |
= f.text_field :name | |
.field | |
= f.label :colour | |
= f.text_field :colour | |
.field | |
= f.label :description | |
= f.cktext_area :description, :width => 800, :height => 150 | |
.field | |
= f.label :header | |
= f.file_field :header | |
= image_tag @unit.header.url(:full) | |
.field.submit | |
= f.submit @smb_str | |
%section#unit-pages | |
%h1 | |
Pages within this unit | |
%a{ :href => '#', :class => 'toggle-box', :rel => 'unit-pages' } Hide | |
.box | |
%table.list | |
%tr | |
%th ID | |
%th Name | |
%th Type | |
%th Navigation Priority | |
%th Edit | |
%th Delete | |
- @unit.pages.order( 'priority asc' ).each do |page| | |
%tr | |
%td= page.id | |
%td= page.title | |
%td= PageType.where( :value => page.page_type ).first.name | |
%td= page.priority | |
%td= link_to 'Edit', edit_page_url(@unit.id, page.alias) | |
%td= link_to 'Delete', delete_page_url(@unit.id, page.alias) | |
.right#user-nav | |
= link_to 'Add New Page', new_page_url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment