aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/display_files.html
diff options
context:
space:
mode:
authorArun Isaac2023-12-29 18:55:37 +0000
committerArun Isaac2023-12-29 19:01:46 +0000
commit204a308be0f741726b9a620d88fbc22b22124c81 (patch)
treeb3cf66906674020b530c844c2bb4982c8a0e2d39 /gn2/wqflask/templates/display_files.html
parent83062c75442160427b50420161bfcae2c5c34c84 (diff)
downloadgenenetwork2-204a308be0f741726b9a620d88fbc22b22124c81.tar.gz
Namespace all modules under gn2.
We move all modules under a gn2 directory. This is important for "correct" packaging and deployment as a Guix service.
Diffstat (limited to 'gn2/wqflask/templates/display_files.html')
-rw-r--r--gn2/wqflask/templates/display_files.html131
1 files changed, 131 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/display_files.html b/gn2/wqflask/templates/display_files.html
new file mode 100644
index 00000000..d0e8cc33
--- /dev/null
+++ b/gn2/wqflask/templates/display_files.html
@@ -0,0 +1,131 @@
+{% 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) %}
+{% if messages %}
+<div class="container-fluid bg-{{ category }}">
+ {% for category, message in messages %}
+ <div class="alert {{category}}" role="alert">{{ message }}</div>
+ {% endfor %}
+</div>
+{% endif %}
+{% endwith %}
+
+<div class="container">
+ {%if (not waiting) and (not approved) and (not rejected)%}
+ <div class="row" style="text-align: left; padding: 5em 0 0 5em;">
+ <span class="glyphicon glyphicon-info-sign text-info"></span>
+ <strong>There are no diffs to act on.</strong>
+ </div>
+ {%endif%}
+ {% if waiting %}
+ <h2>Files for approval:</h2>
+ <div class="row">
+ <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>
+ <th scope="col">TimeStamp</th>
+ <th scope="col"></th>
+ <th scope="col"></th>
+ </thead>
+ <tbody>
+ {% for data in waiting %}
+ <tr>
+ {% set file_url = url_for('metadata_edit.show_diff', name=data.filepath.name) %}
+ <td><a href="{{ file_url }}" target="_blank">{{ data.meta.get("resource_id") }}</a></td>
+ <td>{{ data.meta.get("author")}}</td>
+ <td>{{ data.meta.get("time_stamp")}}</td>
+ {% set reject_url = url_for('metadata_edit.reject_data', resource_id=data.meta.get('resource_id'), file_name=data.filepath.name, dataset_name=data.diff.dataset_name, trait_name=data.diff.trait_name) %}
+ {% set approve_url = url_for('metadata_edit.approve_data', resource_id=data.meta.get('resource_id'), file_name=data.filepath.name, dataset_name=data.diff.dataset_name, trait_name=data.diff.trait_name) %}
+ <td>
+ <button type="button"
+ class="btn btn-secondary btn-sm">
+ <a href="{{ reject_url }}">Reject</a>
+ </button>
+ </td>
+ <td>
+ <button type="button"
+ class="btn btn-warning btn-sm">
+ <a href="{{ approve_url }}">Approve</a>
+ </button>
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ </div>
+ {% endif %}
+
+ {% if approved %}
+ <h2>Approved Data:</h2>
+ <div class="row">
+ <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>
+ <th scope="col">TimeStamp</th>
+ </thead>
+ <tbody>
+ {% for data in approved %}
+ <tr>
+ {% set file_url = url_for('metadata_edit.show_diff', name=data.filepath.name) %}
+ <td><a href="{{ file_url }}" target="_blank">{{ data.meta.get("resource_id") }}</a></td>
+ <td>{{ data.meta.get("author")}}</td>
+ <td>{{ data.meta.get("time_stamp")}}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ </div>
+ {% endif %}
+
+ {% if rejected %}
+ <h2>Rejected Files:</h2>
+ <div class="row">
+ <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>
+ <th scope="col">TimeStamp</th>
+ </thead>
+ <tbody>
+ {% for data in rejected %}
+ <tr>
+ {% set file_url = url_for('metadata_edit.show_diff', name=data.filepath.name) %}
+ <td><a href="{{ file_url }}" target="_blank">{{ data.meta.get("resource_id") }}</a></td>
+ <td>{{ data.meta.get("author")}}</td>
+ <td>{{ data.meta.get("time_stamp")}}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ </div>
+ {% endif %}
+</div>
+{%endblock%}
+
+{% block js %}
+<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 %}