%= form_for(@group) do |f| %>
<%= f.submit 'Save', class: 'success button' %>
<%= link_to 'Back', groups_path, class: 'secondary hollow button' %>
<% unless @group.new_record? %>
<%= link_to "Records (#{@group.users.size})", users_path(group: @group.id), class: 'hollow button warning' %>
<%= link_to "Metafields (#{@group.metafields.size})", group_metafields_path(@group), class: 'hollow button' %>
<%= link_to "Media (#{@group.media.size})", group_media_path(@group), class: 'hollow button alert' %>
<% end %>
<% if @group.errors.any? %>
<%= pluralize(@group.errors.count, 'error') %> prohibited this content from being saved:
<% @group.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% end %>
<%= f.label :title %>
<%= f.text_field :title %>
<% unless @group.new_record? %>
<%= f.label :slug %>
<%= f.text_field :slug %>
<% end %>
<% end %>