From 48f76631dfd75a2c2a6ed739854461146b2184bc Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 3 Sep 2024 14:26:36 +0300 Subject: 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 --- gn2/wqflask/templates/wiki/history.html | 139 ++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 gn2/wqflask/templates/wiki/history.html (limited to 'gn2/wqflask/templates') 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 %} + +{% endblock %} +{% block content %} + {{ flash_me() }} +
+

GeneWiki Entry History

+ {% if most_recent %} +

+ Most Recent Version: +

+ + + + + + + {% if most_recent["species"] %} + + + + + {% endif %} + {% if most_recent["pubmed_ids"] %} + + + + + {% endif %} + {% if most_recent["web_url"] %} + + + + + {% endif %} + + + + + {% if most_recent["categories"] %} + + + + + {% endif %} + + + + + {% if most_recent["reason"] %} + + + + + {% endif %} + +
Gene Symbol:{{ most_recent["symbol"] }}
Species:{{ most_recent["species"] }}
PubMed IDs: + {% for id in most_recent["pubmed_ids"] %} + {{ id }}  + {% endfor %} +
Web URL:{{ most_recent["web_url"] }}
Entry:{{ most_recent["comment"] }}
Category:{{ '; '.join(most_recent["categories"]) }}
Add Time:{{ most_recent["created"] }}
Reason for Modification:{{ most_recent["reason"] }}
+ {% endif %} +

+ Previous Version: +

+ {% if previous_versions %} + {% for version in previous_versions %} + + + + + + {% if version["species"] %} + + + + + {% endif %} + {% if version["pubmed_ids"] %} + + + + + {% endif %} + {% if version["web_url"] %} + + + + + {% endif %} + + + + + {% if version["categories"] %} + + + + + {% endif %} + + + + + {% if version["reason"] %} + + + + + {% endif %} +
Gene Symbol:{{ version["symbol"] }}
Species:{{ version["species"] }}
PubMed IDs: + {% for id in version["pubmed_ids"] %} + {{ id }}  + {% endfor %} +
Web URL:{{ version["web_url"] }}
Entry:{{ version["comment"] }}
Category:{{ '; '.join(version["categories"]) }}
Add Time:{{ version["created"] }}
Reason for Modification:{{ version["reason"] }}
+ {% endfor %} + {% else %} +

No Previous History

+ {% endif %} +
+{% endblock %} -- cgit v1.2.3