From ec0d7f3b50390c2b9140ea954787d365b8d225ae Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 1 Mar 2019 15:48:10 -0800 Subject: make 'Fatcat Bits' a macro --- python/fatcat_web/templates/release_view.html | 62 +++++++++++---------------- 1 file changed, 26 insertions(+), 36 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 6259f0e2..5b4236cf 100644 --- a/python/fatcat_web/templates/release_view.html +++ b/python/fatcat_web/templates/release_view.html @@ -1,4 +1,7 @@ +{% set entity = release %} +{% import "entity_macros.html" as entity_macros %} {% extends "base.html" %} + {% block fullbody %}
@@ -24,11 +27,10 @@
- {% if release.release_status == 'published' %} - Published in {{ container.name }} + Published in {{ container.name }} {% else %} - Released as a {{ release.release_type }} + Released as a {{ release.release_type }} {% if container %} in {{ container.name }} {% endif %} {% endif %} {% if release.publisher %} @@ -286,39 +288,29 @@ This release citing other releases.
Lookup Links
-{% if container != None and container.issnl != None %} - SHERPA/RoMEO (journal policies)
-{% endif %} -{% if container != None and container.doi != None %} - oaDOI/unpaywall
-{% endif %} -{% if release.isbn13 != None %} - Open Library
- Worldcat
-{% else %} - Worldcat
-{% endif %} -{% if release.doi %} -Crossref Metadata (via API)
-{% endif %} -wikidata.org
-CORE.ac.uk
-Semantic Scholar (CS, neuro)
-Google Scholar
+ {% if container != None and container.issnl != None %} + SHERPA/RoMEO (journal policies)
+ {% endif %} + {% if container != None and container.doi != None %} + oaDOI/unpaywall
+ {% endif %} + {% if release.isbn13 != None %} + Open Library
+ Worldcat
+ {% else %} + Worldcat
+ {% endif %} + {% if release.doi %} + Crossref Metadata (via API)
+ {% endif %} + wikidata.org
+ CORE.ac.uk
+ Semantic Scholar (CS, neuro)
+ Google Scholar
-
-Fatcat Bits -

State is "{{ release.state }}". Revision: -
{{ release.revision }} -
As JSON object via API - -

- +{{ entity_macros.fatcat_bits(entity, "release", "container,files,filesets,webcaptures") }}
@@ -326,8 +318,6 @@ This release citing other releases. {% block postscript %} {% endblock %} -- cgit v1.2.3