From f2b4341b32254061ebd70a865066e7518de22ac8 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 5 Jun 2023 15:02:35 +0200 Subject: [PATCH 1/1] Theme page. --- .../catalogue/2022/author_detail.html | 17 +++--- .../catalogue/2022/theme_detail.html | 61 ++++++++++++------- src/catalogue/views.py | 16 ++--- 3 files changed, 55 insertions(+), 39 deletions(-) diff --git a/src/catalogue/templates/catalogue/2022/author_detail.html b/src/catalogue/templates/catalogue/2022/author_detail.html index 120fec425..9596852c3 100644 --- a/src/catalogue/templates/catalogue/2022/author_detail.html +++ b/src/catalogue/templates/catalogue/2022/author_detail.html @@ -7,21 +7,21 @@ {% block breadcrumbs %} Katalog {% if tags %} - {{ tags.0.get_category_display|title }} + {{ main_tag.get_category_display|title }} {% endif %} {% endblock %} {% block main %}
- {% if tags.0.photo %} + {% if main_tag.photo %}
- {{ tags.0.name }} + {{ main_tag.name }}
{% endif %}

- {% if tags %} - {{ tags.0.name }} + {% if main_tag %} + {{ main_tag.name }} {% else %} {{ title }} {% endif %} @@ -36,7 +36,7 @@
{% for tag in tags %} - {% if forloop.counter > 1 %} + {% if tag is not main_tag %} {{ tag }} ✖ @@ -45,7 +45,6 @@ {% endfor %}
-

Sortuj: @@ -84,10 +83,10 @@ {% if tags %}
- {% with tag=tags.0 %} + {% with tag=main_tag %} {% include 'catalogue/2022/author_box.html' %} {% endwith %} - {% choose_cites 3 author=tags.0 as cites %} + {% choose_cites 3 author=main_tag as cites %} {% if cites %}
diff --git a/src/catalogue/templates/catalogue/2022/theme_detail.html b/src/catalogue/templates/catalogue/2022/theme_detail.html index 29b0eebfa..b4db65d69 100644 --- a/src/catalogue/templates/catalogue/2022/theme_detail.html +++ b/src/catalogue/templates/catalogue/2022/theme_detail.html @@ -1,4 +1,5 @@ {% extends '2022/base.html' %} +{% load catalogue_tags %} {% load pagination_tags %} {% block global-content %} @@ -7,7 +8,7 @@ Strona główna Katalog Motyw - {{ tags.0.name }} + {{ main_tag.name }}
@@ -15,28 +16,44 @@
-

Motyw: {{ tags.0.name }}

+

Motyw: {{ main_tag.name }}

- + +
+
+
+ + +
+ {% for tag in tags %} + {% if tag is not main_tag %} + + {{ tag }} + ✖ + + {% endif %} + {% endfor %} +
+ +
+
+
+
+
+

{% nice_title_from_tags tags categories %}

+ {% if suggest %} +
+ {% for tag in suggest %} + + {{ tag }} + + {% endfor %} +
+ {% endif %} +
+
{% autopaginate object_list 10 %} @@ -53,8 +70,8 @@
-

Motyw: {{ tags.0.name }}

- {{ tags.0.description|safe }} +

Motyw: {{ main_tag.name }}

+ {{ main_tag.description|safe }}