From 78970800809b8abd4af2c64c044cf350876c4baa Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Thu, 30 Nov 2023 17:45:46 +0300 Subject: Handle display for unpublished data Example: http://cd.genenetwork.org/phenotypes/BXD_17019 Signed-off-by: Munyoki Kilyungi --- wqflask/wqflask/templates/phenotype.html | 41 ++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/wqflask/wqflask/templates/phenotype.html b/wqflask/wqflask/templates/phenotype.html index 500c2f70..7eb86328 100644 --- a/wqflask/wqflask/templates/phenotype.html +++ b/wqflask/wqflask/templates/phenotype.html @@ -12,6 +12,8 @@ {% block content %} +{% set published_p = "http://rdf.ncbi.nlm.nih.gov/pubmed" in metadata.references.id %} +

Phenotype: {{ metadata.traitName }} ({{ metadata.abbreviation }})

@@ -49,11 +51,36 @@ {% if metadata.references.id %} - Publication - {{ metadata.references.title }}. {{ ', '.join(metadata.references.creator) }}. {{ metadata.references.year }} {{ metadata.references.month }}{{ metadata.references.volume }}:{{ metadata.references.page }} + Publication + {% if published_p == False %} + (unpublished) + {% endif %} + + + + {% if metadata.references.title %} + {{ metadata.references.title }}. + {% endif %} + + {% if metadata.references.creator %} + {{ ', '.join(metadata.references.creator) }}. + {% endif %} + {{ metadata.references.year }} + {{ metadata.references.month }} + {{ metadata.references.month }} + {% if metadata.references.volume and metadata.references.page %} + {{ metadata.references.volume }}:{{ metadata.references.page }} + {% endif %} + - PubMed + + {% if published_p %} + PubMed + {% else %} + GN RDF Page + {% endif %} + @@ -92,7 +119,13 @@ Resource Links - PubMed + + {% if published_p %} + PubMed + {% else %} + GN RDF Page + {% endif %} + {% endif %} -- cgit v1.2.3