minecraft_manager/templates/minecraft_manager/warning.html

47 lines
1.5 KiB
HTML

{% extends "minecraft_manager/dashboard.html" %}
{% block title %}Warnings{% endblock %}
{% block section %}
<div id="content" hidden="hidden">
<table id="model-table" class="table table-hover link-table">
<thead>
<tr>
<th>Player</th>
<th>Message</th>
<th>Severity</th>
<td>Issued By</td>
<th>Date</th>
</tr>
</thead>
<tbody>
{% for warning in warnings %}
<tr {% if warning.severity == 'L' %}class="info"{% endif %}{% if warning.severity == 'M' %}class="warning"{% endif %}{% if warning.severity == 'H' %}class="danger"{% endif %} data-id="{{ warning.id }}">
<!-- <td>{{ warning.id }}</td> -->
<td>{{ warning.issuee }}</td>
<td>{{ warning.snippet }}</td>
<td>{{ warning.severity_display }}</td>
<td>{{ warning.issuer }}</td>
<td>{{ warning.date }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<a class="btn btn-primary" href="{% url "warning_add" %}">Add Warning</a>
</div>
<script>
$(document).ready(function() {
$("#model-table").DataTable({
'lengthMenu': [ [ 10, 25, 50, 100, -1 ], [ 10, 25, 50, 100, "All" ] ],
'initComplete': function(settings, json) {
$("#content").show();
$(this).css('width', '');
},
'order': [],
{% if user.usersettings %}
'pageLength': {{ user.usersettings.default_results }},
{% endif %}
});
});
</script>
{% endblock section %}