{% extends "wiki/document_details_base.html" %}
{% load i18n %}
{% load static %}

{% block extrabody %}
  {{ block.super }}
  <script src="{% static "js/lib/codemirror-5.49.0/codemirror.js" %}" type="text/javascript" charset="utf-8"></script>
  <script src="{% static "js/lib/codemirror-5.49.0/xml.js" %}" type="text/javascript" charset="utf-8"></script>
  <script src="{% static 'js/lib/codemirror-5.49.0/searchcursor.js' %}" type="text/javascript" charset="utf-8"></script>

  <link rel="stylesheet" href="{% static "js/lib/codemirror-5.49.0/codemirror.css" %}">

  <script src="{% static "js/wiki/loader.js" %}" type="text/javascript" charset="utf-8"> </script>
  <script src="{% url 'wlxml_meta_tags' %}"></script>
{% endblock %}

{% block tabs-menu %}
  {% include "wiki/tabs/summary_view_item.html" %}
  {% include "wiki/tabs/wysiwyg_editor_item.html" %}
  {% include "wiki/tabs/source_editor_item.html" %}
  {% include "wiki/tabs/history_view_item.html" %}
{% endblock %}

{% block tools-menu %}
  <div class="btn-group mr-auto">
    <button id="undoBtn" class="btn btn-secondary" title="undo">↺</button>
    <button id="redoBtn" class="btn btn-secondary" title="redo">↻</button>
  </div>
{% endblock %}

{% block tabs-content %}
  {% include "wiki/tabs/summary_view.html" %}
  {% include "wiki/tabs/wysiwyg_editor.html" %}
  {% include "wiki/tabs/source_editor.html" %}
  {% include "wiki/tabs/history_view.html" %}
{% endblock %}

{% block tabs-right %}
  {% include "wiki/tabs/gallery_view_item.html" %}
  {% include "wiki/tabs/annotations_view_item.html" %}
  {% include "wiki/tabs/properties_view_item.html" %}
  {% include "wiki/tabs/search_view_item.html" %}
{% endblock %}

{% block splitter-extra %}
  <div id="vsplitbar" class="vsplitbar" title="{% trans "Click to open/close gallery" %}">
    <p class="vsplitbar-title"></p>
  </div>
  <div id="sidebar">
    {% include "wiki/tabs/gallery_view.html" %}
    {% include "wiki/tabs/annotations_view.html" %}
    {% include "wiki/tabs/properties_view.html" %}
    {% include "wiki/tabs/search_view.html" %}
  </div>
  <div id="drag-layer"></div>
{% endblock %}

{% block dialogs %}
  {% include "wiki/save_dialog.html" %}
  {% include "wiki/revert_dialog.html" %}
  {% include "wiki/media_dialog.html" %}
  {% include "wiki/gallery_dialog.html" %}
  {% include "wiki/meta_chooser.html" %}
  {% if can_pubmark %}
    {% include "wiki/pubmark_dialog.html" %}
  {% endif %}
{% endblock %}


{% block meta-extra %}
  <span data-key="full-uri">{{ chunk.book.correct_about }}</span>
{% endblock %}
