about summary refs log tree commit diff
path: root/gn2/wqflask/templates/edit_history.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/edit_history.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/edit_history.html')
-rw-r--r--gn2/wqflask/templates/edit_history.html56
1 files changed, 56 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/edit_history.html b/gn2/wqflask/templates/edit_history.html
new file mode 100644
index 00000000..876ab085
--- /dev/null
+++ b/gn2/wqflask/templates/edit_history.html
@@ -0,0 +1,56 @@
+{% 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 -->
+<div class="container">
+
+  <h1>History</h1>
+    {% if diff %}
+    <div class="row">
+      <table id="history" class="table-responsive table-hover table-striped cell-border">
+	<thead>
+          <th>Timestamp</th>
+          <th>Editor</th>
+          <th>Field</th>
+          <th>Diff</th>
+	</thead>
+	<tbody>
+	  {%set ns = namespace(display_ts=True)%}
+	  {%for ts, item in diff.items()%}
+	  {%set ns.display_ts = True%}
+	  {%for the_diff in item%}
+	  <tr>
+	    {%if ns.display_ts%}
+	    <td rowspan={{item | length}}>{{ts}}</td>
+	    {%set ns.display_ts = False%}
+	    {%endif%}
+	    <td>{{the_diff.author}}</td>
+	    <td>{{the_diff.diff.field}}</td>
+	    <td><pre>{{the_diff.diff.diff}}</pre></td>
+	  </tr>
+	  {%endfor%}
+	  {%endfor%}
+	</tbody>
+      </table>
+    </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() {
+     $('#history').dataTable();
+ });
+</script>
+{% endblock %}