1
0
mirror of https://github.com/Adam-Ant/QuotesDB synced 2024-12-20 11:34:35 +00:00
QuotesDB/templates/quote_view.html

51 lines
1.6 KiB
HTML
Raw Normal View History

2017-10-03 01:18:13 +00:00
{% extends "layout.html" %}
{% block head %}
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.13/css/dataTables.bootstrap.min.css">
<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.13/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" class="init">
$(document).ready(function() {
$('#QuoteTable').DataTable( {
"order": [[ 0,"desc" ]],
"lengthMenu": [[ 10, 25, 50, 100, -1 ], [ 10, 25, 50, 100, "All" ]],
"pagingType": "full_numbers",
"stateSave": true
} );
} );
</script>
{% endblock %}
{% block body %}
<div class="table-responsive">
<table class="table table-hover table-bordered" id="QuoteTable">
<thead>
<tr>
<th>Date Added</th>
<th>User</th>
<th>Quote</th>
<th>Context</th>
{% if data[1] %}
<th>Added By:</th>
<th><span class="glyphicon glyphicon-trash"></span></th>
{% endif %}
2017-10-03 01:18:13 +00:00
</tr>
</thead>
<tbody>
{% for entry in data[0] %}
2017-10-03 01:18:13 +00:00
<tr>
<td><a href="/">{{ entry[2] }}</a></td>
2017-10-03 01:18:13 +00:00
<td>{{ uid_to_user(entry[3]) }}</td>
<td>{{ entry[1] }}</td>
<td>{{ entry[4] }}</td>
{% if data[1] %}
<td>{{ uid_to_user(entry[5]) }}</td>
<td><a href="/deletequote?id={{ entry[0] }}" class="btn btn-danger"role="button" ><span class="glyphicon glyphicon-trash"></span></a></td>
{% endif %}
2017-10-03 01:18:13 +00:00
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}