<% 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 flex">
  <div class="col s12 m3">
    <div class="sticky-below-navbar">
      <%=
        render partial: 'content/display/sidelinks',
          locals: {
            editing: true,
            content: @serialized_content
          }
      %>
    </div>
  </div>

  <div class="col s12 m6">
    <%= render partial: 'content/form', locals: { content: @serialized_content } %>
  </div>

  <div class="col s12 m3">
    <div class="sticky-below-navbar">
      <%=
        render partial: 'content/display/sideactions',
          locals: {
            editing: true,
            content: @serialized_content
          }
      %>
    </div>
  </div>
</div>

<%# todo: surely we can strip this out (to a general slider.js?), no? %>
<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 %>
