<%= form_for @content do |f| %>
<%= f.submit "Save #{@type.title}", class: 'success button' %> <% unless @content.new_record? %> <%= link_to "Metafields (#{@content.metafields.size})", content_metafields_path(@content), class: 'hollow button' %> <%= link_to "Media (#{@content.media.size})", content_media_path(@content), class: 'hollow button secondary' %> <% end %>
<% if @content.errors.any? %>
<%= pluralize(@content.errors.count, 'error') %> prohibited this content from being saved:
    <% @content.errors.full_messages.each do |message| %>
  • <%= message %>
  • <% end %>
<% end %>
<%= f.label :title %> <%= f.text_field :title %>
<% unless @content.new_record? %>
<%= f.label :slug %> <%= f.text_field :slug %>
<% end %>
<%= f.label :content %> <%= f.text_area :content, { class: 'tinymce' } %>
<%= current_site_form_field f %> <% end %>