From 20ad70b437df59d9564704b655afab53237b8ce0 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Sat, 2 Mar 2019 17:26:07 -0800 Subject: include filesets and webcaptures in release view --- python/fatcat_web/templates/release_view.html | 56 ++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 6 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 684c71ab..0e09e6ab 100644 --- a/python/fatcat_web/templates/release_view.html +++ b/python/fatcat_web/templates/release_view.html @@ -127,7 +127,7 @@

Known Files and URLs

-{% if files != [] %} +{% if entity.files != [] %} - {% for file in files %} + {% for file in entity.files %}
{% if file.mimetype != None %}{{ file.mimetype }}  {% endif %} {% if file.size != None %}{{ file.size|filesizeformat }}{% endif %}
@@ -163,10 +163,54 @@ other releases for this work?). {% endif %} + +{% if entity.filesets != [] %} +

File Sets

+ + + {% for fileset in entity.filesets %} + +
{{ fileset.manifest|count }} files  {{ fileset.total_size|filesizeformat }} +
fileset:{{ fileset.ident }} +
+ {% for url in fileset.urls[:5] %} + {{ url.url.split('/')[2] }} ({{ url.rel }})
+ {% endfor %} + {% if fileset.urls|length > 5 %} + + {{ file.urls|length - 5 }} more URLs + {% endif %} + {% endfor %} +
+ +{% endif %} + + +{% if entity.webcaptures != [] %} +

Web Captures

+ + + {% for webcapture in entity.webcaptures %} + +
{{ webcapture.original_url }} +
{{ webcapture.timestamp }} | {{ webcapture.cdx|count }} resources +
webcapture:{{ webcapture.ident }} +
+ {% for url in webcapture.archive_urls[:5] %} + {{ url.url.split('/')[2] }} ({{ url.rel }})
+ {% endfor %} + {% if webcapture.urls|length > 5 %} + + {{ file.urls|length - 5 }} more URLs + {% endif %} + {% endfor %} +
+ +{% endif %} + + {% if release.refs != None and release.refs.size != 0 %}

References

-This release citing other releases. -
    +This release citing other releases +
      {% for ref in release.refs %}
    1. {% if ref.title %} @@ -198,8 +242,8 @@ This release citing other releases.
      -{% if files != [] and files[0].urls != [] %} -Download Full Text +{% if entity.files != [] and entity.files[0].urls != [] %} +Download Full Text {% else %} No Full Text Available {% endif %} -- cgit v1.2.3