From 233d4b7725849c246f646a54b33e2106fbf2e4bc Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Wed, 4 Sep 2024 12:47:40 +0300 Subject: Remove un-necessary "if" checks in comment history page. Signed-off-by: Munyoki Kilyungi --- gn2/wqflask/templates/wiki/history.html | 188 ++++++++++++++++---------------- 1 file changed, 91 insertions(+), 97 deletions(-) (limited to 'gn2') diff --git a/gn2/wqflask/templates/wiki/history.html b/gn2/wqflask/templates/wiki/history.html index d0a3ead6..77c8e9f7 100644 --- a/gn2/wqflask/templates/wiki/history.html +++ b/gn2/wqflask/templates/wiki/history.html @@ -25,117 +25,111 @@ {{ flash_me() }}

GeneWiki Entry History

- {% if most_recent %} -

- Most Recent Version: -

- - +

+ Most Recent Version: +

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

Previous Version:

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

No Previous History

- {% endif %} + {% endif %} + + Add Time: + {{ version["created"] }} + + {% if version["reason"] %} + + Reason for Modification: + {{ version["reason"] }} + + {% endif %} + + {% endfor %}
{% endblock %} -- cgit v1.2.3