From e22b691a1c2ac0e1aba750771cd17f032f47c172 Mon Sep 17 00:00:00 2001 From: Radek Czajka <rczajka@rczajka.pl> Date: Mon, 20 Apr 2020 17:09:05 +0200 Subject: [PATCH] Add link. --- src/documents/templates/documents/book_detail.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/documents/templates/documents/book_detail.html b/src/documents/templates/documents/book_detail.html index d9b06c7f..be17ec14 100644 --- a/src/documents/templates/documents/book_detail.html +++ b/src/documents/templates/documents/book_detail.html @@ -37,8 +37,12 @@ </div> <div class="col-md-4"> - W katalogu: - {{ book.catalogue_book }} + {% with cbook=book.catalogue_book %} + {% if cbook %} + W katalogu: + <a href="{% url 'catalogue_book' cbook.slug %}">{{ cbook }}</a> + {% endif %} + {% endwith %} </div> </div> </div> -- 2.20.1