Sha256: 00e3a45a9e018fbe2b38065c561a84e5fa28dfca749e6fce3038ba8a14eb1a75

Contents?: true

Size: 851 Bytes

Versions: 3

Compression:

Stored size: 851 Bytes

Contents

.form-view
  - packet["page.title"] = "Users > Edit"
  - if model
    - if resource.options[:sitemappable, false] 
      = orange[:sitemap, true].sitemap_links(packet, {:slug_me => orange[:sitemap, true].slug_for(model, props)})
    %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]))
      %fieldset
        %h4 Permission to Edit:
        - for site in sites
          %p
            #{site.name}
            %input{:type => 'checkbox', :name => "#{model_name}[sites][#{site.id}]", :value => site.id, :checked => (model.orange_sites.include?(site) ? 'checked' : nil)}
      %input{:type => 'submit', :value => 'Save Changes'}
  - 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/users/edit.haml
orange-sparkles-0.5.8 lib/orange-sparkles/views/users/edit.haml
orange-sparkles-0.5.7 lib/orange-sparkles/views/users/edit.haml