Add link.
authorRadek Czajka <rczajka@rczajka.pl>
Mon, 20 Apr 2020 15:09:05 +0000 (17:09 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Mon, 20 Apr 2020 15:09:05 +0000 (17:09 +0200)
src/documents/templates/documents/book_detail.html

index d9b06c7..be17ec1 100644 (file)
 
        </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>