From e4d2801acec50b763c104fc87df69f943f54fa7c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 22 Feb 2019 17:27:03 -0800 Subject: bunch of entity view updates --- python/fatcat_web/templates/release_view.html | 215 +++++++++++++++----------- 1 file changed, 127 insertions(+), 88 deletions(-) (limited to 'python/fatcat_web/templates/release_view.html') diff --git a/python/fatcat_web/templates/release_view.html b/python/fatcat_web/templates/release_view.html index 40e01239..6259f0e2 100644 --- a/python/fatcat_web/templates/release_view.html +++ b/python/fatcat_web/templates/release_view.html @@ -22,117 +22,136 @@
-{% if release.release_date != None %} -

Date (published): {{ release.release_date }} -{% elif release.release_year != None %} -

Date (published): {{ release.release_year }} -{% endif %} -{% if release.pmid != None %} -
PubMed:  {{ release.pmid }} -{% endif %} -{% if release.pmcid != None %} -
PubMed Central:  {{ release.pmcid }} -{% endif %} -{% if release.wikidata_qid != None %} -
Wikidata Entity:  {{ release.wikidata_qid }} -{% endif %} -{% if release.language != None %} -
Primary Language:  {{ release.language }} (lookup ISO-639 code) -{% endif %} -
This {{ release.release_type or "unknown-type" }} is a release -(version) of the work  {{ -release.work_id }}. There may be other releases (eg, pre-prints, -formal publications, etc) linked to the same work. - -{% if container != None %} -

+
{% if release.release_status == 'published' %} Published in {{ container.name }} {% else %} - Released in {{ release.release_type }} in {{ container.name }} + Released as a {{ release.release_type }} + {% if container %} in {{ container.name }} {% endif %} {% endif %} {% if release.publisher %} by {{ release.publisher }} {% endif %}
- {% if container != None and container.issnl != None %}ISSN-L: {{ container.issnl }}
{% endif %} - {% if release.volume != None %}Volume: {{ release.volume }}
{% endif %} - {% if release.issue != None %}Issue: {{ release.issue }}
{% endif %} - {% if release.pages != None %}Page(s): {{ release.pages }}
{% endif %} - {% if release.publisher != None %}Publisher: {{ release.publisher }}
{% endif %} - {% if release.release_status != None %}Release Status: {{ release.release_status }}
{% endif %} - {% if release.release_type != None %}Release Type: {{ release.release_type}}
{% endif %} + + + + {% if container != None and container.issnl != None %} + + + + + + + + + + +
ISSN-L{{ container.issnl }} + {% endif %} + {% if release.volume != None %} +
Volume{{ release.volume }} + {% endif %} + {% if release.issue != None %} +
Issue{{ release.issue }} + {% endif %} + {% if release.pages != None %} +
Page(s){{ release.pages }} + {% endif %} + {% if release.release_date != None %} +
Release Date{{ release.release_date }} + {% elif release.release_year != None %} +
Release Year{{ release.release_year }} + {% endif %} + {% if container != None and container.container_type != None %} +
Container Type{{ container.container_type }} + {% endif %} + {% if release.publisher != None %} +
Publisher{{ release.publisher }} + {% endif %} + {% if release.language != None %} +
Primary Language{{ release.language }} + (lookup) + {% endif %} + +
-{% endif %} -{% if release.extra != None %} -

Extra Metadata (raw JSON)

-{% for (key, value) in release.extra.items() %} -{{ key }}: {% if key == "crossref" %} <truncated, see full JSON>{% else %} {{ value }} {% endif %}
+{% if release.contribs|length > 0 %} +
+
+ All Contributors +
+ + +{% for contrib in release.contribs %} + +
{% if contrib.index or contrib.index == 0 %} {{ contrib.index + 1 }}{% endif %} + + {% if contrib.creator_id %} + {{ contrib.raw_name or 'unknown' }} + {% else %} + {{ contrib.raw_name or '' }} + {% endif %} +
{{ contrib.role or 'unknown' }} {% endfor %} +
+
+
+{% else %} +

