diff options
author | BonfaceKilz | 2021-12-22 11:31:07 +0300 |
---|---|---|
committer | BonfaceKilz | 2022-01-05 17:05:41 +0300 |
commit | ee8b2bdbfcf0250664c96797029408a52be118da (patch) | |
tree | 167faaf75f9146f3f86c3fa8c3f8cdd2fa0211bf /wqflask | |
parent | c5c5de8aa9a8078ba5d955f2fc22dbc2c2494610 (diff) | |
download | genenetwork2-ee8b2bdbfcf0250664c96797029408a52be118da.tar.gz |
Use datatables to display approved and rejected files
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/templates/display_files.html | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/wqflask/wqflask/templates/display_files.html b/wqflask/wqflask/templates/display_files.html index 2fd7d7ee..c8c446ba 100644 --- a/wqflask/wqflask/templates/display_files.html +++ b/wqflask/wqflask/templates/display_files.html @@ -1,5 +1,10 @@ {% extends "base.html" %} {% block title %}Trait Submission{% endblock %} + +{% block css %} +<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTables/css/jquery.dataTables.css') }}" /> +{% endblock %} + {% block content %} <!-- Start of body --> {% with messages = get_flashed_messages(with_categories=true) %} @@ -12,14 +17,12 @@ {% endif %} {% endwith %} - <div class="container"> - {% if waiting %} <div class="row"> Files for approval: - <div class="table-responsive"> - <table class="table m-0"> + <div class="col-md-7"> + <table class="table table-hover table-striped cell-border"> <thead> <th scope="col">Resource Id</</th> <th scope="col">Author</th> @@ -59,10 +62,10 @@ {% endif %} {% if approved %} + <h2>Approved Data:</h2> <div class="row"> - Approved Data: - <div class="table-responsive"> - <table class="table m-0"> + <div class="col-md-8"> + <table class="table-responsive table-hover table-striped cell-border" id="table-approved"> <thead> <th scope="col">Resource Id</</th> <th scope="col">Author</th> @@ -84,10 +87,10 @@ {% endif %} {% if rejected %} + <h2>Rejected Files:</h2> <div class="row"> - Rejected Files: - <div class="table-responsive"> - <table class="table m-0"> + <div class="col-md-8"> + <table class="table-responsive table-hover table-striped cell-border" id="table-rejected"> <thead> <th scope="col">Resource Id</</th> <th scope="col">Author</th> @@ -105,16 +108,20 @@ </tbody> </table> </div> - </div> + </div> {% endif %} - </div> - {%endblock%} {% block js %} -<script> +<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.js') }}"></script> +<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.min.js') }}"></script> +<script language="javascript" type="text/javascript"> gn_server_url = "{{ gn_server_url }}"; - + + $(document).ready( function() { + $('#table-approved').dataTable(); + $('#table-rejected').dataTable(); + }); </script> {% endblock %} |