From 42be320518d238d3f26901e17618ff604435a657 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 12 Apr 2021 16:10:54 -0700 Subject: web: improve preservation holdings display for containers --- python/fatcat_web/templates/container_view.html | 32 +++++++++++++++++-------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'python') diff --git a/python/fatcat_web/templates/container_view.html b/python/fatcat_web/templates/container_view.html index 6ec705b4..0d572c63 100644 --- a/python/fatcat_web/templates/container_view.html +++ b/python/fatcat_web/templates/container_view.html @@ -91,7 +91,7 @@ {% if container.issnl != None or container.wikidata_qid != None %}
{% if container.issnl != None %} - ISSN-L? + ISSN-L?  {{ container.issnl }} {% endif %} {% if container.extra != None and container.extra.issnp != None and (container.extra.issnp|length > 0) %} @@ -135,22 +135,34 @@
{% endif %} +{%- if container.extra and container.extra.kbart %}
Preservation Holdings
-{%- if container.extra and container.extra.kbart %} {% for k, v in container.extra.kbart.items() %} -
{{ k }}: + {% if k == "lockss" %} + LOCKSS: + {% elif k == "clockss" %} + CLOCKSS: + {% elif k == "hathitrust" and container.issnl %} + HathiTrust: + {% elif k == "portico" and container.issnl %} + Portico: + {% else %} + {{ k }}: + {% endif %} + years {% for span in v.year_spans %} - {% if span|length >= 2 %} - {{ span[0] }}-{{ span[1] }} - {% elif span|length == 1 %} - {{ span[0] }} - {% endif %} - {{ ", " if not loop.last }} + {% if span|length >= 2 -%} + {{ span[0] }}-{{ span[1] -}} + {% elif span|length == 1 -%} + {{ span[0] -}} + {% endif -%} + {{- ", " if not loop.last }} {% endfor %} +
{% endfor %} -{% endif %}
+{% endif %}
Lookup Links
-- cgit v1.2.3