<%
  creating = defined?(creating) && creating
  editing  = defined?(editing)  && editing
%>

<%
  raw_model = content.is_a?(ContentSerializer) ? content.raw_model : content
%>

<% if creating || editing %>
  <button class="btn waves-effect waves-<%= raw_model.class.color %> <%= raw_model.class.color %> mp-sidebar-save" type="submit" name="action"
          style="margin: 20px 0 10px 0; width: 100%">
    <i class="material-icons left">save</i>
    <%= raw_model.new_record? ? 'Create' : 'Save Changes' %>
  </button>
<% end %>

<%= render partial: 'content/display/sidebar/categories', locals: { content: content, creating: creating, editing: editing } %>
<%= render partial: 'content/display/sidebar/references', locals: { content: content, creating: creating, editing: editing } %>

<% if user_signed_in? && current_user.can_delete?(raw_model) %>
  <%= render partial: 'content/display/sidebar/actions',    locals: { content: content, creating: creating, editing: editing } %>
<% end %>