From d60b5c71ef343c54fd01942846dcec232fc75bb6 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Wed, 4 Sep 2024 13:05:51 +0300 Subject: Switch for dot access when accessing array elements in template. Signed-off-by: Munyoki Kilyungi --- gn2/wqflask/templates/wiki/history.html | 54 +++++++++++++++------------------ 1 file changed, 24 insertions(+), 30 deletions(-) (limited to 'gn2/wqflask/templates') diff --git a/gn2/wqflask/templates/wiki/history.html b/gn2/wqflask/templates/wiki/history.html index bc757603..18ca0514 100644 --- a/gn2/wqflask/templates/wiki/history.html +++ b/gn2/wqflask/templates/wiki/history.html @@ -12,48 +12,42 @@ Gene Symbol: - {{ most_recent["symbol"] }} + {{ most_recent.symbol }} - {% if most_recent["species"] %} - - Species: - {{ most_recent["species"] }} - - {% endif %} - {% if most_recent["pubmed_ids"] %} + {% if most_recent.pubmed_ids %} PubMed IDs: - {% for id in most_recent["pubmed_ids"] %} + {% for id in most_recent.pubmed_ids %} {{ id }}  {% endfor %} {% endif %} - {% if most_recent["web_url"] %} + {% if most_recent.web_url %} Web URL: - {{ most_recent["web_url"] }} + {{ most_recent.web_url }} {% endif %} Entry: - {{ most_recent["comment"] }} + {{ most_recent.comment }} - {% if most_recent["categories"] %} + {% if most_recent.categories %} Category: - {{ '; '.join(most_recent["categories"]) }} + {{ '; '.join(most_recent.categories) }} {% endif %} Add Time: - {{ most_recent["created"] }} + {{ most_recent.created }} - {% if most_recent["reason"] %} + {% if most_recent.reason %} Reason for Modification: - {{ most_recent["reason"] }} + {{ most_recent.reason }} {% endif %} @@ -65,48 +59,48 @@ - + - {% if version["species"] %} + {% if version.species %} - + {% endif %} - {% if version["pubmed_ids"] %} + {% if version.pubmed_ids %} {% endif %} - {% if version["web_url"] %} + {% if version.web_url %} - + {% endif %} - + - {% if version["categories"] %} + {% if version.categories %} - + {% endif %} - + - {% if version["reason"] %} + {% if version.reason %} - + {% endif %}
Gene Symbol:{{ version["symbol"] }}{{ version.symbol }}
Species:{{ version["species"] }}{{ version.species }}
PubMed IDs: - {% for id in version["pubmed_ids"] %} + {% for id in version.pubmed_ids %} {{ id }}  {% endfor %}
Web URL:{{ version["web_url"] }}{{ version.web_url }}
Entry:{{ version["comment"] }}{{ version.comment }}
Category:{{ '; '.join(version["categories"]) }}{{ '; '.join(version.categories) }}
Add Time:{{ version["created"] }}{{ version.created }}
Reason for Modification:{{ version["reason"] }}{{ version.reason }}
-- cgit v1.2.3