diff options
author | Munyoki Kilyungi | 2024-09-03 14:26:36 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-09-05 16:41:17 +0300 |
commit | 48f76631dfd75a2c2a6ed739854461146b2184bc (patch) | |
tree | 507b4c9016f3d7aa16d75f56a009c98f9c66d83a /gn2/wqflask/templates | |
parent | 7c2d18143f608b98be577e41257db8954a0c3c7f (diff) | |
download | genenetwork2-48f76631dfd75a2c2a6ed739854461146b2184bc.tar.gz |
Add comment history page.
* gn2/wqflask/templates/wiki/history.html: New page.
* gn2/wqflask/views.py (display_wiki_history): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn2/wqflask/templates')
-rw-r--r-- | gn2/wqflask/templates/wiki/history.html | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/wiki/history.html b/gn2/wqflask/templates/wiki/history.html new file mode 100644 index 00000000..e10ff683 --- /dev/null +++ b/gn2/wqflask/templates/wiki/history.html @@ -0,0 +1,139 @@ +{% extends "base.html" %} +{% block css %} + <style type="text/css"> + h3 { + color: #336699; + } + + table tbody th { + width: 18em; + } + + table tbody th, + table tbody td { + padding: 3px; + } + + table { + margin-left: 0.5em; + } + </style> +{% endblock %} +{% block content %} + {{ flash_me() }} + <div class = "container container-fluid"> + <h2>GeneWiki Entry History</h2> + {% if most_recent %} + <h3> + <strong>Most Recent Version:</strong> + </h3> + <table class="table table-responsive table-bordered"> + <tbody> + <tr> + <th>Gene Symbol:</th> + <td>{{ most_recent["symbol"] }}</td> + </tr> + {% if most_recent["species"] %} + <tr> + <th>Species:</th> + <td>{{ most_recent["species"] }}</td> + </tr> + {% endif %} + {% if most_recent["pubmed_ids"] %} + <tr> + <th>PubMed IDs:</th> + <td> + {% for id in most_recent["pubmed_ids"] %} + <a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids={{ id }}&dopt=Abstract">{{ id }}</a> + {% endfor %} + </td> + </tr> + {% endif %} + {% if most_recent["web_url"] %} + <tr> + <th>Web URL:</th> + <td>{{ most_recent["web_url"] }}</td> + </tr> + {% endif %} + <tr> + <th>Entry:</th> + <td>{{ most_recent["comment"] }}</td> + </tr> + {% if most_recent["categories"] %} + <tr> + <th>Category:</th> + <td>{{ '; '.join(most_recent["categories"]) }}</td> + </tr> + {% endif %} + <tr> + <th>Add Time:</th> + <td>{{ most_recent["created"] }}</td> + </tr> + {% if most_recent["reason"] %} + <tr> + <th>Reason for Modification:</th> + <td>{{ most_recent["reason"] }}</td> + </tr> + {% endif %} + </tbody> + </table> + {% endif %} + <h3> + <strong>Previous Version:</strong> + </h3> + {% if previous_versions %} + {% for version in previous_versions %} + <table class="table table-responsive table-bordered"> + <tr> + <th>Gene Symbol:</th> + <td>{{ version["symbol"] }}</td> + </tr> + {% if version["species"] %} + <tr> + <th>Species:</th> + <td>{{ version["species"] }}</td> + </tr> + {% endif %} + {% if version["pubmed_ids"] %} + <tr> + <th>PubMed IDs:</th> + <td> + {% for id in version["pubmed_ids"] %} + <a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids={{ id }}&dopt=Abstract">{{ id }}</a> + {% endfor %} + </td> + </tr> + {% endif %} + {% if version["web_url"] %} + <tr> + <th>Web URL:</th> + <td>{{ version["web_url"] }}</td> + </tr> + {% endif %} + <tr> + <th>Entry:</th> + <td>{{ version["comment"] }}</td> + </tr> + {% if version["categories"] %} + <tr> + <th>Category:</th> + <td>{{ '; '.join(version["categories"]) }}</td> + </tr> + {% endif %} + <tr> + <th>Add Time:</th> + <td>{{ version["created"] }}</td> + </tr> + {% if version["reason"] %} + <tr> + <th>Reason for Modification:</th> + <td>{{ version["reason"] }}</td> + </tr> + {% endif %} + </table> + {% endfor %} + {% else %} + <p>No Previous History</p> + {% endif %} + </div> +{% endblock %} |