Sha256: 83dd1f69581650ba2921f24711f8c09d6e20a176da8810f47d4892b9f61426fc

Contents?: true

Size: 944 Bytes

Versions: 3

Compression:

Stored size: 944 Bytes

Contents

.form-view
  - if model
    %form{:action => packet.route_to(model_name, model[:id], 'save'), :method => 'post'}
      - for prop in props
        %p!= view_attribute(prop, model_name, :label => true, :value => model.attribute_get(prop[:name]), :model => model)
      %input{:type => 'submit', :value => 'Save Changes'}
    %form#move_me{:action => route_to(model_name, model[:id], 'into'), :method => 'post'}
      %p
        %label Move into:
        %select{:onchange => "$('#move_me').attr('action', $('#move_me').attr('action')+'/'+$(this).val()); $('#move_me').submit();"}
          %option{:disabled => true} Choose a page to move into
          - for link in orange[:sitemap].home(self).self_and_descendants
            %option{:value => link.id, :disabled => (model.lft <= link.lft && model.rgt >= link.rgt)}= ("&nbsp;&nbsp;"*link.level) + orange[:sitemap].link_text_for(link)
  - else
    %p Couldn't find the item you're looking for.

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
orange-sparkles-0.5.9 lib/orange-sparkles/views/sitemap/edit.haml
orange-sparkles-0.5.8 lib/orange-sparkles/views/sitemap/edit.haml
orange-sparkles-0.5.7 lib/orange-sparkles/views/sitemap/edit.haml