{% extends "sveedocuments/board/subbase_pages.html" %}
{% load i18n autobreadcrumb %}

{% block board_content %}
    <div class="clearfix">
        {% if page_instance and page_instance.visible %}<a class="secondary button right" href="{% url 'sveedocuments:page-details' page_instance.slug %}">{% trans "View on site" %}</a>{% endif %}
        <h2>{% current_title_from_breadcrumbs %}</h2>
    </div>
    
    {% include "sveedocuments/board/includes/page_form_subnav.html" with active_tab="history" %}
    
    <ul class="feed">
        <li class="revision-current">
            <p class="ago">{{ page_instance.modified|timesince }} ago</p>
            <p class="details"><strong>Current : </strong> by {{ page_instance.author.get_full_name }}</p>
            <p class="comment"><em>{% if page_instance.comment %}{{ page_instance.comment }}{% else %}{% trans "Empty comment" %}{% endif %}</em></p>
        </li>

        {% for revision in last_revisions %}
        <li>
            <p class="ago">{{ page_instance.created|timesince }} ago</p>
            <p class="details"><strong>N°{{ revision.revision }} : </strong> by {{ revision.author.get_full_name }}</p>
            <p class="comment{% if not revision.comment %} empty{% endif %}"><em>{% if revision.comment %}{{ revision.comment }}{% else %}{% trans "Empty comment" %}{% endif %}</em></p>
        </li>
        {% endfor %}
    </ul>

{% endblock %}
