1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 23:02:26 +00:00

Show repo size and add modify author on repo page

This commit is contained in:
xiez
2012-04-28 19:47:38 +08:00
parent f7aedcd76a
commit 421a79ca1b
3 changed files with 16 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
{% block right_panel %}
<h2>{{repo.props.name}}</h2>
<p class="repo-desc">{{repo.props.desc}}</p>
<p class="repo-size">大小:{{ repo_size|filesizeformat }}</p>
<p>
<span class="item-name">WEB匿名访问:</span>
{% if is_owner %}
@@ -34,11 +35,17 @@
<table>
<tr>
<th width="20%">修改时间</th>
<th width="80%">描述</th>
<th widht="20%">修改者</th>
<th width="60%">描述</th>
</tr>
{% for commit in recent_commits %}
<tr>
<td>{{ commit.props.ctime|tsstr_sec }}</td>
{% if commit.props.creator_name %}
<td>{{ commit.props.creator_name }}</td>
{% else %}
<td>未知</td>
{% endif %}
<td>{{ commit.props.desc }}</td>
</tr>
{% endfor %}

View File

@@ -12,11 +12,17 @@
<table>
<tr>
<th width="20%">修改时间</th>
<th width="20%">修改者</th>
<th width="80%">描述</th>
</tr>
{% for commit in commits %}
<tr>
<td>{{ commit.props.ctime|tsstr_sec }}</td>
{% if commit.props.creator_name %}
<td>{{ commit.props.creator_name }}</td>
{% else %}
<td>未知</td>
{% endif %}
<td>{{ commit.props.desc }}</td>
</tr>
{% endfor %}

View File

@@ -188,12 +188,14 @@ def repo(request, repo_id):
is_owner = True
token = seafserv_threaded_rpc.get_repo_token(repo_id)
repo_ap = seafserv_threaded_rpc.repo_query_access_property(repo_id)
repo_size = seafserv_threaded_rpc.server_repo_size(repo_id)
return render_to_response('repo.html', {
"repo": repo,
"recent_commits": recent_commits,
"is_owner": is_owner,
"repo_ap": repo_ap,
"repo_size": repo_size,
"token": token,
}, context_instance=RequestContext(request))