admin: move biglist actions for users to the user page sidebar

This commit is contained in:
Frédéric Péters 2012-08-14 16:22:56 +02:00
parent c23af2b525
commit 7b87646faa
1 changed files with 10 additions and 12 deletions

View File

@ -167,6 +167,10 @@ class UserPage(Directory):
def get_sidebar [html] (self):
ident_methods = get_cfg('identification', {}).get('methods', [])
'<ul>'
'<li><a href="edit">%s</a></li>' % _('Edit')
'<li><a href="delete">%s</a></li>' % _('Delete')
for method in ident_methods:
try:
actions = qommon.ident.get_method_user_directory(
@ -175,6 +179,12 @@ class UserPage(Directory):
continue
for action_url, action_label in actions:
'<li><a href="%s/%s">%s</a></li>' % (method, action_url, action_label)
debug_cfg = get_cfg('debug', {})
if debug_cfg.get('logger', False):
'<li><a href="../../logger/by_user/%s/">' % self.user.id
'%s</a></li>' % _('Logs')
'</ul>'
def debug [html] (self):
@ -346,18 +356,6 @@ class UsersDirectory(Directory):
'<p class="details">'
if user.email:
user.email
'</p>'
'<p class="commands">'
if not user.name_identifiers and has_idp_as_ident:
command_icon('%s/token' % user.id, 'token',
label = _('Email with Identification Token'),
icon = 'mail_rpl_16.png')
command_icon('%s/edit' % user.id, 'edit')
command_icon('%s/delete' % user.id, 'remove', popup = True)
if debug_cfg.get('logger', False):
command_icon('../logger/by_user/%s/' % user.id, 'logs',
label = _('Logs'), icon = 'stock_harddisk_16.png')
'</p></li>'
'</ul>'