mirror of
https://github.com/haiwen/seahub.git
synced 2025-05-11 09:24:38 +00:00
Modify group page
This commit is contained in:
parent
af96c3085e
commit
db2419c598
@ -26,7 +26,7 @@
|
||||
<ul class="with-bg">
|
||||
{% if is_staff %}
|
||||
<li><a id="add-member" href="#">添加成员</a></li>
|
||||
<li><a id="group-mgr" href="{{ SITE_ROOT }}group/manage/{{ group_id }}/">小组管理</a></li>
|
||||
<li><a id="group-mgr" href="{{ SITE_ROOT }}group/manage/{{ group.id }}/">小组管理</a></li>
|
||||
{% else %}
|
||||
<li><a id="quit-group" href="#">退出小组</a></li>
|
||||
{% endif %}
|
||||
@ -35,7 +35,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block right_panel %}
|
||||
|
||||
<h2>{{ group.group_name }}</h2>
|
||||
<h3>小组里共享的同步目录</h3>
|
||||
{% if repos %}
|
||||
<table>
|
||||
@ -54,7 +54,7 @@
|
||||
<td>
|
||||
<button data="{{ repo.props.id }}" class="download-btn">下载</button>
|
||||
{% if is_staff or repo.share_from_me %}
|
||||
<button data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.id }}&gid={{ group_id }}" class="repo-delete-btn">删除</button>
|
||||
<button data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.id }}&gid={{ group.id }}" class="repo-delete-btn">取消共享</button>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@ -67,7 +67,7 @@
|
||||
<form id="member-add-form" action="{{ SITE_ROOT }}group/memberadd/" method="post" name="member-add-form" class="hide">
|
||||
<label>邮箱:</label><br />
|
||||
<input id="user_name" name="user_name" value="" /><br />
|
||||
<input type="hidden" id="group_id" name="group_id" value="{{ group_id }}" />
|
||||
<input type="hidden" id="group_id" name="group_id" value="{{ group.id }}" />
|
||||
<input type="submit" value="提交" />
|
||||
</form>
|
||||
|
||||
@ -92,7 +92,7 @@ $("#quit-group").click(function() {
|
||||
});
|
||||
|
||||
$('#quit-yes-btn').click(function() {
|
||||
location.href = "{{ SITE_ROOT }}group/quit/?gid={{ group_id }}";
|
||||
location.href = "{{ SITE_ROOT }}group/quit/?gid={{ group.id }}";
|
||||
});
|
||||
|
||||
addConfirmTo($('.repo-delete-btn'));
|
||||
|
@ -5,13 +5,13 @@
|
||||
{% block left_panel %}
|
||||
<h3>操作</h3>
|
||||
<ul class="with-bg">
|
||||
<li><a id="group-info" href="{{ SITE_ROOT }}group/{{ group_id }}/">返回小组</a></li>
|
||||
<li><a id="group-info" href="{{ SITE_ROOT }}group/{{ group.id }}/">返回小组</a></li>
|
||||
<li><a id="group-remove" href="#">解散小组</a></li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{% block right_panel %}
|
||||
|
||||
<h2>{{ group.group_name }}</h2>
|
||||
<h3>小组成员列表</h3>
|
||||
{% if members %}
|
||||
<table class="member-list">
|
||||
@ -39,7 +39,7 @@
|
||||
<form id="member-remove-form" action="{{ SITE_ROOT }}group/memberrm/" method="post" name="member-remove-form" class="hide">
|
||||
<label>邮箱</label><br />
|
||||
<input id="user_name" name="user_name" value="" />
|
||||
<input type="hidden" id="group_id" name="group_id" value="{{ group_id }}" />
|
||||
<input type="hidden" id="group_id" name="group_id" value="{{ group.id }}" />
|
||||
<input type="submit" value="提交" />
|
||||
</form>
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
{% block extra_script %}
|
||||
<script type="text/javascript">
|
||||
$("#group-remove").click(function() {
|
||||
location.href = "{{ SITE_ROOT }}group/rm?gid={{ group_id }}";
|
||||
location.href = "{{ SITE_ROOT }}group/rm?gid={{ group.id }}";
|
||||
});
|
||||
|
||||
$('.member-remove-btn').click(function() {
|
||||
|
@ -114,6 +114,7 @@ def group_info(request, group_id):
|
||||
"common_members": common_members,
|
||||
"repos": repos,
|
||||
"group_id": group_id,
|
||||
"group" : group,
|
||||
"is_staff": is_staff,
|
||||
}, context_instance=RequestContext(request));
|
||||
|
||||
@ -187,10 +188,14 @@ def group_manage(request, group_id):
|
||||
if not ccnet_rpc.check_group_staff(group_id_int, request.user.username):
|
||||
return go_permission_error(request, u'只有小组管理员有权管理小组')
|
||||
|
||||
group = ccnet_rpc.get_group(group_id_int)
|
||||
if not group:
|
||||
return HttpResponseRedirect(reverse('group_list', args=[]))
|
||||
|
||||
members = ccnet_rpc.get_group_members(group_id_int)
|
||||
|
||||
return render_to_response('group/group_manage.html', {
|
||||
'group_id': group_id_int,
|
||||
'group' : group,
|
||||
'members': members,
|
||||
}, context_instance=RequestContext(request))
|
||||
|
||||
|
@ -5,15 +5,15 @@
|
||||
<li>
|
||||
<a href="{{ SITE_ROOT }}home/my/" {% block nav_myhome_class %}{% endblock %}>我的页面</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ SITE_ROOT }}group/" {% block nav_group_class %}{% endblock %}>小组</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ SITE_ROOT }}shareadmin/" {% block nav_shareadmin_class %}{% endblock %}>共享管理</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ SITE_ROOT }}contacts/" {% block nav_contacts_class %}{% endblock %}>联系人</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ SITE_ROOT }}group/" {% block nav_group_class %}{% endblock %}>小组</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ SITE_ROOT}}back/local/">回到本地</a>
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user