users_groups.html
66 lines
| 2.4 KiB
| text/html
|
HtmlLexer
r956 | ## -*- coding: utf-8 -*- | |||
<%inherit file="/base/base.html"/> | ||||
<%def name="title()"> | ||||
r3582 | ${_('User groups administration')} · ${c.rhodecode_name} | |||
r956 | </%def> | |||
<%def name="breadcrumbs_links()"> | ||||
r3392 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |||
» | ||||
Mads Kiilerich
|
r3654 | ${_('User groups')} | ||
r956 | </%def> | |||
<%def name="page_nav()"> | ||||
${self.menu('admin')} | ||||
</%def> | ||||
<%def name="main()"> | ||||
<div class="box"> | ||||
<!-- box / title --> | ||||
<div class="title"> | ||||
${self.breadcrumbs()} | ||||
<ul class="links"> | ||||
r3741 | %if h.HasPermissionAny('hg.admin', 'hg.usergroup.create.true')(): | |||
r956 | <li> | |||
Mads Kiilerich
|
r3201 | <span>${h.link_to(_(u'Add new user group'),h.url('new_users_group'))}</span> | ||
r956 | </li> | |||
r3737 | %endif | |||
r1888 | </ul> | |||
r956 | </div> | |||
<!-- end box / title --> | ||||
r3734 | ||||
r956 | <div class="table"> | |||
r3734 | %if c.users_groups_list: | |||
r956 | <table class="table_disp"> | |||
<tr class="header"> | ||||
Mads Kiilerich
|
r3654 | <th class="left">${_('Group name')}</th> | ||
<th class="left">${_('Members')}</th> | ||||
<th class="left">${_('Active')}</th> | ||||
r3716 | <th class="left" colspan="2">${_('Action')}</th> | |||
r956 | </tr> | |||
%for cnt,u_group in enumerate(c.users_groups_list): | ||||
<tr class="parity${cnt%2}"> | ||||
r959 | <td>${h.link_to(u_group.users_group_name,h.url('edit_users_group', id=u_group.users_group_id))}</td> | |||
r2427 | <td><span class="tooltip" title="${h.tooltip(', '.join(map(h.safe_unicode,[x.user.username for x in u_group.members[:50]])))}">${len(u_group.members)}</span></td> | |||
Mads Kiilerich
|
r3627 | <td>${h.boolicon(u_group.users_group_active)}</td> | ||
r956 | <td> | |||
r3716 | <a href="${h.url('edit_users_group', id=u_group.users_group_id)}" title="${_('Edit')}"> | |||
${h.submit('edit_%s' % u_group.users_group_name,_('edit'),class_="edit_icon action_button")} | ||||
</a> | ||||
</td> | ||||
<td> | ||||
r959 | ${h.form(url('users_group', id=u_group.users_group_id),method='delete')} | |||
Vincent Duvert
|
r2312 | ${h.submit('remove_',_('delete'),id="remove_group_%s" % u_group.users_group_id, | ||
Mads Kiilerich
|
r3410 | class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this user group: %s') % u_group.users_group_name+"');")} | ||
r956 | ${h.end_form()} | |||
</td> | ||||
</tr> | ||||
%endfor | ||||
</table> | ||||
r3734 | %else: | |||
${_('There are no user groups yet')} | ||||
%endif | ||||
r956 | </div> | |||
</div> | ||||
</%def> | ||||