<% form_for :article, @article, :url => skyline_article_path(@article), :html => {:method => :put, :id => "page_form"} do |a| %>
<% a.fields_for :variants_attributes, @variant, :index => 1 do |v| %> <% v.fields_for :data_attributes, v.object.data do |vd| %>
<%= hidden_field_tag :clone_variant, "0" %> <%= v.hidden_field :id %> <%= v.hidden_field :version %> <%= vd.hidden_field :id %> <%= vd.hidden_field :class, :value => a.object.data_class.name if vd.object.new_record? %> <%= a.object.class.human_name %>: <%= vd.object.title %>
<% begin %> <% content = capture do %>
<%= render :partial => "skyline/articles/#{a.object.class.name.demodulize.underscore}/header", :locals => {:a => a, :v => v, :vd => vd} %>
<% end %> <% rescue ActionView::MissingTemplate %> <% content = "" %> <% end %> <%= content %>
<% menu_button t(:add_section, :scope => [:article, :edit]), :id => "add_section_button" do %>
    <% Skyline::Renderer.renderables(:sections, a.object.class).each do |section| %>
  • <%= link_to_remote(section.human_name, :url => new_skyline_section_path(:sectionable_type => section.name, :object_name => v.object_name_with_index, :renderable_scope => @renderable_scope.serialize), :method => :get) %>
  • <% end %>
<% end %>
<% begin %> <% content = capture do %>
<%= render :partial => "skyline/articles/#{a.object.class.name.demodulize.underscore}/data", :locals => {:a => a, :v => v, :vd => vd} %>
<% end %> <% rescue ActionView::MissingTemplate %> <% content = "" %> <% end %> <%= content %>
    <% v.object.sections.each do |section| %> <%= render :partial => "skyline/sections/form", :locals => {:variant_form => v, :section => section, :guid => Guid.new} %> <% end %>
<% if a.object.previewable? %>
<% end %> <% end %> <% end %>
<% end %>
<%= t(:actions, :scope => [:article, :headers]) %>
<%= render :partial => "meta" %> <% begin %> <% content = capture do %> <%= render :partial => "skyline/articles/#{@article.class.name.demodulize.underscore}/meta" %> <% end %> <% rescue ActionView::MissingTemplate %> <% content = "" %> <% end %> <%= content %>