From 96db9d510a6891594271af7c284c46335b4d7502 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 26 Feb 2021 10:28:06 -0800 Subject: web: tweak display of files, webcapture, fileset --- python/fatcat_web/templates/file_view.html | 35 ++++++++++++------------ python/fatcat_web/templates/fileset_view.html | 18 ++++++------ python/fatcat_web/templates/webcapture_view.html | 15 +++++----- 3 files changed, 34 insertions(+), 34 deletions(-) (limited to 'python/fatcat_web') diff --git a/python/fatcat_web/templates/file_view.html b/python/fatcat_web/templates/file_view.html index 02f47a91..608a2a0a 100644 --- a/python/fatcat_web/templates/file_view.html +++ b/python/fatcat_web/templates/file_view.html @@ -8,23 +8,23 @@
-

Releases

+

Associated Releases

{% if entity.releases != [] %} {{ entity_macros.release_list(entity.releases) }} {% else %}

- This file is not associated with any fatcat release. + This file is not associated with any release entity! This makes a is a stub entry in the catalog. {% endif %} -

URLs

+

Public Access URLs

{% if file.urls != None %} {{ entity_macros.url_list(file.urls) }} {% else %} -No known public URL, mirror, or archive for this file. +No known archives or mirrors of this file. {% endif %} -

Checksums

+

Data Integrity Checksums

{% if file.sha1 != None %} @@ -45,22 +45,23 @@ No known public URL, mirror, or archive for this file.
{% if file._es and file._es.best_url %} -Download File + {# TODO: this currently shows *any* file, though prefers archive.org #} + + View Archived File + {% else %} -No Download Available + No Public URL {% endif %} +
-{% if file.size != None %} -
-

Size  {{ file.size|filesizeformat }} +

+ {% if file.size != None %} + Size  {{ file.size|filesizeformat }}
+ {% endif %} + {% if file.mimetype != None %} + MIME Type  {{ file.mimetype }}
+ {% endif %}
-{% endif %} - -{% if file.mimetype != None %} -
-

File Type  {{ file.mimetype }} -

-{% endif %} {{ entity_macros.fatcat_bits(entity, "file", "", editgroup) }} diff --git a/python/fatcat_web/templates/fileset_view.html b/python/fatcat_web/templates/fileset_view.html index 27d5b6da..4e8bfbad 100644 --- a/python/fatcat_web/templates/fileset_view.html +++ b/python/fatcat_web/templates/fileset_view.html @@ -8,14 +8,20 @@
-

Releases

+

Associated Releases

{% if entity.releases != [] %} {{ entity_macros.release_list(entity.releases) }} {% else %}

This File Set is not associated with any fatcat release. {% endif %} - + +

Public Access URLs

+{% if entity.urls %} + {{ entity_macros.url_list(entity.urls) }} +{% else %} +No known public URL, mirror, or archive for this File Set. +{% endif %}

File Manifest ({{ fileset.manifest|count }})

{% if fileset.manifest %} @@ -40,14 +46,6 @@ This File Set is empty (contains no files). {% endif %} -
-

Base URLs

-{% if entity.urls %} - {{ entity_macros.url_list(entity.urls) }} -{% else %} -No known public URL, mirror, or archive for this File Set. -{% endif %} -
diff --git a/python/fatcat_web/templates/webcapture_view.html b/python/fatcat_web/templates/webcapture_view.html index f2f689f3..b35ee0e2 100644 --- a/python/fatcat_web/templates/webcapture_view.html +++ b/python/fatcat_web/templates/webcapture_view.html @@ -8,7 +8,7 @@
-

Releases

+

Associated Releases

{% if entity.releases != [] %} {{ entity_macros.release_list(entity.releases) }} {% else %} @@ -16,8 +16,7 @@ This Web Capture is not associated with any fatcat release. {% endif %} -
-

Archive URLs

+

Public Archive URLs

{% if webcapture.archive_urls != None %}
@@ -42,7 +41,7 @@ No known public archive for this webcapture. {% endif %} -

CDX Rows ({{ webcapture.cdx|count }})

+

Captured Resources ({{ webcapture.cdx|count }})

{% if webcapture.cdx %}
{% for row in webcapture.cdx %} @@ -53,7 +52,7 @@ No known public archive for this webcapture.
{{ row.timestamp.strftime("%Y-%m-%d %H:%M:%S") }} - {% if row.mimetype %}| {{ row.mimetype }} {% endif %} + {% if row.mimetype %}| {{ row.mimetype }} {% endif %} {% if row.size %}| {{ row.size|filesizeformat }} {% endif %}
@@ -73,11 +72,13 @@ This web capture is empty (contains no resources).
{% if webcapture.state == 'active' and webcapture.archive_urls != [] and webcapture.archive_urls[0].rel == "wayback" %} -View Web Archive + + View Web Archive + {% endif %} {% if webcapture.timestamp != None %} -
+

Capture Time  {{ webcapture.timestamp.strftime("%Y-%m-%d %H:%M:%S") }}

{% endif %} -- cgit v1.2.3