summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/release_view_references.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-06-13 17:17:22 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-06-13 17:17:22 -0700
commit16126c5901c435ea6610eff8b7211226c6f125d5 (patch)
tree429a4772a4990e8158f0dbc9714b02c8b0412f07 /python/fatcat_web/templates/release_view_references.html
parentf1abe85e8c35a23122f65b47dd55d8135239cf93 (diff)
downloadfatcat-16126c5901c435ea6610eff8b7211226c6f125d5.tar.gz
fatcat-16126c5901c435ea6610eff8b7211226c6f125d5.zip
refactor all entities to new UI style
Diffstat (limited to 'python/fatcat_web/templates/release_view_references.html')
-rw-r--r--python/fatcat_web/templates/release_view_references.html44
1 files changed, 44 insertions, 0 deletions
diff --git a/python/fatcat_web/templates/release_view_references.html b/python/fatcat_web/templates/release_view_references.html
new file mode 100644
index 00000000..22ebaddf
--- /dev/null
+++ b/python/fatcat_web/templates/release_view_references.html
@@ -0,0 +1,44 @@
+{% set release = entity %}
+{% set entity_view = "references" %}
+{% set entity_type = "release" %}
+{% import "entity_macros.html" as entity_macros %}
+{% extends "entity_base.html" %}
+
+{% block entity_main %}
+
+{% if release.refs != None and release.refs.size != 0 %}
+<h3>References</h3>
+<i>This release citing other releases</i>
+{# see https://github.com/Semantic-Org/Semantic-UI/issues/2639 #}
+<ol>
+ {% for ref in release.refs %}
+ <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 != None %}
+ {% if ref.extra.get('author') %}{{ ref.extra['author'] }}.{% endif %}
+ {% if ref.extra.get('article-title') %}{{ ref.extra['article-title'] }}.{% endif %}
+ {% if ref.container_name %}{{ ref.container_name }}.{% endif %}
+ {% if ref.year %}{{ ref.year }}.{% endif %}
+ {% if ref.extra.unstructured %}{{ ref.extra.unstructured }}{% endif %}
+ {% else %}
+ <i>unknown</i>
+ {% endif %}
+ {% if ref.target_release_id != None %}
+ (<a href="/release/{{ ref.target_release_id }}">fatcat entry</a>)
+ {% endif %}
+ {% if ref.extra != None and ref.extra.doi %}
+ (DOI: <a href="/release/lookup?doi={{ ref.extra.doi }}">{{ ref.extra.doi }}</a>)
+ {% endif %}
+ </li>
+ {% endfor %}
+</ol>
+{% else %}
+<p>No reference list available.
+{% endif %}
+
+{% endblock %}
+