.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', :"accept-charset" => "UTF-8"} - 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.