{% extends "site/layout/base_text.html" %}
{% load com %}
{% load i18n %}
{% load local_perms %}
{% block main %}

{% get_local_text_perm request text can_edit_text as can_edit_text %}

<script type="text/javascript">
<!--
tb_conf['current_tab'] = 'history';
-->
</script>

<div id="text_history" class="tab-meta">   

<script type="text/javascript">
<!--
$(function() {
    $(".hidden-text-actions").css('visibility','hidden');   
}) ;
-->

</script>


<ul class="sub_list">
    <li><a href="{% url text-history text.key %}">{% blocktrans %}Version list{% endblocktrans %}</a></li>
    <li>&nbsp;/</li>
    {% if text_version.get_previous_version %}
    <li>&nbsp;<a href="{% url text-history-version text.key text_version.get_previous_version.key %}" title="{% blocktrans %}Previous version{% endblocktrans %}" >&laquo;{{ text_version.get_previous_version.get_version_number }}</a></li>
    <li>&nbsp;<a href="{% url text-history-compare text.key text_version.get_previous_version.key text_version.key %}"><img style="vertical-align: text-bottom;" title="{% blocktrans %}Compare with previous version{% endblocktrans %}" alt="title="{% blocktrans %}Compare with previous version{% endblocktrans %}"  src="{{ CM_MEDIA_PREFIX }}img/plus-minus-left.gif"></img></a></li>
    {% endif %}
    <li class="active_sub">{% blocktrans with text_version.get_version_number as version_number %}Version {{ version_number }}{% endblocktrans %}</li>
    {% if text_version.get_next_version %}
    <li>&nbsp;<a href="{% url text-history-compare text.key text_version.key text_version.get_next_version.key %}"><img style="vertical-align: text-bottom;" title="{% blocktrans %}Compare with next version{% endblocktrans %}" alt="{% blocktrans %}Compare with next version{% endblocktrans %}" src="{{ CM_MEDIA_PREFIX }}img/plus-minus-right.gif"></img></a></li>
    <li>&nbsp;<a href="{% url text-history-version text.key text_version.get_next_version.key %}" title="{% blocktrans %}Next version{% endblocktrans %}" >{{ text_version.get_next_version.get_version_number }}&raquo;</a></li>
    <li>&nbsp;<a href="{% url text-history-version text.key text.last_text_version.key %}" title="{% blocktrans %}Most recent version{% endblocktrans %}">{{ text.last_text_version.get_version_number }}&raquo;&raquo;</a></li>    
    {% endif %}
</ul>

<div style="clear:both;"></div>

<h2>{{ text_version.title }}</h2>
{% blocktrans with text_version.get_name as author %}by {{ author }}{% endblocktrans %}

<div id="autoexpand_text_view_frame_container">
{% autoescape off %}
{{ embed_code }}
{% endautoescape %}
</div>

</div>
{% endblock %}
