1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 08:28:11 +00:00

Modify repo history list page

* Remove restore
* Add tooltip
This commit is contained in:
plt
2012-09-17 11:11:30 +08:00
parent 54d03673d4
commit 330366cb96
3 changed files with 9 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
# Django settings for seahub project.
import os
DEBUG = True
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (

View File

@@ -7,6 +7,8 @@
<h2 class="fleft">{{repo.props.name}} 修改历史</h2>
<button data="{{ SITE_ROOT }}repo/{{ repo.props.id }}/" class="fright" id="history-back-to-repo">返回同步目录</button>
</div>
<p class="tip">Tip在每次修改后会生成一个镜像记录修改后的目录状态。</p>
<div class="commit-list-outer-container">
<div class="commit-list-inner-container">
<table class="commit-list">
@@ -32,18 +34,18 @@
<td>
{{ commit.props.desc|translate_commit_desc }}
{% if not forloop.last %}
{% if page_next or not forloop.last %}
<a class="lsch" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ commit.id }}" data="{{ commit.props.ctime|tsstr_sec }}">详情</a>
{% endif %}
</td>
{% if not forloop.last %}
{% if forloop.first and current_page == 1 %}
<td>这是当前版本</td>
{% else %}
<td>
<a href="{% url 'repo_history_view' repo.id %}?commit_id={{ commit.id }}" class="op">浏览</a>
<a href="#" data="{{ SITE_ROOT }}repo/history/revert/{{ repo.id }}/?commit_id={{ commit.id }}" class="repo-revert op">还原</a>
<a href="{% url 'repo_history_view' repo.id %}?commit_id={{ commit.id }}" class="op">查看镜像</a>
</td>
{% else %}
<td></td>
{% endif %}
</tr>
{% endfor %}

View File

@@ -518,11 +518,6 @@ def repo_history(request, repo_id):
else:
page_next = False
is_owner = False
if request.user.is_authenticated():
if validate_owner(request, repo_id):
is_owner = True
return render_to_response('repo_history.html', {
"repo": repo,
"commits": commits,
@@ -531,7 +526,6 @@ def repo_history(request, repo_id):
'next_page': current_page+1,
'per_page': per_page,
'page_next': page_next,
'is_owner': is_owner,
}, context_instance=RequestContext(request))
@login_required