From 149140e2b9f66f389299914c058c648d8bba8120 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 23 Apr 2020 17:22:22 -0700 Subject: web: fix ident=None broken links On web interface views for revisions, we had a bunch of broken links because the ident is "None". This commit fixes these by removing the links. --- python/fatcat_web/templates/container_view.html | 2 ++ python/fatcat_web/templates/entity_macros.html | 2 ++ python/fatcat_web/templates/release_view.html | 12 ++++++------ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/python/fatcat_web/templates/container_view.html b/python/fatcat_web/templates/container_view.html index 8d7c4cae..cf444956 100644 --- a/python/fatcat_web/templates/container_view.html +++ b/python/fatcat_web/templates/container_view.html @@ -23,6 +23,7 @@ Published by {{ container.publisher }} {% endif %} +{% if container.state == "active" %}

Search Releases from this Container

@@ -33,6 +34,7 @@
+{% endif %} {% if container._random_releases %}

Example Publications

diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index 7c5436c6..3308a3d5 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -54,10 +54,12 @@ +{% if entity.ident %}
Edit Metadata View History
+{% endif %} {%- endmacro %} diff --git a/python/fatcat_web/templates/release_view.html b/python/fatcat_web/templates/release_view.html index d7c4e76e..60e4624e 100644 --- a/python/fatcat_web/templates/release_view.html +++ b/python/fatcat_web/templates/release_view.html @@ -3,9 +3,9 @@ {% import "entity_macros.html" as entity_macros %} {% extends "entity_base.html" %} -{# HTML metadata embeddings #} -{% if release and release.status == "active" %} - {% block extra_head %} +{% block extra_head %} + {% if release and release.state == "active" %} + {# HTML metadata embeddings #} @@ -70,8 +70,8 @@ {% endif %} {% endfor %}{% endfor %} - {% endblock %} -{% endif %} + {% endif %} +{% endblock %} {% block main_extra_attr %}itemscope itemtype="http://schema.org/ScholarlyArticle" itemid="#release"{% endblock %} @@ -388,7 +388,7 @@ accessible version.
grouping other versions (eg, pre-print) and variants of this release -{% if release._can_citeproc %} +{% if release.state == "active" and release._can_citeproc %}
Cite This Release -- cgit v1.2.3