minecraft_manager/templates/minecraft_manager/note.html

47 lines
1.5 KiB
HTML

{% extends "minecraft_manager/dashboard.html" %}
{% block title %}Notes{% 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>Importance</th>
<td>Issued By</td>
<th>Date</th>
</tr>
</thead>
<tbody>
{% for note in notes %}
<tr {% if note.importance == 'L' %}class="info"{% endif %}{% if note.importance == 'M' %}class="warning"{% endif %}{% if note.importance == 'H' %}class="danger"{% endif %} data-id="{{ note.id }}">
<!-- <td>{{ note.id }}</td> -->
<td>{{ note.issuee }}</td>
<td>{{ note.snippet }}</td>
<td>{{ note.importance_display }}</td>
<td>{{ note.issuer }}</td>
<td>{{ note.date }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<a class="btn btn-primary" href="{% url "note_add" %}">Add Note</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 %}