2012-07-30 02:25:46 +00:00
|
|
|
{% extends base_template %}
|
2012-10-30 12:37:48 +00:00
|
|
|
{% load seahub_tags avatar_tags i18n %}
|
2012-09-21 12:36:53 +00:00
|
|
|
{% load url from future %}
|
2012-07-13 09:19:44 +00:00
|
|
|
|
2012-08-11 09:26:39 +00:00
|
|
|
{% block main_panel %}
|
2012-10-30 12:37:48 +00:00
|
|
|
<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>
|
2012-09-18 03:52:51 +00:00
|
|
|
|
2012-08-11 11:45:58 +00:00
|
|
|
<p class="path">
|
2012-10-30 12:37:48 +00:00
|
|
|
{% trans 'Current Path:' %}
|
2012-09-17 07:28:10 +00:00
|
|
|
{% 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 %}
|
2012-08-11 11:45:58 +00:00
|
|
|
</p>
|
2012-09-17 07:28:10 +00:00
|
|
|
<div class="commit-list-outer-container">
|
|
|
|
<div class="commit-list-inner-container">
|
|
|
|
<table class="commit-list">
|
|
|
|
<tr>
|
2012-10-30 12:37:48 +00:00
|
|
|
<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>
|
2012-09-17 07:28:10 +00:00
|
|
|
</tr>
|
|
|
|
{% for commit in commits %}
|
|
|
|
<tr>
|
|
|
|
<td class="time">
|
2012-11-05 09:27:57 +00:00
|
|
|
{{ commit.props.ctime|translate_seahub_time }}
|
2012-09-17 07:28:10 +00:00
|
|
|
{% if commit.is_current_version %}
|
2012-10-30 12:37:48 +00:00
|
|
|
{% trans '(current version)' %}
|
2012-09-17 07:28:10 +00:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
2012-07-13 09:19:44 +00:00
|
|
|
|
2012-09-17 07:28:10 +00:00
|
|
|
{% 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 %}
|
2012-10-30 12:37:48 +00:00
|
|
|
<td>{% trans 'Unknown' %}</td>
|
2012-09-17 07:28:10 +00:00
|
|
|
{% endif %}
|
2012-07-13 09:19:44 +00:00
|
|
|
|
2012-09-17 07:28:10 +00:00
|
|
|
<td>{{ commit.revision_file_size|filesizeformat }} </td>
|
2012-07-13 09:19:44 +00:00
|
|
|
|
2012-09-17 07:28:10 +00:00
|
|
|
<td>
|
2012-10-31 08:36:37 +00:00
|
|
|
{% if commit.id != repo.head_cmmt_id %}
|
2012-10-30 12:37:48 +00:00
|
|
|
<a href="{{ SITE_ROOT }}repo/revert_file/{{ repo.id }}/?commit={{ commit.id }}&p={{path|urlencode}}&from=file_revisions" class="op">{% trans 'Restore' %}</a>
|
2012-09-17 07:28:10 +00:00
|
|
|
{% endif %}
|
2012-10-30 12:37:48 +00:00
|
|
|
<a href="{{ SITE_ROOT }}repo/file_revisions/{{ repo.id }}/?commit={{ commit.id }}&p={{path|urlencode}}&op=download" class="op">{% trans 'Download' %}</a>
|
2013-03-08 02:20:35 +00:00
|
|
|
<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>
|
2013-01-25 09:50:03 +00:00
|
|
|
{% 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 %}
|
2012-09-17 07:28:10 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
2012-07-13 09:19:44 +00:00
|
|
|
{% endblock %}
|