Show More
@@ -1,66 +1,66 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('User groups administration')} · ${c.rhodecode_name} |
|
5 | ${_('User groups administration')} · ${c.rhodecode_name} | |
6 | </%def> |
|
6 | </%def> | |
7 |
|
7 | |||
8 | <%def name="breadcrumbs_links()"> |
|
8 | <%def name="breadcrumbs_links()"> | |
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
10 | » |
|
10 | » | |
11 | ${_('User groups')} |
|
11 | ${_('User groups')} | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="page_nav()"> |
|
14 | <%def name="page_nav()"> | |
15 | ${self.menu('admin')} |
|
15 | ${self.menu('admin')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="main()"> |
|
18 | <%def name="main()"> | |
19 | <div class="box"> |
|
19 | <div class="box"> | |
20 | <!-- box / title --> |
|
20 | <!-- box / title --> | |
21 | <div class="title"> |
|
21 | <div class="title"> | |
22 | ${self.breadcrumbs()} |
|
22 | ${self.breadcrumbs()} | |
23 | <ul class="links"> |
|
23 | <ul class="links"> | |
24 | %if h.HasPermissionAny('hg.usergroup.create.true')(): |
|
24 | %if h.HasPermissionAny('hg.admin', 'hg.usergroup.create.true')(): | |
25 | <li> |
|
25 | <li> | |
26 | <span>${h.link_to(_(u'Add new user group'),h.url('new_users_group'))}</span> |
|
26 | <span>${h.link_to(_(u'Add new user group'),h.url('new_users_group'))}</span> | |
27 | </li> |
|
27 | </li> | |
28 | %endif |
|
28 | %endif | |
29 | </ul> |
|
29 | </ul> | |
30 | </div> |
|
30 | </div> | |
31 | <!-- end box / title --> |
|
31 | <!-- end box / title --> | |
32 |
|
32 | |||
33 | <div class="table"> |
|
33 | <div class="table"> | |
34 | %if c.users_groups_list: |
|
34 | %if c.users_groups_list: | |
35 | <table class="table_disp"> |
|
35 | <table class="table_disp"> | |
36 | <tr class="header"> |
|
36 | <tr class="header"> | |
37 | <th class="left">${_('Group name')}</th> |
|
37 | <th class="left">${_('Group name')}</th> | |
38 | <th class="left">${_('Members')}</th> |
|
38 | <th class="left">${_('Members')}</th> | |
39 | <th class="left">${_('Active')}</th> |
|
39 | <th class="left">${_('Active')}</th> | |
40 | <th class="left" colspan="2">${_('Action')}</th> |
|
40 | <th class="left" colspan="2">${_('Action')}</th> | |
41 | </tr> |
|
41 | </tr> | |
42 | %for cnt,u_group in enumerate(c.users_groups_list): |
|
42 | %for cnt,u_group in enumerate(c.users_groups_list): | |
43 | <tr class="parity${cnt%2}"> |
|
43 | <tr class="parity${cnt%2}"> | |
44 | <td>${h.link_to(u_group.users_group_name,h.url('edit_users_group', id=u_group.users_group_id))}</td> |
|
44 | <td>${h.link_to(u_group.users_group_name,h.url('edit_users_group', id=u_group.users_group_id))}</td> | |
45 | <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> |
|
45 | <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> | |
46 | <td>${h.boolicon(u_group.users_group_active)}</td> |
|
46 | <td>${h.boolicon(u_group.users_group_active)}</td> | |
47 | <td> |
|
47 | <td> | |
48 | <a href="${h.url('edit_users_group', id=u_group.users_group_id)}" title="${_('Edit')}"> |
|
48 | <a href="${h.url('edit_users_group', id=u_group.users_group_id)}" title="${_('Edit')}"> | |
49 | ${h.submit('edit_%s' % u_group.users_group_name,_('edit'),class_="edit_icon action_button")} |
|
49 | ${h.submit('edit_%s' % u_group.users_group_name,_('edit'),class_="edit_icon action_button")} | |
50 | </a> |
|
50 | </a> | |
51 | </td> |
|
51 | </td> | |
52 | <td> |
|
52 | <td> | |
53 | ${h.form(url('users_group', id=u_group.users_group_id),method='delete')} |
|
53 | ${h.form(url('users_group', id=u_group.users_group_id),method='delete')} | |
54 | ${h.submit('remove_',_('delete'),id="remove_group_%s" % u_group.users_group_id, |
|
54 | ${h.submit('remove_',_('delete'),id="remove_group_%s" % u_group.users_group_id, | |
55 | class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this user group: %s') % u_group.users_group_name+"');")} |
|
55 | class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this user group: %s') % u_group.users_group_name+"');")} | |
56 | ${h.end_form()} |
|
56 | ${h.end_form()} | |
57 | </td> |
|
57 | </td> | |
58 | </tr> |
|
58 | </tr> | |
59 | %endfor |
|
59 | %endfor | |
60 | </table> |
|
60 | </table> | |
61 | %else: |
|
61 | %else: | |
62 | ${_('There are no user groups yet')} |
|
62 | ${_('There are no user groups yet')} | |
63 | %endif |
|
63 | %endif | |
64 | </div> |
|
64 | </div> | |
65 | </div> |
|
65 | </div> | |
66 | </%def> |
|
66 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now