{% extends 'base_wide_page.html' %}
{% load seahub_tags avatar_tags i18n %}


{% block extra_style %}
<style type="text/css">
    .go-back { top:-3px; }
</style>
{% endblock %}

{% block wide_page_content %}
<h2 class="file-modification-hd"><span class="op-target">{{ u_filename }}</span> {% trans "modification details" %} <a href="{% url 'user_profile' current_commit.creator_name %}">{% avatar current_commit.creator_name 16 %}</a><span class="modifier">{{ current_commit.creator_name|email2nickname }}</span><span class="time">{{ current_commit.ctime|translate_seahub_time }}</span></h2>

{% if referer %}
<a href="#" class="go-back" title="{% trans "Back" %}">
    <span class="icon-chevron-left"></span>
</a>
{% endif %}

    <p class="path">
        {% trans "Current Path:" %}
        {% for name, link in zipped %}
        {% if not forloop.last %}
        <a href="{% url 'lib_view' repo.id repo.name link|strip_slash %}">{{ name }}</a> /
        {% else %}
        <a href="{% url 'view_lib_file' repo.id link %}">{{ name }}</a>
        {% endif %}
        {% endfor %}
    </p>
    
{% if is_new_file %}
<div id="text-diff-output">
    <p class="blank-file">{% trans "It's a newly-created blank file." %}</p>
</div>
{% else %}
<div id="text-diff-output">
<table class="diff-con">
    <tr>
        <th width="3%"></th>
        <th width="47%">{% trans "before modification" %}</th>
        <th width="3%"></th>
        <th width="47%">{% trans "after modification" %}</th>
    </tr>
    {{ diff_result_table|safe }}
</table>
</div>
{% endif %}
{% endblock %}

{% block extra_script %}
<script type="text/javascript">
{% include 'snippets/go_back_js.html' %}
</script>
{% endblock %}
