diff options
Diffstat (limited to 'python/fatcat_web/templates')
-rw-r--r-- | python/fatcat_web/templates/file_view.html | 4 | ||||
-rw-r--r-- | python/fatcat_web/templates/release_view.html | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/python/fatcat_web/templates/file_view.html b/python/fatcat_web/templates/file_view.html index d60ea49d..02f47a91 100644 --- a/python/fatcat_web/templates/file_view.html +++ b/python/fatcat_web/templates/file_view.html @@ -44,8 +44,8 @@ No known public URL, mirror, or archive for this file. </div> <div class="column" style="flex: 0 0 24em;"> -{% if file.urls != None and file.urls != [] %} -<a href="{{ file.urls[0].url }}" class="ui top attached fluid huge green button"><i class="file icon"></i>Download File</a> +{% if file._es and file._es.best_url %} +<a href="{{ file._es.best_url }}" class="ui top attached fluid huge green button"><i class="file icon"></i>Download File</a> {% else %} <span class="ui top attached fluid huge grey button"><i class="file cross icon"></i>No Download Available</span> {% endif %} 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' %} |