parent
60806362bc
commit
28841c58d6
|
@ -15,24 +15,24 @@ def get_sidebar(current_app, request):
|
|||
if len(unseen_alerts) > 0:
|
||||
unseen_html = " <span class='badge badge-light'>" + str(len(unseen_alerts)) + "</span>"
|
||||
|
||||
ret = '<li {}><a href="{}"><span class="glyphicon glyphicon-home"></span> Overview</a></li>'.format('class="active"' if current_app == 'overview' else "", reverse('overview'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-ban-circle"></span> Bans</a></li>'.format('class="active"' if current_app == 'ban' else '', reverse('ban'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-inbox"></span> Alerts{}</a></li>'.format('class="active"' if current_app == 'alert' else '', reverse('alert'), unseen_html)
|
||||
ret = '<li {}><a href="{}"><span class="glyphicon glyphicon-home"></span> Overview</a></li>'.format('class="active"' if current_app == 'overview' else "", reverse('overview'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-ban-circle"></span> Bans</a></li>'.format('class="active"' if current_app == 'ban' else '', reverse('ban'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-inbox"></span> Alerts{}</a></li>'.format('class="active"' if current_app == 'alert' else '', reverse('alert'), unseen_html)
|
||||
|
||||
# Models
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-file"></span> Applications</a></li>'.format('class="active"' if current_app == 'application' else '', reverse('application'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-user"></span> Players</a></li>'.format('class="active"' if current_app == 'player' else '', reverse('player'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-tags"></span> Tickets</a></li>'.format('class="active"' if current_app == 'ticket' else '', reverse('ticket'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-warning-sign"></span> Warnings</a></li>'.format('class="active"' if current_app == 'warning' else '', reverse('warning'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-file"></span> Applications</a></li>'.format('class="active"' if current_app == 'application' else '', reverse('application'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-user"></span> Players</a></li>'.format('class="active"' if current_app == 'player' else '', reverse('player'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-tags"></span> Tickets</a></li>'.format('class="active"' if current_app == 'ticket' else '', reverse('ticket'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-warning-sign"></span> Warnings</a></li>'.format('class="active"' if current_app == 'warning' else '', reverse('warning'))
|
||||
|
||||
# Split up MCM and "other"
|
||||
ret += "<hr/>"
|
||||
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-wrench"></span> Report</a></li>'.format('class="active"' if current_app == 'report' else '', reverse('report'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-wrench"></span> Report</a></li>'.format('class="active"' if current_app == 'report' else '', reverse('report'))
|
||||
|
||||
show_chat = True if getattr(settings, 'GLOBAL_LOG', None) is not None else False
|
||||
if show_chat and request.user.has_perm('auth.chat'):
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-comment"></span> Chat</a></li>'.format('class="active"' if current_app == 'chat' else '', reverse('chat'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-comment"></span> Chat</a></li>'.format('class="active"' if current_app == 'chat' else '', reverse('chat'))
|
||||
if request.user.has_perm('auth.bots'):
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-flash"></span> Bots</a></li>'.format('class="active"' if current_app == 'bots' else '', reverse('bots'))
|
||||
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-flash"></span> Bots</a></li>'.format('class="active"' if current_app == 'bots' else '', reverse('bots'))
|
||||
return ret
|
||||
|
|
Loading…
Reference in New Issue