Mercurial > kallithea
changeset 712:131c1e335fa7 beta
Added ldap info on admin users, added bool2icon helper for nicer representation of
True/False values. Fixed lock open icon to be more readable
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 18 Nov 2010 03:05:29 +0100 |
parents | cda88b3eb09c |
children | 1bb0fcdec895 |
files | rhodecode/lib/helpers.py rhodecode/public/images/icons/lock_open.png rhodecode/templates/admin/users/users.html |
diffstat | 3 files changed, 20 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/helpers.py Thu Nov 18 02:48:04 2010 +0100 +++ b/rhodecode/lib/helpers.py Thu Nov 18 03:05:29 2010 +0100 @@ -371,6 +371,22 @@ 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
--- a/rhodecode/templates/admin/users/users.html Thu Nov 18 02:48:04 2010 +0100 +++ b/rhodecode/templates/admin/users/users.html Thu Nov 18 03:05:29 2010 +0100 @@ -35,6 +35,7 @@ <th class="left">${_('lastname')}</th> <th class="left">${_('active')}</th> <th class="left">${_('admin')}</th> + <th class="left">${_('ldap')}</th> <th class="left">${_('action')}</th> </tr> %for cnt,user in enumerate(c.users_list): @@ -44,8 +45,9 @@ <td>${h.link_to(user.username,h.url('edit_user', id=user.user_id))}</td> <td>${user.name}</td> <td>${user.lastname}</td> - <td>${user.active}</td> - <td>${user.admin}</td> + <td>${h.bool2icon(user.active)}</td> + <td>${h.bool2icon(user.admin)}</td> + <td>${h.bool2icon(user.is_ldap)}</td> <td> ${h.form(url('user', id=user.user_id),method='delete')} ${h.submit('remove','delete',class_="delete_icon action_button")}