1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 16:36:15 +00:00
Files
seahub/templates/file_revisions.html
2012-09-18 11:53:26 +08:00

60 lines
2.4 KiB
HTML

{% extends base_template %}
{% load seahub_tags avatar_tags %}
{% block main_panel %}
<h2>{{ u_filename }} 版本历史</h2>
<p class="tip">Tip: 文件在每次修改后会生成一个新的版本,可以把当前文件内容“还原”到特定的版本。</p>
<p class="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">版本生成时间</th>
<th width="20%">最后修改者</th>
<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>
{% 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 %}
<td>{{ commit.revision_file_size|filesizeformat }} </td>
<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>
{% endblock %}