<% set_meta_tags title: "Editing " + @content.name, description: @content.description %>

<%= content_for :full_width_page_header do %>
  <%= render partial: 'content/display/image_card_header' %>
<% end %>

<div class="row">
  <%= form_for @content, multipart: true do |form| %>
    <div class="col s12 m9">
      <div class="hoverable card">
        <div class="card-image">
          <%= render partial: 'content/display/floating_action_buttons', locals: { editing: true } %>
        </div>
        <%= render partial: 'content/form', locals: { f: form, content: @serialized_content } %>
      </div>
    </div>

    <div class="col s12 m3">
      <%=
        render partial: 'content/display/sidelinks',
          locals: {
            editing: true,
            content: @serialized_content
          }
      %>
    </div>
  <% end %>
</div>

<script type="text/javascript">
  $(document).ready(function() {
    $('.slider').slider({
      height: 200,
      indicators: false
    });
  });
</script>
<%= render partial: 'javascripts/content_linking' %>

<script type="text/javascript">
  DISABLE_KEYBOARD_SHORTCUTS = true;
</script>

<% if @content.persisted? %>
  <%= render partial: 'content/share', locals: { shared_content: @content} %>
<% end %>
