%= form_for(@category) do |f| %>
<%= f.submit 'Save', class: 'success button' %>
<%= link_to 'Back', categories_path, class: 'secondary hollow button' %>
<% unless @category.new_record? %>
<%= link_to "Metafields (#{@category.metafields.size})", category_metafields_path(@category), class: 'hollow button' %>
<%= link_to "Media (#{@category.media.size})", category_media_path(@category), class: 'hollow button warning' %>
<% end %>
<% if notice %>
<% end %>
<% if @category.errors.any? %>
<%= pluralize(@category.errors.count, 'error') %> prohibited this content from being saved:
<% @category.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% end %>
<%= f.label :title %>
<%= f.text_field :title, required: true %>
<% unless @category.new_record? %>
<%= f.label :slug %>
<%= f.text_field :slug, readonly: true, disabled: true %>
<% end %>
<% end %>