Allow filtering of active users for resolved tickets (#40)
parent
3af8642ff0
commit
aa221fb398
|
@ -3,22 +3,37 @@
|
|||
{% block title %}Overview{% endblock %}
|
||||
{% block head %}
|
||||
<script src="{% static 'minecraft_manager/js/chart.min.js' %}"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(".staff-inactive").hide();
|
||||
$("#active-only").change(function() {
|
||||
if ($(this)[0].checked) {
|
||||
$(".staff-inactive").hide();
|
||||
} else {
|
||||
$(".staff-inactive").show();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block section %}
|
||||
<div id="content">
|
||||
{% if request.user.is_staff %}
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-body">
|
||||
<h4><span class="label label-danger">Admin Area</span></h4>
|
||||
<h3>Resolved Tickets</h3>
|
||||
<div class="row">
|
||||
{% for staff in data.resolved %}
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<p><span class="label label-{% if staff.active %}success{% else %}danger{% endif %}">{% if staff.active %}Active{% else %}Inactive{% endif %}</span> {{ staff.username }}: {{ staff.tickets }}</p>
|
||||
<div class="panel-body">
|
||||
<h4><span class="label label-danger">Admin Area</span></h4>
|
||||
<h3>Resolved Tickets</h3>
|
||||
<label>Active Only
|
||||
<input id="active-only" type="checkbox" checked/>
|
||||
</label>
|
||||
<div class="row">
|
||||
{% for staff in data.resolved %}
|
||||
<div class="col-xs-6 col-md-4{% if not staff.active %} staff-inactive{% endif %}">
|
||||
<p><span class="label label-{% if staff.active %}success{% else %}danger{% endif %}">{% if staff.active %}Active{% else %}Inactive{% endif %}</span> {{ staff.username }}: {{ staff.tickets }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue