Fixes #4084: cover on book page links to html.
authorRadek Czajka <rczajka@rczajka.pl>
Thu, 23 Jul 2020 12:07:43 +0000 (14:07 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Thu, 10 Sep 2020 12:15:11 +0000 (14:15 +0200)
src/catalogue/templates/catalogue/book_short.html
src/catalogue/templates/catalogue/book_wide.html

index 3586b2e..0c63179 100644 (file)
@@ -22,7 +22,7 @@
 
         <div class="cover-area">
           {% if book.cover_thumb %}
 
         <div class="cover-area">
           {% if book.cover_thumb %}
-            <a href="{{ book.get_absolute_url }}">
+            <a href="{% block cover-link %}{{ book.get_absolute_url }}{% endblock %}">
               <img src="{{ book.cover_thumb.url }}" alt="Cover" class="cover" />
             </a>
           {% endif %}
               <img src="{{ book.cover_thumb.url }}" alt="Cover" class="cover" />
             </a>
           {% endif %}
index 7721c23..26b085a 100644 (file)
@@ -7,6 +7,9 @@
 {% block box-class %}book-wide-box{% endblock %}
 
 
 {% block box-class %}book-wide-box{% endblock %}
 
 
+{% block cover-link %}{% url 'book_text' book.get_first_text.slug %}{% endblock %}
+
+
 {% block cover-area-extra %}
   {% with license=book.get_extra_info_json.license %}
     {% if license %}
 {% block cover-area-extra %}
   {% with license=book.get_extra_info_json.license %}
     {% if license %}