summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-28 13:14:54 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-28 13:14:54 -0700
commitd0c2dea01b390e93cbad490e13ddeeb943e09c37 (patch)
treef96eb135c538375a9d304e6cc189843478ed5f30
parent6be66ac98b0ec7a9671e8ba9b28dfe8f73f9691d (diff)
downloadfatcat-d0c2dea01b390e93cbad490e13ddeeb943e09c37.tar.gz
fatcat-d0c2dea01b390e93cbad490e13ddeeb943e09c37.zip
try to fix reference display
-rw-r--r--python/fatcat/templates/release_view.html17
1 files changed, 16 insertions, 1 deletions
diff --git a/python/fatcat/templates/release_view.html b/python/fatcat/templates/release_view.html
index e3c077b9..c29492aa 100644
--- a/python/fatcat/templates/release_view.html
+++ b/python/fatcat/templates/release_view.html
@@ -144,7 +144,22 @@ Raw Object:
This release citing other releases.
<ol>
{% for ref in release.refs %}
- <li>{% if ref.extra != None and ref.extra.unstructured != None %}{{ ref.extra.unstructured }}{% else %}<i>unknown</i>{% endif %}
+ <li>
+ {% if ref.title %}
+ {{ ref.title }}
+ {% if ref.container_name %}{{ ref.container_name }}.{% endif %}
+ {% if ref.year %}{{ ref.year }}{% endif %}
+ {% if ref.locator %}{{ ref.locator }}{% endif %}
+ {% elif ref.extra and ref.extra.crossref %}
+ {% if ref.extra.crossref.get('author') %}{{ ref.extra.crossref['author'] }}.{% endif %}
+ {% if ref.extra.crossref.get('article-title') %}{{ ref.extra.crossref['article-title'] }}.{% endif %}
+ {% if ref.container_name %}{{ ref.container_name }}.{% endif %}
+ {% if ref.year %}{{ ref.year }}.{% endif %}
+ {% elif ref.extra and ref.extra.unstructured %}
+ {{ ref.extra.unstructured }}
+ {% else %}
+ <i>unknown</i>
+ {% endif %}
{% if ref.target_release_id != None %}
(<a href="/release/{{ ref.target_release_id }}">fatcat release</a>)
{# {% elif ref.extra != None and ref.extra.doi != None %}