2012-07-30 10:25:46 +08:00
|
|
|
{% extends base_template %}
|
2012-08-09 17:19:15 +08:00
|
|
|
{% load seahub_tags avatar_tags %}
|
2012-07-13 17:19:44 +08:00
|
|
|
|
2012-08-11 17:26:39 +08:00
|
|
|
{% block main_panel %}
|
2012-09-18 11:42:15 +08:00
|
|
|
<h2>{{ u_filename }} 版本历史</h2>
|
2012-09-18 11:52:51 +08:00
|
|
|
<p class="tip">Tip: 文件在每次修改后会生成一个新的版本,可以把当前文件内容“还原”到特定的版本。</p>
|
|
|
|
|
2012-08-11 19:45:58 +08:00
|
|
|
<p class="path">
|
2012-09-17 15:28:10 +08: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 19:45:58 +08:00
|
|
|
</p>
|
2012-09-17 15:28:10 +08:00
|
|
|
<div class="commit-list-outer-container">
|
|
|
|
<div class="commit-list-inner-container">
|
|
|
|
<table class="commit-list">
|
|
|
|
<tr>
|
2012-09-18 11:42:15 +08:00
|
|
|
<th width="30%" class="time">版本生成时间</th>
|
|
|
|
<th width="20%">最后修改者</th>
|
2012-09-17 15:28:10 +08:00
|
|
|
<th width="20%">大小</th>
|
|
|
|
<th width="30%">操作</th>
|
|
|
|
</tr>
|
|
|
|
{% for commit in commits %}
|
|
|
|
<tr>
|
|
|
|
<td class="time">
|
|
|
|
{{ commit.props.ctime|translate_commit_time }}
|
|
|
|
{% if commit.is_current_version %}
|
|
|
|
(当前版本)
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
2012-07-13 17:19:44 +08:00
|
|
|
|
2012-09-17 15:28:10 +08: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 %}
|
|
|
|
<td>未知</td>
|
|
|
|
{% endif %}
|
2012-07-13 17:19:44 +08:00
|
|
|
|
2012-09-17 15:28:10 +08:00
|
|
|
<td>{{ commit.revision_file_size|filesizeformat }} </td>
|
2012-07-13 17:19:44 +08:00
|
|
|
|
2012-09-17 15:28:10 +08:00
|
|
|
<td>
|
|
|
|
{% if not commit.is_current_version %}
|
|
|
|
<a href="{{ SITE_ROOT }}repo/revert_file/{{ repo.id }}/?commit={{ commit.id }}&p={{path|urlencode}}&from=file_revisions" class="file-revert op">还原</a>
|
|
|
|
{% endif %}
|
|
|
|
<a href="{{ SITE_ROOT }}repo/file_revisions/{{ repo.id }}/?commit={{ commit.id }}&p={{path|urlencode}}&op=download" class="file-download op">下载</a>
|
|
|
|
<a href="{{ SITE_ROOT }}repo/file_revisions/{{ repo.id }}/?commit={{ commit.id }}&p={{path|urlencode}}&op=view" class="file-download op">查看</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
2012-07-13 17:19:44 +08:00
|
|
|
{% endblock %}
|