diff options
author | Munyoki Kilyungi | 2024-09-04 13:05:51 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-09-05 16:41:17 +0300 |
commit | d60b5c71ef343c54fd01942846dcec232fc75bb6 (patch) | |
tree | 5dd0f54657f5e99682e5f44a2f6cb3295e4e3488 | |
parent | 62c373c939426c1cfc01a7bb4ffe6fcc75252ed1 (diff) | |
download | genenetwork2-d60b5c71ef343c54fd01942846dcec232fc75bb6.tar.gz |
Switch for dot access when accessing array elements in template.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r-- | gn2/wqflask/templates/wiki/history.html | 54 |
1 files changed, 24 insertions, 30 deletions
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 @@ <tbody> <tr> <th>Gene Symbol:</th> - <td>{{ most_recent["symbol"] }}</td> + <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"] %} + {% if most_recent.pubmed_ids %} <tr> <th>PubMed IDs:</th> <td> - {% for id in most_recent["pubmed_ids"] %} + {% 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"] %} + {% if most_recent.web_url %} <tr> <th>Web URL:</th> - <td>{{ most_recent["web_url"] }}</td> + <td>{{ most_recent.web_url }}</td> </tr> {% endif %} <tr> <th>Entry:</th> - <td>{{ most_recent["comment"] }}</td> + <td>{{ most_recent.comment }}</td> </tr> - {% if most_recent["categories"] %} + {% if most_recent.categories %} <tr> <th>Category:</th> - <td>{{ '; '.join(most_recent["categories"]) }}</td> + <td>{{ '; '.join(most_recent.categories) }}</td> </tr> {% endif %} <tr> <th>Add Time:</th> - <td>{{ most_recent["created"] }}</td> + <td>{{ most_recent.created }}</td> </tr> - {% if most_recent["reason"] %} + {% if most_recent.reason %} <tr> <th>Reason for Modification:</th> - <td>{{ most_recent["reason"] }}</td> + <td>{{ most_recent.reason }}</td> </tr> {% endif %} </tbody> @@ -65,48 +59,48 @@ <table class="table table-responsive table-bordered"> <tr> <th>Gene Symbol:</th> - <td>{{ version["symbol"] }}</td> + <td>{{ version.symbol }}</td> </tr> - {% if version["species"] %} + {% if version.species %} <tr> <th>Species:</th> - <td>{{ version["species"] }}</td> + <td>{{ version.species }}</td> </tr> {% endif %} - {% if version["pubmed_ids"] %} + {% if version.pubmed_ids %} <tr> <th>PubMed IDs:</th> <td> - {% for id in version["pubmed_ids"] %} + {% 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"] %} + {% if version.web_url %} <tr> <th>Web URL:</th> - <td>{{ version["web_url"] }}</td> + <td>{{ version.web_url }}</td> </tr> {% endif %} <tr> <th>Entry:</th> - <td>{{ version["comment"] }}</td> + <td>{{ version.comment }}</td> </tr> - {% if version["categories"] %} + {% if version.categories %} <tr> <th>Category:</th> - <td>{{ '; '.join(version["categories"]) }}</td> + <td>{{ '; '.join(version.categories) }}</td> </tr> {% endif %} <tr> <th>Add Time:</th> - <td>{{ version["created"] }}</td> + <td>{{ version.created }}</td> </tr> - {% if version["reason"] %} + {% if version.reason %} <tr> <th>Reason for Modification:</th> - <td>{{ version["reason"] }}</td> + <td>{{ version.reason }}</td> </tr> {% endif %} </table> |