Changeset - 131c1e335fa7
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 15 years ago 2010-11-18 03:05:29
marcin@python-works.com
Added ldap info on admin users, added bool2icon helper for nicer representation of
True/False values. Fixed lock open icon to be more readable
3 files changed with 20 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/helpers.py
Show inline comments
 
@@ -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
rhodecode/public/images/icons/lock_open.png
Show inline comments
 
binary diff not shown
Show images
rhodecode/templates/admin/users/users.html
Show inline comments
 
@@ -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")}
0 comments (0 inline, 0 general)