aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/release_view.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-06-04 13:59:57 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-06-04 14:00:22 -0700
commit71e5662365892d32a5f92e2733b7ae804c833f57 (patch)
tree4a4cb9d6dc3ae7ff05867ec65cf1d682763b56f4 /python/fatcat_web/templates/release_view.html
parentcc6d9a4dfb366b9477f1fb4acd2fdfa742864a8e (diff)
downloadfatcat-71e5662365892d32a5f92e2733b7ae804c833f57.tar.gz
fatcat-71e5662365892d32a5f92e2733b7ae804c833f57.zip
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.
Diffstat (limited to 'python/fatcat_web/templates/release_view.html')
-rw-r--r--python/fatcat_web/templates/release_view.html4
1 files changed, 2 insertions, 2 deletions
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.
</div>
<div class="column" style="flex: 0 0 24em;">
-{% if entity.state == 'active' and entity.files != [] and entity.files[0].urls != [] %}
-<a href="{{ entity.files[0].urls[0].url }}" class="ui top attached fluid huge green button"><i class="file pdf outline icon"></i>Read Full Text</a>
+{% if entity.state == 'active' and entity._es and entity._es.best_pdf_url %}
+<a href="{{ entity._es.best_pdf_url }}" class="ui top attached fluid huge green button"><i class="file pdf outline icon"></i>Read Full Text</a>
{% elif entity.state == 'active' and entity.webcaptures != [] and entity.webcaptures[0].archive_urls != [] and entity.webcaptures[0].archive_urls[0].rel == "wayback" %}
<a href="{{ entity.webcaptures[0].archive_urls[0].url }}{{ entity.webcaptures[0]._wayback_suffix }}" class="ui top attached fluid huge green button"><i class="file archive outline icon"></i>View Web Archive</a>
{% elif entity.state == 'active' %}