##// END OF EJS Templates
Added ldap info on admin users, added bool2icon helper for nicer representation of...
marcink -
r712:131c1e33 beta
parent child Browse files
Show More
@@ -371,6 +371,22 b' person = lambda x: _person(x)'
371 short_id = lambda x: x[:12]
371 short_id = lambda x: x[:12]
372
372
373
373
374 def bool2icon(value):
375 """
376 Returns True/False values represented as small html image of true/false
377 icons
378 :param value: bool value
379 """
380
381 if value is True:
382 return HTML.tag('img', src="/images/icons/accept.png")
383
384 if value is False:
385 return HTML.tag('img', src="/images/icons/cancel.png")
386
387 return value
388
389
374 def action_parser(user_log):
390 def action_parser(user_log):
375 """
391 """
376 This helper will map the specified string action into translated
392 This helper will map the specified string action into translated
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -35,6 +35,7 b''
35 <th class="left">${_('lastname')}</th>
35 <th class="left">${_('lastname')}</th>
36 <th class="left">${_('active')}</th>
36 <th class="left">${_('active')}</th>
37 <th class="left">${_('admin')}</th>
37 <th class="left">${_('admin')}</th>
38 <th class="left">${_('ldap')}</th>
38 <th class="left">${_('action')}</th>
39 <th class="left">${_('action')}</th>
39 </tr>
40 </tr>
40 %for cnt,user in enumerate(c.users_list):
41 %for cnt,user in enumerate(c.users_list):
@@ -44,8 +45,9 b''
44 <td>${h.link_to(user.username,h.url('edit_user', id=user.user_id))}</td>
45 <td>${h.link_to(user.username,h.url('edit_user', id=user.user_id))}</td>
45 <td>${user.name}</td>
46 <td>${user.name}</td>
46 <td>${user.lastname}</td>
47 <td>${user.lastname}</td>
47 <td>${user.active}</td>
48 <td>${h.bool2icon(user.active)}</td>
48 <td>${user.admin}</td>
49 <td>${h.bool2icon(user.admin)}</td>
50 <td>${h.bool2icon(user.is_ldap)}</td>
49 <td>
51 <td>
50 ${h.form(url('user', id=user.user_id),method='delete')}
52 ${h.form(url('user', id=user.user_id),method='delete')}
51 ${h.submit('remove','delete',class_="delete_icon action_button")}
53 ${h.submit('remove','delete',class_="delete_icon action_button")}
General Comments 0
You need to be logged in to leave comments. Login now