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-09-12 17:11:27 +08:00
|
|
|
|
{% load url from future %}
|
2012-04-24 16:15:29 +08:00
|
|
|
|
|
2012-09-15 21:01:06 +08:00
|
|
|
|
{% block main_panel %}
|
|
|
|
|
<div class="w100 ovhd">
|
|
|
|
|
<h2 class="fleft">{{repo.props.name}} 修改历史</h2>
|
2012-10-09 14:38:13 +08:00
|
|
|
|
<button data="{{ SITE_ROOT }}repo/{{ repo.props.id }}/" class="fright" id="back">返回资料库</button>
|
2012-09-15 21:01:06 +08:00
|
|
|
|
</div>
|
2012-09-17 11:11:30 +08:00
|
|
|
|
|
2012-09-21 20:36:53 +08:00
|
|
|
|
<p class="tip">Tip:在每次修改后会生成一个镜像,记录修改之前的目录状态。<a href="{% url 'repo_view_snapshot' repo.props.id %}">查看镜像</a></p>
|
2012-09-15 21:01:06 +08:00
|
|
|
|
<div class="commit-list-outer-container">
|
|
|
|
|
<div class="commit-list-inner-container">
|
|
|
|
|
<table class="commit-list">
|
|
|
|
|
<tr>
|
2012-09-21 14:01:39 +08:00
|
|
|
|
<th width="20%" class="time">修改时间</th>
|
|
|
|
|
<th width="20%">修改者</th>
|
|
|
|
|
<th width="60%">描述</th>
|
2012-09-15 21:01:06 +08:00
|
|
|
|
</tr>
|
2012-05-31 12:00:32 +08:00
|
|
|
|
|
2012-09-15 21:01:06 +08:00
|
|
|
|
{% for commit in commits %}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="time">{{ commit.ctime|translate_commit_time }}</td>
|
|
|
|
|
<td>
|
2012-09-21 14:01:39 +08:00
|
|
|
|
{% if commit.creator_name %}
|
2012-09-15 21:01:06 +08:00
|
|
|
|
<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>
|
|
|
|
|
{% else %}
|
2012-09-21 14:01:39 +08:00
|
|
|
|
未知
|
2012-09-15 21:01:06 +08:00
|
|
|
|
{% endif %}
|
2012-09-21 14:01:39 +08:00
|
|
|
|
</td>
|
2012-09-15 21:01:06 +08:00
|
|
|
|
<td>
|
|
|
|
|
{{ commit.props.desc|translate_commit_desc }}
|
2012-09-17 11:11:30 +08:00
|
|
|
|
{% if page_next or not forloop.last %}
|
2012-09-15 21:01:06 +08:00
|
|
|
|
<a class="lsch" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ commit.id }}" data="{{ commit.props.ctime|tsstr_sec }}">详情</a>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</td>
|
|
|
|
|
</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>
|
|
|
|
|
<div id="ls-ch" class="hide"></div><!--list modification details of a commit-->
|
|
|
|
|
</div>
|
2012-04-24 16:15:29 +08:00
|
|
|
|
</div>
|
|
|
|
|
{% endblock %}
|
2012-05-29 11:04:03 +08:00
|
|
|
|
|
|
|
|
|
{% block extra_script %}
|
|
|
|
|
<script type="text/javascript">
|
2012-09-15 21:01:06 +08:00
|
|
|
|
{% include 'snippets/list_commit_detail.html' %}
|
2012-09-21 14:01:39 +08:00
|
|
|
|
$('#back').click(function() {
|
2012-09-15 21:01:06 +08:00
|
|
|
|
location.href = $(this).attr('data');
|
2012-05-30 14:11:33 +08:00
|
|
|
|
});
|
2012-05-30 19:59:15 +08:00
|
|
|
|
</script>
|
2012-05-29 11:04:03 +08:00
|
|
|
|
{% endblock %}
|