From 71e5662365892d32a5f92e2733b7ae804c833f57 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 4 Jun 2020 13:59:57 -0700 Subject: re-use 'best pdf url' for release green button I thought this was the existing behavior, but it looks like we were just taking the first link from the first file. In the future may refactor this out even further. --- python/fatcat_web/templates/release_view.html | 4 ++-- 1 file changed, 2 insertions(+), 2 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 60e4624e..2aba47ba 100644 --- a/python/fatcat_web/templates/release_view.html +++ b/python/fatcat_web/templates/release_view.html @@ -253,8 +253,8 @@ accessible version.
-{% if entity.state == 'active' and entity.files != [] and entity.files[0].urls != [] %} -Read Full Text +{% if entity.state == 'active' and entity._es and entity._es.best_pdf_url %} +Read Full Text {% elif entity.state == 'active' and entity.webcaptures != [] and entity.webcaptures[0].archive_urls != [] and entity.webcaptures[0].archive_urls[0].rel == "wayback" %} View Web Archive {% elif entity.state == 'active' %} -- cgit v1.2.3