parent
b75ddee03b
commit
60806362bc
|
@ -25,7 +25,7 @@
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
{% template_settings 'DASHBOARD_TITLE' as DASHBOARD_TITLE %}
|
{% template_settings 'DASHBOARD_TITLE' as DASHBOARD_TITLE %}
|
||||||
<a class="navbar-brand">{% if DASHBOARD_TITLE %}{{ DASHBOARD_TITLE }}{% else %}Minecraft Manager{% endif %}</a>
|
<a class="navbar-brand" style="color:inherit;cursor:default;">{% if DASHBOARD_TITLE %}{{ DASHBOARD_TITLE }}{% else %}Minecraft Manager{% endif %}</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="navbar" class="navbar-collapse collapse">
|
<div id="navbar" class="navbar-collapse collapse">
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
|
@ -54,6 +54,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<form method="GET" action="{% url 'player' %}" class="navbar-form navbar-right">
|
<form method="GET" action="{% url 'player' %}" class="navbar-form navbar-right">
|
||||||
|
<span><i class="glyphicon glyphicon-search"> </i></span>
|
||||||
<input type="text" class="form-control" name="search" placeholder="Player Search..." value="{% if 'search' in request.GET %}{{ request.GET.search }}{% endif %}">
|
<input type="text" class="form-control" name="search" placeholder="Player Search..." value="{% if 'search' in request.GET %}{{ request.GET.search }}{% endif %}">
|
||||||
<button class="btn btn-default" type="submit">Search</button>
|
<button class="btn btn-default" type="submit">Search</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -15,55 +15,24 @@ def get_sidebar(current_app, request):
|
||||||
if len(unseen_alerts) > 0:
|
if len(unseen_alerts) > 0:
|
||||||
unseen_html = " <span class='badge badge-light'>" + str(len(unseen_alerts)) + "</span>"
|
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 = ""
|
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-ban-circle"></span> Bans</a></li>'.format('class="active"' if current_app == 'ban' else '', reverse('ban'))
|
||||||
if current_app == 'overview':
|
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 class=\"active\"><a href=\"" + reverse('overview') + "\">Overview</a></li>"
|
|
||||||
else:
|
|
||||||
ret += "<li><a href=\"" + reverse('overview') + "\">Overview</a></li>"
|
|
||||||
if current_app == 'ban':
|
|
||||||
ret += "<li class=\"active\"><a href=\"" + reverse('ban') + "\">Bans</a></li>"
|
|
||||||
else:
|
|
||||||
ret += "<li><a href=\"" + reverse('ban') + "\">Bans</a></li>"
|
|
||||||
if current_app == 'alert':
|
|
||||||
ret += "<li class=\"active\"><a href=\"" + reverse('alert') + "\">Alerts{0}</a></li>".format(unseen_html)
|
|
||||||
else:
|
|
||||||
ret += "<li><a href=\"" + reverse('alert') + "\">Alerts{0}</a></li>".format(unseen_html)
|
|
||||||
|
|
||||||
# Models
|
# Models
|
||||||
if current_app == 'application':
|
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 class=\"active\"><a href=\"" + reverse('application') + "\">Applications</a></li>"
|
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-user"></span> Players</a></li>'.format('class="active"' if current_app == 'player' else '', reverse('player'))
|
||||||
else:
|
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=\"" + reverse('application') + "\">Applications</a></li>"
|
ret += '<li {}><a href="{}"><span class="glyphicon glyphicon-warning-sign"></span> Warnings</a></li>'.format('class="active"' if current_app == 'warning' else '', reverse('warning'))
|
||||||
if current_app == 'player':
|
|
||||||
ret += "<li class=\"active\"><a href=\"" + reverse('player') + "\">Players</a></li>"
|
|
||||||
else:
|
|
||||||
ret += "<li><a href=\"" + reverse('player') + "\">Players</a></li>"
|
|
||||||
if current_app == 'ticket':
|
|
||||||
ret += "<li class=\"active\"><a href=\"" + reverse('ticket') + "\">Tickets</a></li>"
|
|
||||||
else:
|
|
||||||
ret += "<li><a href=\"" + reverse('ticket') + "\">Tickets</a></li>"
|
|
||||||
if current_app == 'warning':
|
|
||||||
ret += "<li class=\"active\"><a href=\"" + reverse('warning') + "\">Warnings</a></li>"
|
|
||||||
else:
|
|
||||||
ret += "<li><a href=\"" + reverse('warning') + "\">Warnings</a></li>"
|
|
||||||
|
|
||||||
# Split up MCM and "other"
|
# Split up MCM and "other"
|
||||||
ret += "<hr/>"
|
ret += "<hr/>"
|
||||||
|
|
||||||
if current_app == 'report':
|
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 class=\"active\"><a href=\"" + reverse("report") + "\">Report</a></li>"
|
|
||||||
else:
|
|
||||||
ret += "<li><a href=\"" + reverse("report") + "\">Report</a></li>"
|
|
||||||
show_chat = True if getattr(settings, 'GLOBAL_LOG', None) is not None else False
|
show_chat = True if getattr(settings, 'GLOBAL_LOG', None) is not None else False
|
||||||
if show_chat and request.user.has_perm('auth.chat'):
|
if show_chat and request.user.has_perm('auth.chat'):
|
||||||
if current_app == '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 class=\"active\"><a href=\"" + reverse("chat") + "\">Chat</a></li>"
|
|
||||||
else:
|
|
||||||
ret += "<li><a href=\"" + reverse("chat") + "\">Chat</a></li>"
|
|
||||||
if request.user.has_perm('auth.bots'):
|
if request.user.has_perm('auth.bots'):
|
||||||
if current_app == '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 class=\"active\"><a href=\"" + reverse("bots") + "\">Bots</a></li>"
|
|
||||||
else:
|
|
||||||
ret += "<li><a href=\"" + reverse("bots") + "\">Bots</a></li>"
|
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in New Issue