From: Radek Czajka
Date: Thu, 3 Nov 2022 13:30:10 +0000 (+0100)
Subject: fixes
X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/f3872a90b13a88be0473e3ce3126240d0d5cbb74?ds=inline
fixes
---
diff --git a/src/catalogue/models/collection.py b/src/catalogue/models/collection.py
index 412a976d4..f1a582cbe 100644
--- a/src/catalogue/models/collection.py
+++ b/src/catalogue/models/collection.py
@@ -56,6 +56,9 @@ class Collection(models.Model):
from catalogue.models import Book
return Book.objects.filter(self.get_query())
+ def get_5_books(self):
+ return self.get_books()[:5]
+
@cached_render('catalogue/collection_box.html')
def box(self):
return {
diff --git a/src/catalogue/templates/catalogue/2022/collections.html b/src/catalogue/templates/catalogue/2022/collections.html
index ba25bcb64..5fb4078ea 100644
--- a/src/catalogue/templates/catalogue/2022/collections.html
+++ b/src/catalogue/templates/catalogue/2022/collections.html
@@ -26,7 +26,7 @@
- {% for book in collection.get_books %}
+ {% for book in collection.get_5_books %}
{% include 'catalogue/2022/book_box.html' %}
{% endfor %}
diff --git a/src/social/templates/social/carousel_2022.html b/src/social/templates/social/carousel_2022.html
index acdf5fe61..edaa3bb5b 100644
--- a/src/social/templates/social/carousel_2022.html
+++ b/src/social/templates/social/carousel_2022.html
@@ -1,3 +1,7 @@
+{% if banner %}
+ {% if banner.picture %}
+ {% endif %}
+{% endif %}
diff --git a/src/wolnelektury/templates/2022/main_page.html b/src/wolnelektury/templates/2022/main_page.html
index b541467ad..8112c09e0 100644
--- a/src/wolnelektury/templates/2022/main_page.html
+++ b/src/wolnelektury/templates/2022/main_page.html
@@ -143,7 +143,7 @@
@@ -305,7 +305,7 @@
- {% sponsor_page 'footer' %}
+ {#% sponsor_page 'footer' %#}