diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -371,6 +371,22 @@ person = lambda x: _person(x) short_id = lambda x: x[:12] +def bool2icon(value): + """ + Returns True/False values represented as small html image of true/false + icons + :param value: bool value + """ + + if value is True: + return HTML.tag('img', src="/images/icons/accept.png") + + if value is False: + return HTML.tag('img', src="/images/icons/cancel.png") + + return value + + def action_parser(user_log): """ This helper will map the specified string action into translated diff --git a/rhodecode/public/images/icons/lock_open.png b/rhodecode/public/images/icons/lock_open.png index a471765ff1432092e7113e56b42f2798968b443f..f93c6922308568fe16579b81886908acff590e7d GIT binary patch literal 746 zc$@+10u}v
Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igk~
z0s${_('active')}
${_('admin')}
+ ${_('ldap')}
${_('action')}
%for cnt,user in enumerate(c.users_list):
@@ -44,8 +45,9 @@
${h.link_to(user.username,h.url('edit_user', id=user.user_id))}
${user.name}
${user.lastname}
- ${user.active}
- ${user.admin}
+ ${h.bool2icon(user.active)}
+ ${h.bool2icon(user.admin)}
+ ${h.bool2icon(user.is_ldap)}
${h.form(url('user', id=user.user_id),method='delete')}
${h.submit('remove','delete',class_="delete_icon action_button")}