2012-04-24 08:15:29 +00:00
|
|
|
{% extends "myhome_base.html" %}
|
|
|
|
{% load seahub_tags %}
|
|
|
|
|
|
|
|
{% block left_panel %}
|
2012-05-19 13:27:46 +00:00
|
|
|
<h3>操作</h3>
|
|
|
|
<ul class="with-bg">
|
2012-05-04 08:18:27 +00:00
|
|
|
<li><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}/">返回同步目录</a></li>
|
2012-04-24 08:15:29 +00:00
|
|
|
</ul>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block right_panel %}
|
2012-05-05 05:57:42 +00:00
|
|
|
<h2 id="repo-history-hd">{{repo.props.name}} 修改历史</h2>
|
2012-04-24 08:15:29 +00:00
|
|
|
<table>
|
|
|
|
<tr>
|
2012-05-30 06:12:48 +00:00
|
|
|
<th width="20%">修改时间</th>
|
|
|
|
<th width="10%">修改者</th>
|
2012-05-22 07:28:24 +00:00
|
|
|
<th width="60%">描述</th>
|
|
|
|
<th width="10%">操作</th>
|
2012-04-24 08:15:29 +00:00
|
|
|
</tr>
|
|
|
|
{% for commit in commits %}
|
|
|
|
<tr>
|
2012-05-29 12:29:59 +00:00
|
|
|
<td>{{ commit.props.ctime|translate_commit_time }}</td>
|
2012-04-28 11:47:38 +00:00
|
|
|
{% if commit.props.creator_name %}
|
|
|
|
<td>{{ commit.props.creator_name }}</td>
|
|
|
|
{% else %}
|
|
|
|
<td>未知</td>
|
|
|
|
{% endif %}
|
2012-05-20 12:32:21 +00:00
|
|
|
<td>{{ commit.props.desc|translate_commit_desc }}</td>
|
2012-05-22 07:28:24 +00:00
|
|
|
{% if not forloop.last %}
|
2012-05-25 09:07:08 +00:00
|
|
|
<td>
|
2012-05-30 06:12:48 +00:00
|
|
|
<a href="{{ SITE_ROOT }}repo/history/dir/{{ repo.id }}/?commit_id={{ commit.id }}" class="op">浏览</a>
|
2012-05-29 03:04:03 +00:00
|
|
|
{% if is_owner %}
|
2012-05-30 06:12:48 +00:00
|
|
|
<a href="#" data="{{ SITE_ROOT }}repo/history/revert/{{ repo.id }}/?commit_id={{ commit.id }}" class="repo-revert op">还原</a>
|
2012-05-29 03:04:03 +00:00
|
|
|
{% endif %}
|
2012-05-30 06:12:48 +00:00
|
|
|
</td>
|
2012-05-22 07:28:24 +00:00
|
|
|
{% else %}
|
|
|
|
<td></td>
|
|
|
|
{% endif %}
|
2012-04-24 08:15:29 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
<div id="paginator">
|
|
|
|
{% if current_page != 1 %}
|
|
|
|
<a href="?page={{ prev_page }}&per_page={{ per_page }}">上一页</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if page_next %}
|
|
|
|
<a href="?page={{ next_page }}&per_page={{ per_page }}">下一页</a>
|
|
|
|
{% endif %}
|
|
|
|
<span>每页:</span>
|
|
|
|
{% if per_page == 25 %}
|
|
|
|
<span> 25 </span>
|
|
|
|
{% else %}
|
|
|
|
<a href="?per_page=25" class="per-page">25</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if per_page == 50 %}
|
|
|
|
<span> 50 </span>
|
|
|
|
{% else %}
|
|
|
|
<a href="?per_page=50" class="per-page">50</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if per_page == 100 %}
|
|
|
|
<span> 100 </span>
|
|
|
|
{% else %}
|
|
|
|
<a href="?per_page=100" class="per-page">100</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
2012-05-29 03:04:03 +00:00
|
|
|
|
|
|
|
{% block extra_script %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
addConfirmTo($(".repo-revert"), '确定要还原该目录?');
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|