Sha256: 39ca9a72e384b612855bfed98dd1fc4269672fe441ffc8d15d50501e7e1a6195
Contents?: true
Size: 1.11 KB
Versions: 3
Compression:
Stored size: 1.11 KB
Contents
.form-view - 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'} - packet["page.title"] = "#{model_name.to_s.capitalize} > Edit" - for prop in props %p!= view_attribute(prop, model_name, :label => true, :value => model.attribute_get(prop[:name])) - if prop[:name].to_s == "link" %p %label or link to existing page: %select.link %option{:disabled => true} Choose a page to link - for link in orange[:sitemap].home(self).self_and_descendants %option{:value => link.id}= (" "*link.level) + orange[:sitemap].link_text_for(link)[0..60] + '...' %br %input{:type => 'submit', :value => 'Save Changes'} :javascript $('form select.link').change(function(){ $("input[name*='news[link]']").val('['+$(this).val()+']'); }); - else %p Couldn't find the item you're looking for.
Version data entries
3 entries across 3 versions & 1 rubygems