##// END OF EJS Templates
follow Python conventions for boolean values...
follow Python conventions for boolean values True and False might be singletons and the "default" values for "boolean" expressions, but "all" values in Python has a boolean value and should be evaluated as such. Checking with 'is True' and 'is False' is thus confusing, error prone and unnessarily complex. If we anywhere rely and nullable boolean fields from the database layer and don't want the null value to be treated as False then we should check explicitly for null with 'is None'.

File last commit:

r3582:1f334a68 beta
r3625:260a7a01 beta
Show More
users_groups.html
55 lines | 2.0 KiB | text/html | HtmlLexer
## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>
<%def name="title()">
${_('User groups administration')} &middot; ${c.rhodecode_name}
</%def>
<%def name="breadcrumbs_links()">
${h.link_to(_('Admin'),h.url('admin_home'))}
&raquo;
${_('user groups')}
</%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">
<li>
<span>${h.link_to(_(u'Add new user group'),h.url('new_users_group'))}</span>
</li>
</ul>
</div>
<!-- end box / title -->
<div class="table">
<table class="table_disp">
<tr class="header">
<th class="left">${_('group name')}</th>
<th class="left">${_('members')}</th>
<th class="left">${_('active')}</th>
<th class="left">${_('action')}</th>
</tr>
%for cnt,u_group in enumerate(c.users_groups_list):
<tr class="parity${cnt%2}">
<td>${h.link_to(u_group.users_group_name,h.url('edit_users_group', id=u_group.users_group_id))}</td>
<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>
<td>${h.bool2icon(u_group.users_group_active)}</td>
<td>
${h.form(url('users_group', id=u_group.users_group_id),method='delete')}
${h.submit('remove_',_('delete'),id="remove_group_%s" % u_group.users_group_id,
class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this user group: %s') % u_group.users_group_name+"');")}
${h.end_form()}
</td>
</tr>
%endfor
</table>
</div>
</div>
</%def>