From eadb2822a6c87ac0f1ad3e529747c8e2cff14ae7 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 23 May 2023 13:52:39 +0200 Subject: [PATCH 1/1] Show Thema in legimi button --- .../templates/documents/book_detail.html | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/src/documents/templates/documents/book_detail.html b/src/documents/templates/documents/book_detail.html index 226c4d4e..5a3734fe 100644 --- a/src/documents/templates/documents/book_detail.html +++ b/src/documents/templates/documents/book_detail.html @@ -141,19 +141,31 @@ {% if perms.depot.add_legimibookpublish %}
-
- {% csrf_token %} - - {% with llp=book.last_legimi_publish %} - {% if llp %} - {{ llp.created_at }} → - {{ llp.started_at }} → - {{ llp.finished_at }} - ({{ llp.get_status_display }}) - - {% endif %} - {% endwith %} -
+ {% with thema=doc.book_info.thema %} + {% if thema %} +
+ {% csrf_token %} + + {% with llp=book.last_legimi_publish %} + {% if llp %} + {{ llp.created_at }} → + {{ llp.started_at }} → + {{ llp.finished_at }} + ({{ llp.get_status_display }}) + + {% endif %} + {% endwith %} +
+ {% else %} +
Nie można opublikować na Legimi, ponieważ nie ustaiono kategorii Thema.
+ {% endif %} + {% endwith %} {% endif %} {% else %} -- 2.20.1