From: Radek Czajka Date: Tue, 23 May 2023 11:52:39 +0000 (+0200) Subject: Show Thema in legimi button X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/eadb2822a6c87ac0f1ad3e529747c8e2cff14ae7?ds=sidebyside;hp=7720832e5e083dda48bc99b9f07b377b9d11c2cb Show Thema in legimi button --- 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 %}