<%= form_for(@content, html: { multipart: true }) do |f| %>
  <% type_folder = "contents/#{@content.type.underscore}" %>
  <%= hidden_field_tag :type, @content.type %>
  <% if lookup_context.exists?("#{type_folder}/form_full", [], true) %>
    <%= render partial: "#{type_folder}/form_full", locals: {form: f} %>
  <% else %>
    <%= render partial: "layouts/errors", object: @content %>

    <div class="row-fluid">
      <div class="span8">
        <%= render_partial_if("#{type_folder}/form_top", "form_top", {form: f}) %>
        <%= render_partial_if("#{type_folder}/form_middle", "form_middle", {form: f}) %>
        <%= ConcertoPlugin.render_view_hook self, :content_form, {form: f} %>
        <%= render_partial_if("#{type_folder}/form_submit_feeds", "form_submit_feeds", {form: f}) %>
      </div>
      <div class="span4">
        <fieldset>
          <legend><span><%=t('.preview')%></span></legend>
          <div id="preview_div"></div>
        </fieldset>
      </div>
    </div>

    <%= render_partial_if("#{type_folder}/form_bottom", "form_bottom", {form: f, type: @content.type}) %>
  <% end %>
<% end %>
