mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 14:50:29 +00:00
Show repo size and add modify author on repo page
This commit is contained in:
@@ -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 %}
|
||||
|
@@ -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 %}
|
||||
|
2
views.py
2
views.py
@@ -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))
|
||||
|
||||
|
Reference in New Issue
Block a user