diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-06-05 17:22:55 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-06-05 17:22:55 +0100 |
| commit | 3f18897ad2fe0069a8a7ef9a52ccdefb695bd992 (patch) | |
| tree | e0087747a729b700fd3049594d6fa0473c651437 /app/templates/admin/annotations.html | |
| parent | Rename manage to manage_tasks (diff) | |
| download | AnnotateChange-3f18897ad2fe0069a8a7ef9a52ccdefb695bd992.tar.gz AnnotateChange-3f18897ad2fe0069a8a7ef9a52ccdefb695bd992.zip | |
Add support for DataTables in admin view
Diffstat (limited to 'app/templates/admin/annotations.html')
| -rw-r--r-- | app/templates/admin/annotations.html | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/app/templates/admin/annotations.html b/app/templates/admin/annotations.html index 089de3b..bedf425 100644 --- a/app/templates/admin/annotations.html +++ b/app/templates/admin/annotations.html @@ -1,6 +1,11 @@ {% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} +{% block styles %} +{{ super() }} +<link rel="stylesheet" href="{{ bootstrap_find_resource('css/jquery.dataTables.css', cdn='datatables', use_minified=True) }}"> +{% endblock %} + {% block app_content %} <h1>View Annotations</h1> <div class="row"> @@ -8,8 +13,9 @@ {{ wtf.quick_form(form) }} </div> </div> +<br> <article class="overview"> - <table class="table table-striped"> + <table id="annotations-table" class="table table-striped"> <thead class="thead-dark"> <th scope="col">Dataset</th> <th scope="col">Username</th> @@ -26,3 +32,13 @@ </table> </article> {% endblock %} + +{% block scripts %} +{{ super() }} +<script src="{{ bootstrap_find_resource('js/jquery.dataTables.js', cdn='datatables', use_minified=True) }}"></script> +<script> + $(document).ready(function() { + $('#annotations-table').DataTable(); + }); +</script> +{% endblock scripts %} |
