mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-29 20:14:19 +00:00
Add list of fetched repos
This commit is contained in:
parent
f2dac3102b
commit
c51eadc4f5
@ -33,4 +33,23 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<h3>我用过的同步目录</h3>
|
||||||
|
<table class="repo-list default">
|
||||||
|
<tr>
|
||||||
|
<th>名字</th>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>描述</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{% for repo in fetched_repos %}
|
||||||
|
<tr>
|
||||||
|
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}">{{ repo.props.name }}</a></td>
|
||||||
|
<td>{{ repo.props.id }}</td>
|
||||||
|
<td>{{ repo.props.desc }}</td>
|
||||||
|
<td><a href="{{ SITE_ROOT }}repo/remove/{{ repo.props.id }}/">删除</a></td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
3
views.py
3
views.py
@ -148,16 +148,19 @@ def remove_repo(request, repo_id):
|
|||||||
@login_required
|
@login_required
|
||||||
def myhome(request):
|
def myhome(request):
|
||||||
owned_repos = []
|
owned_repos = []
|
||||||
|
fetched_repos = []
|
||||||
quota_usage = 0
|
quota_usage = 0
|
||||||
|
|
||||||
user_id = request.user.user_id
|
user_id = request.user.user_id
|
||||||
if user_id:
|
if user_id:
|
||||||
owned_repos = seafserv_threaded_rpc.list_owned_repos(user_id)
|
owned_repos = seafserv_threaded_rpc.list_owned_repos(user_id)
|
||||||
quota_usage = seafserv_threaded_rpc.get_user_quota_usage(user_id)
|
quota_usage = seafserv_threaded_rpc.get_user_quota_usage(user_id)
|
||||||
|
fetched_repos = seafserv_threaded_rpc.list_fetched_repos(user_id)
|
||||||
|
|
||||||
return render_to_response('myhome.html', {
|
return render_to_response('myhome.html', {
|
||||||
"owned_repos": owned_repos,
|
"owned_repos": owned_repos,
|
||||||
"quota_usage": quota_usage,
|
"quota_usage": quota_usage,
|
||||||
|
"fetched_repos": fetched_repos,
|
||||||
}, context_instance=RequestContext(request))
|
}, context_instance=RequestContext(request))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user