diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-04-07 14:19:17 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-04-07 14:19:17 -0700 |
commit | 0aaa2a839d7a14716ee1a84b730203a7953dc5e0 (patch) | |
tree | 88c6e8c7b05b37fedc12af56f7d0dd917d37d9f4 /python/fatcat_web/templates | |
parent | 67b71d583ea0c1e2c0cae859fbcce9bddf4df7bd (diff) | |
download | fatcat-0aaa2a839d7a14716ee1a84b730203a7953dc5e0.tar.gz fatcat-0aaa2a839d7a14716ee1a84b730203a7953dc5e0.zip |
web: improve no-file release page behavior
Diffstat (limited to 'python/fatcat_web/templates')
-rw-r--r-- | python/fatcat_web/templates/release_view.html | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/python/fatcat_web/templates/release_view.html b/python/fatcat_web/templates/release_view.html index f2e3f670..e21896ca 100644 --- a/python/fatcat_web/templates/release_view.html +++ b/python/fatcat_web/templates/release_view.html @@ -131,8 +131,9 @@ {% endif %} {% if entity.state == 'active' %} + +{% if entity.files != [] and entity.files != None %} <h3>Archived Files and Locations</h3> -{% if entity.files != [] %} <table class="ui compact fixed table"> <tbody> {% for file in entity.files %} @@ -151,15 +152,9 @@ {% endfor %} </tbody> </table> -{% else %} -<p>There are no accessible files associated with this release. You could check -<a href="/work/{{ release.work_id }}">other releases for this work</a> for an -accessible version. -{% endif %} {% endif %} -{% if entity.state == 'active' %} -{% if entity.filesets != [] %} +{% if entity.filesets != [] and entity.filesets != None %} <h3>File Sets</h3> <table class="ui compact fixed table"> <tbody> @@ -181,10 +176,8 @@ accessible version. </tbody> </table> {% endif %} -{% endif %} -{% if entity.state == 'active' %} -{% if entity.webcaptures != [] %} +{% if entity.webcaptures != [] and entity.webcaptures != None %} <h3>Web Captures</h3> <table class="ui single line compact fixed table"> <tbody> @@ -203,9 +196,17 @@ accessible version. </tbody> </table> {% endif %} + +{% if not (entity.files or entity.filesets or entity.webcaptures) %} +<h3>Archived Content</h3> +<p>There are no accessible files associated with this release. You could check +<a href="/work/{{ release.work_id }}">other releases for this work</a> for an +accessible version. +{% endif %} + {% endif %} -</div> +</div> <div class="column" style="flex: 0 0 24em;"> |