Sha256: 07480a220110acff384e003260b7ae60a1011a6f85f116daf93e95ffa371e982

Contents?: true

Size: 1.47 KB

Versions: 1

Compression:

Stored size: 1.47 KB

Contents

- title "Edit: %s" % [ item.to_s ]

- content_for :tabs do
  != partial item, :tabs, :item => item, :model => item.class

- content_for :nav do
  - if item.children.any?
    - if item.parent.nil?
      != admin_back_to_dashboard

    - else
      %nav.back
        != link_to item.parent.path(:edit) do
          != admin_icon('page')
          = item.parent.to_s

    %nav.crumbs
      != link_to item.path(:edit) do
        != admin_icon('page')
        = item.to_s

    != partial item, :nav, :items => item.children, :parent => item

  - else
    - if item.parent?
      -# Show the parent's menu
      != yield_content_of item, :edit, :nav, { :item => item.parent }

    - else
      -# Show the main menu
      != yield_content_of 'admin/dashboard', :nav

- content_for :title do
  %h1= item

- content_for :toolbar do
  - if item.try(:parentable?)
    %li
      %a{:href => item.path(:new)} Create subpage
  %li
    %a.black{:href => '#submit'} Save

- content_for :body do
  != partial item, :crumbs, :item => item

  != partial item, :errors, :errors => item.errors

  .slim
    %form{:action => action, :method => 'post'}
      != partial item, :form, :item => item

      %p.submit
        %span.right
          - if item.try(:deletable?)
            %a{:href => item.path(:delete)} Delete this
            != "  |  "
          - if item.try(:renderable?)
            %a{:href => item.path, :target => 'preview'} View this

        %button{:type => 'submit'}
          %span Save

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aura-0.0.1.pre10 app/views/base/edit.haml