mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-17 22:47:59 +00:00
64 lines
2.8 KiB
HTML
64 lines
2.8 KiB
HTML
{% extends base_template %}
|
|
{% load seahub_tags avatar_tags i18n %}
|
|
{% load url from future %}
|
|
|
|
{% block main_panel %}
|
|
<h2>{{ u_filename }}{% trans "'s Version History" %}</h2>
|
|
<p class="tip">{% trans "Tip:a new version will be generated after each modification, and you can restore the file to a previous version." %}</p>
|
|
|
|
<p class="path">
|
|
{% trans 'Current Path:' %}
|
|
{% for name, link in zipped %}
|
|
{% if not forloop.last %}
|
|
<a href="{{ SITE_ROOT }}repo/{{ repo.id }}/?p={{ link|urlencode }}">{{ name }}</a> /
|
|
{% else %}
|
|
<a href="{{ SITE_ROOT }}repo/{{ repo.id }}/files/?p={{ path|urlencode }}">{{ name }}</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</p>
|
|
<div class="commit-list-outer-container">
|
|
<div class="commit-list-inner-container">
|
|
<table class="commit-list">
|
|
<tr>
|
|
<th width="30%" class="time">{% trans 'Time' %}</th>
|
|
<th width="20%">{% trans 'Last Modifier' %}</th>
|
|
<th width="20%">{% trans 'Size' %}</th>
|
|
<th width="30%">{% trans 'Operations' %}</th>
|
|
</tr>
|
|
{% for commit in commits %}
|
|
<tr>
|
|
<td class="time">
|
|
{{ commit.props.ctime|translate_seahub_time }}
|
|
{% if commit.is_current_version %}
|
|
{% trans '(current version)' %}
|
|
{% endif %}
|
|
</td>
|
|
|
|
{% if commit.creator_name %}
|
|
<td>
|
|
<a href="{{ SITE_ROOT }}profile/{{ commit.creator_name }}/">{% avatar commit.creator_name 16 %}</a>
|
|
<a href="{{ SITE_ROOT }}profile/{{ commit.creator_name }}/">{{ commit.creator_name|email2nickname }}</a>
|
|
</td>
|
|
{% else %}
|
|
<td>{% trans 'Unknown' %}</td>
|
|
{% endif %}
|
|
|
|
<td>{{ commit.revision_file_size|filesizeformat }} </td>
|
|
|
|
<td>
|
|
{% if commit.id != repo.head_cmmt_id %}
|
|
<a href="{{ SITE_ROOT }}repo/revert_file/{{ repo.id }}/?commit={{ commit.id }}&p={{path|urlencode}}&from=file_revisions" class="op">{% trans 'Restore' %}</a>
|
|
{% endif %}
|
|
<a href="{{ SITE_ROOT }}repo/file_revisions/{{ repo.id }}/?commit={{ commit.id }}&p={{path|urlencode}}&op=download" class="op">{% trans 'Download' %}</a>
|
|
<a href="{% url 'view_history_file' repo.id %}?obj_id={{ commit.file_id }}&commit_id={{ commit.id }}&p={{path|urlencode}}" class="op">{% trans 'View' %}</a>
|
|
{% if can_compare and not forloop.last %}
|
|
<a href="{% url 'text_diff' repo.id %}?p={{path|urlencode}}&commit={{commit.id}}" class="op">{% trans 'Diff' %}</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|