<%% content_for :header do %> <%%= javascript_include_tag 'lightwindow' %> <%%= stylesheet_link_tag 'lightwindow' %> <%% end -%>

<%%= @<%= singular_name %>.new_record? ? 'New' : 'Editing' %> <%= singular_name %>

<%% form_for([:admin, @<%= singular_name %>]) do |f| %> <%%= f.error_messages %>

<%%= f.label :title %>
<%%= f.text_field :title, :class => 'title' %>

<% for attribute in attributes.reject{ |a| ['title', 'published_at', 'published_to', 'permalink' ].include?(a.name) } -%>

<%%= f.label :<%= attribute.name %> %>
<%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>

<% end -%> <%%= publish_select(f) %>

<%%= preview_link(@<%= singular_name %>) %> <%%= f.submit 'Publish', :name => '<%= singular_name %>[publish]' %> <%%= f.submit 'Save as draft', :name => '<%= singular_name %>[hide]' %> or <%%= link_to 'Back', admin_<%= plural_name %>_path %>

<%% end %>