{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "wiki/base.html" %}
{# L10n: {n} is the revision number, {t} is the title of the document. {c} is the category. #}
{% set title = _('Revision {n} | {t} | {c}')|f(n=revision.id, t=document.title, c=document.get_category_display()) %}
{% block title %}{{ page_title(title) }}{% endblock %}
{% set meta = [('robots', 'noindex, nofollow')] %}
{% set crumbs = [(url('wiki.category', document.category), document.get_category_display()),
                 (document.get_absolute_url(), document.title),
                 (None, _('Revision {num}')|f(num=revision.id))] %}
{% set classes = 'document' %}

{% block content %}
<section id="content">
  <div class="wrap">
    <div id="content-main" class="full">
  <article id="wiki-doc">
    <h1 class="title">{{ document.title }}</h1>
    <details class="h2" open="open">
      <summary>{{ _('Revision Information') }}</summary>
      <div class="revision-info">
        <ul>
          <li>
            <mark>{{ _('Revision slug:') }}</mark>
            <span>{{ revision.slug }}</span>
          </li>
          <li>
            <mark>{{ _('Revision title:') }}</mark>
            <span>{{ revision.title }}</span>
          </li>
          <li class="revision-id">
            <mark>{{ _('Revision id:') }}</mark>
            <span>{{ revision.id }}</span>
          </li>
          <li class="revision-created">
            <mark>{{ _('Created:') }}</mark>
            <span>{{ datetimeformat(revision.created, format='datetime') }}</span>
          </li>
          <li>
            <mark>{{ _('Creator:') }}</mark>
            <span>{{ revision.creator }}</span>
          </li>
          <li class="revision-is-reviewed">
            <mark>{{ _('Is reviewed?') }}</mark>
            <span>{{ revision.reviewed|yesno }}</span>
          </li>
          {% if revision.reviewed %}
            <li class="revision-reviewed">
              <mark>{{ _('Reviewed:') }}</mark>
              <span>{{ datetimeformat(revision.reviewed, format='datetime') }}</span>
            </li>
            <li>
              <mark>{{ _('Reviewed by:') }}</mark>
              <span>{{ revision.reviewer }}</span>
            </li>
            <li class="revision-is-current">
              <mark>{{ _('Is approved?') }}</mark>
              <span>{{ revision.is_approved|yesno }}</span>
            </li>
            <li>
              <mark>{{ _('Is current revision?') }}</mark>
              <span>{{ (revision == document.current_revision)|yesno }}</span>
            </li>
          {% endif %}
          {#
          {% if user.is_authenticated() %}
            <li><a href="{{ url('wiki.new_revision_based_on', document.slug, revision.id) }}">{{ _('Edit article based on this revision') }}</a></li>
          {% endif %}
          #}
        </ul>
      </div>
    </details>
    <details class="h2">
      <summary>{{ _('Revision Source') }}</summary>
      <div id="doc-source">
        <textarea readonly="readonly">{{ revision.content }}</textarea>
      </div>
    </details>
    <details class="h2">
      <summary>{{ _('Revision Content') }}</summary>
      <div id="doc-content">
        {{ revision.content_parsed|safe }}
      </div>
    </details>
  </article>
    </div>
   </div>
</section>
{% endblock %}


{% block side %}
  {% include 'wiki/includes/support_for_selectors.html' %}
{% endblock %}