No known contributors (authors, translators, etc). {% endif %} - - -
-

Abstracts

{% if release.abstracts != [] %} - {% for abstract in release.abstracts %} - Abstract ({{ abstract.sha1 }}, {{ abstract.mimetype }}): {{ abstract.content }} - {% endfor %} -{% else %} -

No known abstracts. +

Abstract

+

{{ release.abstracts[0].content }} +
In {{ release.abstracts[0].mimetype }} format {% endif %} -
-

All Contributors

-{% if release.contribs.size != 0 %} - - - - - {% for contrib in release.contribs %} - +{% if release.extra %} +

Extra Metadata (raw JSON)

+
Attribution Order - Name - Role -
{% if contrib.index or contrib.index == 0 %} {{ contrib.index + 1 }}{% endif %} - {% if contrib.creator_id %} - {{ contrib.raw_name }} - {% else %} - {{ contrib.raw_name }} - {% endif %} - {{ contrib.role or '' }} - {% endfor %} -
+ +{% for (key, value) in release.extra.items() %} + +
{{ key }}{{ value }} +{% endfor %} +
-{% else %} -

Contributors (authors, translators, etc) not known. {% endif %} -
+

Known Files and URLs

{% if files != [] %} - +
+ {% for file in files %} -
{% if file.sha1 != None %}{{ file.sha1[:16] + "..." }}{% else %}N/A{% endif %} - {% if file.size != None %}{{ file.size }}{% endif %} - {% if file.mimetype != None %}{{ file.mimetype }}{% endif %} - {% for url in file.urls %} - {{ url.url.split('/')[2] }} ({{ url.rel }})
- {% endfor %} +
{% if file.mimetype != None %}{{ file.mimetype }}  {% endif %} + {% if file.size != None %}{{ file.size|filesizeformat }}{% endif %} +
+ {% if file.sha1 != None %}sha1:{{ file.sha1[:20] + "..." }} + {% elif file.sha256!= None %}sha256:{{ file.md5[:20] + "..." }} + {% elif file.md5 != None %}md5:{{ file.md5[:20] + "..." }} + {% endif %} + +
+ {% for url in file.urls[:5] %} + {{ url.url.split('/')[2] }} ({{ url.rel }})
+ {% endfor %} + {% if file.urls|length > 5 %} + + {{ file.urls|length - 5 }} more URLs + {% endif %} {% endfor %}
@@ -142,7 +161,6 @@ Raw Object: other releases for this work?). {% endif %} -
{% if release.refs != None and release.refs.size != 0 %}

References

This release citing other releases. @@ -185,22 +203,38 @@ This release citing other releases. {% endif %} {% if release.release_type != None %} -
-Release Type  {{ release.release_type }} -
+
+ Type  {{ release.release_type }} +
Status   {{ release.release_status or 'unknown' }} + {% if release.release_date != None %} +
Date   {{ release.release_date }} + {% elif release.release_year != None %} +
Year   {{ release.release_year }} + {% endif %} +
{% endif %} -{% if release.doi %} +{% if release.doi or release.pmid or release.pmcid or release.wikidata_qid %} +{% if release.doi %} + DOI  {{ release.doi }}
+{% endif %} +{% if release.pmid != None %} + PubMed  {{ release.pmid }}
+{% endif %} +{% if release.pmcid != None %} + PMC  {{ release.pmcid }}
+{% endif %} +{% if release.wikidata_qid != None %} + Wikidata  {{ release.wikidata_qid }}
{% endif %} {% if release.isbn13 != None %} -
-

ISBN-13  {{ release.isbn13 }} + ISBN-13  {{ release.isbn13 }} +{% endif %}

{% endif %} + {% if release.extra.is_oa == True %}
Open Access @@ -244,6 +278,11 @@ This release citing other releases.
{% endif %} +
+ Work Entity +
grouping other versions (eg, pre-print) and variants of this release +
+
Lookup Links
-- cgit v1.2.3