diff options
author | Munyoki Kilyungi | 2024-09-04 13:43:23 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-09-05 16:41:17 +0300 |
commit | 5f11d9632b07a8db49191faaba9d13dac9f7d3c6 (patch) | |
tree | 0b9826af6a193055af5a5c589d9d158c7fe2da59 /gn2 | |
parent | d60b5c71ef343c54fd01942846dcec232fc75bb6 (diff) | |
download | genenetwork2-5f11d9632b07a8db49191faaba9d13dac9f7d3c6.tar.gz |
Display rows even if they dont exist.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn2')
-rw-r--r-- | gn2/wqflask/templates/wiki/history.html | 108 |
1 files changed, 46 insertions, 62 deletions
diff --git a/gn2/wqflask/templates/wiki/history.html b/gn2/wqflask/templates/wiki/history.html index 18ca0514..32c52b55 100644 --- a/gn2/wqflask/templates/wiki/history.html +++ b/gn2/wqflask/templates/wiki/history.html @@ -14,42 +14,35 @@ <th>Gene Symbol:</th> <td>{{ most_recent.symbol }}</td> </tr> - {% 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>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 %} + {% if not most_recent.pubmed_ids %}Not Available{% endif %} + </td> + </tr> + <tr> + <th>Web URL:</th> + <td>{{ most_recent.web_url or "Not Available" }}</td> + </tr> <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>Category:</th> + <td>{{ '; '.join(most_recent.categories) or "Not Available" }}</td> + </tr> <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 %} + <tr> + <th>Reason for Modification:</th> + <td>{{ most_recent.reason or "Not Available" }}</td> + </tr> </tbody> </table> <h3 class="text-info"> @@ -61,48 +54,39 @@ <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>Species:</th> + <td>{{ version.species or "Not Available" }}</td> + </tr> + <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 %} + {% if not most_recent.pubmed_ids %}Not Available{% endif %} + </td> + </tr> + <tr> + <th>Web URL:</th> + <td>{{ version.web_url or "Not Available " }}</td> + </tr> <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>Category:</th> + <td>{{ '; '.join(version.categories) or "Not Available" }}</td> + </tr> <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 %} + <tr> + <th>Reason for Modification:</th> + <td>{{ version.reason or "Not Available" }}</td> + </tr> </table> {% endfor %} </div> |