From 25234da95cd6513320434e818fbe7ab7298fe66b Mon Sep 17 00:00:00 2001 From: Jonathan Weth <git@jonathanweth.de> Date: Sat, 28 May 2022 16:22:24 +0200 Subject: [PATCH] Don't show PDFs embedded --- aleksis/apps/kort/templates/kort/card/detail_content.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aleksis/apps/kort/templates/kort/card/detail_content.html b/aleksis/apps/kort/templates/kort/card/detail_content.html index 490e51b..23b6227 100644 --- a/aleksis/apps/kort/templates/kort/card/detail_content.html +++ b/aleksis/apps/kort/templates/kort/card/detail_content.html @@ -41,8 +41,10 @@ <div class="col s12 m12 l6"> {% include "kort/card/print_form.html" %} {% if card.pdf_file %} - <div id="card-pdf-{{ card.pk }}" style="height: 500px;"></div> - <script>PDFObject.embed("{{ card.pdf_file.url }}", "#card-pdf-{{ card.pk }}");</script> + <a href="{{ card.pdf_file.url }}" class="btn waves-effect waves-light"> + <i class="material-icons left iconify" data-icon="mdi:file-pdf-box"></i> + {% trans "Show card as PDF" %} + </a> {% else %} <div class="row center-via-flex"> <a class="btn waves-effect waves-light" href="{% url "generate_card_pdf" card.pk %}"> -- GitLab