From 9bc86f5a6542c5893ac94284da33162a7c7be2d6 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 25 Aug 2023 12:25:52 +0200 Subject: [PATCH] Cleanup --- .../templates/ajaxable/form_on_page.html | 2 +- src/api/templates/api/main.html | 2 +- src/api/templates/oauth/authorize_token.html | 2 +- .../static/{2022 => }/book/filter.js | 0 .../player/{2022_player.js => player.js} | 0 .../catalogue/{2022 => }/author_box.html | 0 .../catalogue/{2022 => }/author_detail.html | 8 +- .../catalogue/{2022 => }/book_box.html | 0 .../catalogue/{2022 => }/book_detail.html | 12 +- .../catalogue/{2022 => }/book_fragments.html | 6 +- .../catalogue/{2022 => }/book_list.html | 10 +- .../templates/catalogue/book_text.html | 2 +- .../templates/catalogue/catalogue.html | 2 +- .../catalogue/{2022 => }/collection.html | 4 +- .../catalogue/{2022 => }/collection_box.html | 0 .../catalogue/{2022 => }/collections.html | 4 +- .../catalogue/differentiate_tags.html | 2 +- .../{2022 => }/dynamic_book_list.html | 4 +- .../{2022 => }/dynamic_themed_book_list.html | 4 +- .../catalogue/{2022 => }/fragment_box.html | 0 .../{2022 => }/fragment_slider_box.html | 0 .../catalogue/recent_audiobooks_list.html | 4 +- .../catalogue/recent_daisy_list.html | 4 +- .../templates/catalogue/recent_list.html | 4 +- .../catalogue/{2022 => }/set_detail.html | 4 +- .../{2022_jplayer.html => jplayer.html} | 0 ...22_jplayer_link.html => jplayer_link.html} | 0 ...player_reader.html => jplayer_reader.html} | 0 .../catalogue/{2022 => }/tag_catalogue.html | 2 +- .../catalogue/{2022 => }/theme_detail.html | 6 +- .../{2022 => }/themed_book_list.html | 6 +- .../templates/catalogue/viewer_base.html | 2 +- src/catalogue/views.py | 26 ++--- .../templates/club/2022/donation_step1.html | 8 -- src/club/templates/club/donation_step1.html | 8 ++ .../club/{2022 => }/donation_step1_form.html | 0 .../club/{2022 => }/donation_step2.html | 2 +- .../club/{2022 => }/donation_step3.html | 2 +- .../club/{2022 => }/donation_step4.html | 2 +- .../club/{2022 => }/donation_step_base.html | 2 +- src/club/templates/club/index.html | 2 +- src/club/templates/club/schedule.html | 2 +- src/club/templates/club/year_summary.html | 2 +- src/club/templates/payu/rec_payment.html | 2 +- src/club/views.py | 10 +- .../templates/dictionary/note_list.html | 2 +- .../templates/education/course_detail.html | 2 +- .../templates/experiments/main_switch.html | 2 +- src/funding/admin.py | 1 - src/funding/models.py | 38 +----- .../funding/2022/includes/funding.html | 42 ------- .../funding/disable_notifications.html | 2 +- .../templates/funding/includes/funding.html | 99 ++++++---------- .../{2022 => }/includes/funding_box.html | 0 src/funding/templates/funding/no_thanks.html | 2 +- .../funding/{2022 => }/offer_detail.html | 4 +- .../funding/{2022 => }/offer_list.html | 4 +- src/funding/templates/funding/thanks.html | 2 +- src/funding/templates/funding/wlfund.html | 2 +- src/funding/templatetags/funding_tags.py | 5 - src/funding/views.py | 4 +- src/infopages/admin.py | 2 +- ...opage_options_remove_infopage_main_page.py | 21 ++++ src/infopages/models.py | 2 - .../infopages/{2022 => }/infopage.html | 2 +- .../templates/infopages/on_main.html | 3 - src/infopages/templatetags/__init__.py | 0 src/infopages/templatetags/infopages_tags.py | 13 --- src/infopages/views.py | 2 +- src/isbn/templates/isbn/add_isbn.html | 2 +- src/isbn/templates/isbn/assigned_isbn.html | 2 +- src/isbn/templates/isbn/confirm_isbn_wl.html | 2 +- src/isbn/templates/isbn/wl_dc_tags.html | 2 +- .../lesmianator/{2022 => }/lesmianator.html | 2 +- src/lesmianator/views.py | 2 +- .../templates/libraries/catalog_view.html | 2 +- .../templates/libraries/library_view.html | 2 +- .../templates/libraries/main_view.html | 2 +- .../templates/messaging/contact_detail.html | 2 +- .../templates/messaging/contact_form.html | 2 +- .../newsletter/{2022 => }/subscribe_form.html | 2 +- .../newsletter/{2022 => }/subscribed.html | 2 +- src/newsletter/views.py | 4 +- src/paypal/templates/paypal/cancel.html | 2 +- .../pdcounter/{2022 => }/author_detail.html | 4 +- .../pdcounter/{2022 => }/book_detail.html | 2 +- src/pdcounter/views.py | 4 +- .../picture/{2022 => }/picture_detail.html | 4 +- src/picture/views.py | 4 +- src/polls/templates/polls/poll.html | 2 +- .../templates/push/notification_form.html | 2 +- .../templates/push/notification_sent.html | 2 +- src/references/templates/references/map.html | 2 +- src/reporting/templates/reporting/main.html | 2 +- src/search/templates/search/results.html | 8 +- .../{carousel_2022.html => carousel.html} | 0 .../templates/social/{2022 => }/my_shelf.html | 4 +- src/social/templatetags/social_tags.py | 4 +- src/social/views.py | 2 +- src/stats/templates/stats/top.html | 2 +- src/waiter/templates/waiter/wait.html | 2 +- src/wolnelektury/settings/static.py | 20 ++-- .../static/js/{2022.js => header.js} | 0 .../static/{2021/scripts => js}/main.js | 0 src/wolnelektury/templates/2022/header.html | 106 ----------------- src/wolnelektury/templates/2022/paginate.html | 27 ----- src/wolnelektury/templates/404.html | 2 +- src/wolnelektury/templates/account/base.html | 2 +- .../templates/{2022 => }/base.html | 14 +-- .../templates/{2022 => }/base_simple.html | 2 +- .../templates/{2022 => }/footer.html | 0 .../templates/forms/form_detail.html | 2 +- .../templates/forms/form_sent.html | 2 +- src/wolnelektury/templates/header.html | 109 ++++++++++++++++++ .../templates/{2022 => }/hotjar.html | 0 src/wolnelektury/templates/lang-switcher.html | 20 ++++ .../templates/{2022 => }/main_page.html | 8 +- .../templates/pagination/pagination.html | 36 +++--- src/wolnelektury/templates/publish_plan.html | 2 +- .../templates/registration/login.html | 2 +- .../templates/registration/register.html | 2 +- src/wolnelektury/templates/site_base.html | 2 +- .../templates/socialaccount/base.html | 2 +- .../socialaccount/login_cancelled.html | 2 +- src/wolnelektury/templates/user.html | 2 +- .../templates/{2022 => }/user_actions.html | 0 src/wolnelektury/views.py | 2 +- 127 files changed, 381 insertions(+), 487 deletions(-) rename src/catalogue/static/{2022 => }/book/filter.js (100%) rename src/catalogue/static/player/{2022_player.js => player.js} (100%) rename src/catalogue/templates/catalogue/{2022 => }/author_box.html (100%) rename src/catalogue/templates/catalogue/{2022 => }/author_detail.html (93%) rename src/catalogue/templates/catalogue/{2022 => }/book_box.html (100%) rename src/catalogue/templates/catalogue/{2022 => }/book_detail.html (98%) rename src/catalogue/templates/catalogue/{2022 => }/book_fragments.html (93%) rename src/catalogue/templates/catalogue/{2022 => }/book_list.html (93%) rename src/catalogue/templates/catalogue/{2022 => }/collection.html (93%) rename src/catalogue/templates/catalogue/{2022 => }/collection_box.html (100%) rename src/catalogue/templates/catalogue/{2022 => }/collections.html (91%) rename src/catalogue/templates/catalogue/{2022 => }/dynamic_book_list.html (67%) rename src/catalogue/templates/catalogue/{2022 => }/dynamic_themed_book_list.html (67%) rename src/catalogue/templates/catalogue/{2022 => }/fragment_box.html (100%) rename src/catalogue/templates/catalogue/{2022 => }/fragment_slider_box.html (100%) rename src/catalogue/templates/catalogue/{2022 => }/set_detail.html (92%) rename src/catalogue/templates/catalogue/snippets/{2022_jplayer.html => jplayer.html} (100%) rename src/catalogue/templates/catalogue/snippets/{2022_jplayer_link.html => jplayer_link.html} (100%) rename src/catalogue/templates/catalogue/snippets/{2022_jplayer_reader.html => jplayer_reader.html} (100%) rename src/catalogue/templates/catalogue/{2022 => }/tag_catalogue.html (96%) rename src/catalogue/templates/catalogue/{2022 => }/theme_detail.html (94%) rename src/catalogue/templates/catalogue/{2022 => }/themed_book_list.html (95%) delete mode 100644 src/club/templates/club/2022/donation_step1.html create mode 100644 src/club/templates/club/donation_step1.html rename src/club/templates/club/{2022 => }/donation_step1_form.html (100%) rename src/club/templates/club/{2022 => }/donation_step2.html (98%) rename src/club/templates/club/{2022 => }/donation_step3.html (98%) rename src/club/templates/club/{2022 => }/donation_step4.html (88%) rename src/club/templates/club/{2022 => }/donation_step_base.html (99%) delete mode 100644 src/funding/templates/funding/2022/includes/funding.html rename src/funding/templates/funding/{2022 => }/includes/funding_box.html (100%) rename src/funding/templates/funding/{2022 => }/offer_detail.html (98%) rename src/funding/templates/funding/{2022 => }/offer_list.html (85%) create mode 100644 src/infopages/migrations/0003_alter_infopage_options_remove_infopage_main_page.py rename src/infopages/templates/infopages/{2022 => }/infopage.html (93%) delete mode 100644 src/infopages/templates/infopages/on_main.html delete mode 100644 src/infopages/templatetags/__init__.py delete mode 100644 src/infopages/templatetags/infopages_tags.py rename src/lesmianator/templates/lesmianator/{2022 => }/lesmianator.html (98%) rename src/newsletter/templates/newsletter/{2022 => }/subscribe_form.html (91%) rename src/newsletter/templates/newsletter/{2022 => }/subscribed.html (87%) rename src/pdcounter/templates/pdcounter/{2022 => }/author_detail.html (94%) rename src/pdcounter/templates/pdcounter/{2022 => }/book_detail.html (98%) rename src/picture/templates/picture/{2022 => }/picture_detail.html (98%) rename src/social/templates/social/{carousel_2022.html => carousel.html} (100%) rename src/social/templates/social/{2022 => }/my_shelf.html (94%) rename src/wolnelektury/static/js/{2022.js => header.js} (100%) rename src/wolnelektury/static/{2021/scripts => js}/main.js (100%) delete mode 100644 src/wolnelektury/templates/2022/header.html delete mode 100644 src/wolnelektury/templates/2022/paginate.html rename src/wolnelektury/templates/{2022 => }/base.html (87%) rename src/wolnelektury/templates/{2022 => }/base_simple.html (88%) rename src/wolnelektury/templates/{2022 => }/footer.html (100%) create mode 100644 src/wolnelektury/templates/header.html rename src/wolnelektury/templates/{2022 => }/hotjar.html (100%) create mode 100644 src/wolnelektury/templates/lang-switcher.html rename src/wolnelektury/templates/{2022 => }/main_page.html (98%) rename src/wolnelektury/templates/{2022 => }/user_actions.html (100%) diff --git a/src/ajaxable/templates/ajaxable/form_on_page.html b/src/ajaxable/templates/ajaxable/form_on_page.html index d88cadb85..ec5d414ea 100644 --- a/src/ajaxable/templates/ajaxable/form_on_page.html +++ b/src/ajaxable/templates/ajaxable/form_on_page.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% block titleextra %}{{ title }}{% endblock %} diff --git a/src/api/templates/api/main.html b/src/api/templates/api/main.html index 06688d0dc..72c455a5d 100644 --- a/src/api/templates/api/main.html +++ b/src/api/templates/api/main.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% load build_absolute_uri from fnp_common %} diff --git a/src/api/templates/oauth/authorize_token.html b/src/api/templates/oauth/authorize_token.html index 70c5e497d..60e5abd03 100644 --- a/src/api/templates/oauth/authorize_token.html +++ b/src/api/templates/oauth/authorize_token.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% block settings %} diff --git a/src/catalogue/static/2022/book/filter.js b/src/catalogue/static/book/filter.js similarity index 100% rename from src/catalogue/static/2022/book/filter.js rename to src/catalogue/static/book/filter.js diff --git a/src/catalogue/static/player/2022_player.js b/src/catalogue/static/player/player.js similarity index 100% rename from src/catalogue/static/player/2022_player.js rename to src/catalogue/static/player/player.js diff --git a/src/catalogue/templates/catalogue/2022/author_box.html b/src/catalogue/templates/catalogue/author_box.html similarity index 100% rename from src/catalogue/templates/catalogue/2022/author_box.html rename to src/catalogue/templates/catalogue/author_box.html diff --git a/src/catalogue/templates/catalogue/2022/author_detail.html b/src/catalogue/templates/catalogue/author_detail.html similarity index 93% rename from src/catalogue/templates/catalogue/2022/author_detail.html rename to src/catalogue/templates/catalogue/author_detail.html index 9b00d8bbd..ae2c49578 100644 --- a/src/catalogue/templates/catalogue/2022/author_detail.html +++ b/src/catalogue/templates/catalogue/author_detail.html @@ -1,4 +1,4 @@ -{% extends '2022/base.html' %} +{% extends 'base.html' %} {% load catalogue_tags %} {% load choose_cites from social_tags %} @@ -75,7 +75,7 @@
{% for book in object_list %} - {% include "catalogue/2022/book_box.html" %} + {% include "catalogue/book_box.html" %} {% endfor %}
@@ -84,7 +84,7 @@
{% with tag=main_tag %} - {% include 'catalogue/2022/author_box.html' %} + {% include 'catalogue/author_box.html' %} {% endwith %} {% choose_cites 3 author=main_tag as cites %} {% if cites %} @@ -94,7 +94,7 @@ {% for fragment in cites %}
- {% include "catalogue/2022/fragment_slider_box.html" %} + {% include "catalogue/fragment_slider_box.html" %}
{% endfor %} diff --git a/src/catalogue/templates/catalogue/2022/book_box.html b/src/catalogue/templates/catalogue/book_box.html similarity index 100% rename from src/catalogue/templates/catalogue/2022/book_box.html rename to src/catalogue/templates/catalogue/book_box.html diff --git a/src/catalogue/templates/catalogue/2022/book_detail.html b/src/catalogue/templates/catalogue/book_detail.html similarity index 98% rename from src/catalogue/templates/catalogue/2022/book_detail.html rename to src/catalogue/templates/catalogue/book_detail.html index c2db0b1af..713d65ac9 100644 --- a/src/catalogue/templates/catalogue/2022/book_detail.html +++ b/src/catalogue/templates/catalogue/book_detail.html @@ -1,4 +1,4 @@ -{% extends '2022/base.html' %} +{% extends 'base.html' %} {% load chunks %} {% load static %} @@ -182,11 +182,11 @@ {% if book.has_mp3_file %} - {% include 'catalogue/snippets/2022_jplayer.html' %} + {% include 'catalogue/snippets/jplayer.html' %} {% else %} {% with ch=book.get_child_audiobook %} {% if ch %} - {% include 'catalogue/snippets/2022_jplayer_link.html' with book=ch %} + {% include 'catalogue/snippets/jplayer_link.html' with book=ch %} {% endif %} {% endwith %} @@ -332,7 +332,7 @@
- {% include 'club/2022/donation_step1_form.html' with form=donation_form %} + {% include 'club/donation_step1_form.html' with form=donation_form %}
{% endif %} @@ -367,7 +367,7 @@ {% for tag in book.authors %}
- {% include 'catalogue/2022/author_box.html' %} + {% include 'catalogue/author_box.html' %} {% if forloop.first %} {% choose_cites 3 book=book as cites %} @@ -376,7 +376,7 @@
{% for fragment in cites %} - {% include "catalogue/2022/fragment_slider_box.html" %} + {% include "catalogue/fragment_slider_box.html" %} {% endfor %}
diff --git a/src/catalogue/templates/catalogue/2022/book_fragments.html b/src/catalogue/templates/catalogue/book_fragments.html similarity index 93% rename from src/catalogue/templates/catalogue/2022/book_fragments.html rename to src/catalogue/templates/catalogue/book_fragments.html index d1d4f2435..82cc83b1b 100644 --- a/src/catalogue/templates/catalogue/2022/book_fragments.html +++ b/src/catalogue/templates/catalogue/book_fragments.html @@ -1,4 +1,4 @@ -{% extends '2022/base.html' %} +{% extends 'base.html' %} {% load pagination_tags %} {% block global-content %} @@ -52,9 +52,9 @@
{% for fragment in fragments %} - {% include 'catalogue/2022/fragment_box.html' %} + {% include 'catalogue/fragment_box.html' %} {% endfor %} - {% paginate using '2022/paginate.html' %} + {% paginate %}
diff --git a/src/catalogue/templates/catalogue/2022/book_list.html b/src/catalogue/templates/catalogue/book_list.html similarity index 93% rename from src/catalogue/templates/catalogue/2022/book_list.html rename to src/catalogue/templates/catalogue/book_list.html index 1652e7a67..1f0d2c573 100644 --- a/src/catalogue/templates/catalogue/2022/book_list.html +++ b/src/catalogue/templates/catalogue/book_list.html @@ -1,4 +1,4 @@ -{% extends '2022/base.html' %} +{% extends 'base.html' %} {% load catalogue_tags %} {% load thumbnail %} {% load pagination_tags %} @@ -107,20 +107,20 @@
{% for book in object_list %} - {% include "catalogue/2022/book_box.html" %} + {% include "catalogue/book_box.html" %} {% endfor %}
- {% paginate using '2022/paginate.html' %} + {% paginate %}
{% if main_tag %}
{% with tag=main_tag %} - {% include 'catalogue/2022/author_box.html' %} + {% include 'catalogue/author_box.html' %} {% endwith %} {% choose_cites 3 author=main_tag as cites %} {% if cites %} @@ -130,7 +130,7 @@ {% for fragment in cites %}
- {% include "catalogue/2022/fragment_slider_box.html" %} + {% include "catalogue/fragment_slider_box.html" %}
{% endfor %} diff --git a/src/catalogue/templates/catalogue/book_text.html b/src/catalogue/templates/catalogue/book_text.html index 758c8cb81..16cc728b2 100644 --- a/src/catalogue/templates/catalogue/book_text.html +++ b/src/catalogue/templates/catalogue/book_text.html @@ -115,7 +115,7 @@ {% block footer %} {% if book.has_sync_file %}
- {% include 'catalogue/snippets/2022_jplayer_reader.html' %} + {% include 'catalogue/snippets/jplayer_reader.html' %}
{% javascript "book_text" %} - {% javascript "2022_player" %} + {% javascript "player" %} {% block extrabody %}{% endblock %} diff --git a/src/catalogue/views.py b/src/catalogue/views.py index 817b3ada5..a9cc7e00d 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -51,7 +51,7 @@ def daisy_list(request): def collection(request, slug): coll = get_object_or_404(Collection, slug=slug) - template_name = 'catalogue/2022/collection.html' + template_name = 'catalogue/collection.html' return render(request, template_name, { 'collection': coll, 'active_menu_item': 'collections', @@ -161,10 +161,10 @@ class ObjectListView(TemplateView): class BookList(ObjectListView): title = gettext_lazy('Literature') list_type = 'books' - template_name = 'catalogue/2022/book_list.html' - dynamic_template_name = 'catalogue/2022/dynamic_book_list.html' - themed_template_name = 'catalogue/2022/themed_book_list.html' - dynamic_themed_template_name = 'catalogue/2022/dynamic_themed_book_list.html' + template_name = 'catalogue/book_list.html' + dynamic_template_name = 'catalogue/dynamic_book_list.html' + themed_template_name = 'catalogue/themed_book_list.html' + dynamic_themed_template_name = 'catalogue/dynamic_themed_book_list.html' orderings = { 'pop': ('-popularity__count', 'najpopularniejsze'), @@ -196,8 +196,8 @@ class BookList(ObjectListView): class ArtList(ObjectListView): - template_name = 'catalogue/2022/book_list.html' - dynamic_template_name = 'catalogue/2022/dynamic_book_list.html' + template_name = 'catalogue/book_list.html' + dynamic_template_name = 'catalogue/dynamic_book_list.html' title = gettext_lazy('Art') list_type = 'gallery' @@ -382,9 +382,9 @@ def object_list(request, objects, fragments=None, related_tags=None, tags=None, has_theme = any(((theme := x).category == 'theme' for x in tags)) if has_theme: result['main_tag'] = theme - template = 'catalogue/2022/theme_detail.html' + template = 'catalogue/theme_detail.html' else: - template = 'catalogue/2022/author_detail.html' + template = 'catalogue/author_detail.html' return render( request, template, result, @@ -501,7 +501,7 @@ def book_fragments(request, slug, theme_slug): fragments = Fragment.tagged.with_all([theme]).filter( Q(book=book) | Q(book__ancestor=book)) - template_name = 'catalogue/2022/book_fragments.html' + template_name = 'catalogue/book_fragments.html' return render( request, template_name, @@ -522,7 +522,7 @@ def book_detail(request, slug): return render( request, - 'catalogue/2022/book_detail.html', + 'catalogue/book_detail.html', { 'book': book, 'accessible': book.is_accessible_to(request.user), @@ -661,7 +661,7 @@ def tag_catalogue(request, category): else: best = described_tags - template_name = 'catalogue/2022/tag_catalogue.html' + template_name = 'catalogue/tag_catalogue.html' return render(request, template_name, { 'tags': tags, 'best': best, @@ -679,7 +679,7 @@ def collections(request): else: best = objects - template_name = 'catalogue/2022/collections.html' + template_name = 'catalogue/collections.html' return render(request, template_name, { 'objects': objects, 'best': best, diff --git a/src/club/templates/club/2022/donation_step1.html b/src/club/templates/club/2022/donation_step1.html deleted file mode 100644 index a59abd6a3..000000000 --- a/src/club/templates/club/2022/donation_step1.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends 'club/2022/donation_step_base.html' %} -{% load club %} -{% load static %} - - -{% block donation-step-content %} - {% include "club/2022/donation_step1_form.html" %} -{% endblock %} diff --git a/src/club/templates/club/donation_step1.html b/src/club/templates/club/donation_step1.html new file mode 100644 index 000000000..1a5b65d1e --- /dev/null +++ b/src/club/templates/club/donation_step1.html @@ -0,0 +1,8 @@ +{% extends 'club/donation_step_base.html' %} +{% load club %} +{% load static %} + + +{% block donation-step-content %} + {% include "club/donation_step1_form.html" %} +{% endblock %} diff --git a/src/club/templates/club/2022/donation_step1_form.html b/src/club/templates/club/donation_step1_form.html similarity index 100% rename from src/club/templates/club/2022/donation_step1_form.html rename to src/club/templates/club/donation_step1_form.html diff --git a/src/club/templates/club/2022/donation_step2.html b/src/club/templates/club/donation_step2.html similarity index 98% rename from src/club/templates/club/2022/donation_step2.html rename to src/club/templates/club/donation_step2.html index 4f43b84fb..8f3ce676a 100644 --- a/src/club/templates/club/2022/donation_step2.html +++ b/src/club/templates/club/donation_step2.html @@ -1,4 +1,4 @@ -{% extends 'club/2022/donation_step_base.html' %} +{% extends 'club/donation_step_base.html' %} {% load static %} diff --git a/src/club/templates/club/2022/donation_step3.html b/src/club/templates/club/donation_step3.html similarity index 98% rename from src/club/templates/club/2022/donation_step3.html rename to src/club/templates/club/donation_step3.html index 7acb6170b..dd64ce769 100644 --- a/src/club/templates/club/2022/donation_step3.html +++ b/src/club/templates/club/donation_step3.html @@ -1,4 +1,4 @@ -{% extends 'club/2022/donation_step_base.html' %} +{% extends 'club/donation_step_base.html' %} {% load static %} {% load club %} diff --git a/src/club/templates/club/2022/donation_step4.html b/src/club/templates/club/donation_step4.html similarity index 88% rename from src/club/templates/club/2022/donation_step4.html rename to src/club/templates/club/donation_step4.html index fd14ca7ee..28e11cb83 100644 --- a/src/club/templates/club/2022/donation_step4.html +++ b/src/club/templates/club/donation_step4.html @@ -1,4 +1,4 @@ -{% extends 'club/2022/donation_step_base.html' %} +{% extends 'club/donation_step_base.html' %} {% block donation-step-content %} diff --git a/src/club/templates/club/2022/donation_step_base.html b/src/club/templates/club/donation_step_base.html similarity index 99% rename from src/club/templates/club/2022/donation_step_base.html rename to src/club/templates/club/donation_step_base.html index fa41f5f03..62666b1d2 100644 --- a/src/club/templates/club/2022/donation_step_base.html +++ b/src/club/templates/club/donation_step_base.html @@ -1,4 +1,4 @@ -{% extends '2022/base.html' %} +{% extends 'base.html' %} {% load chunks %} {% load club %} {% load static %} diff --git a/src/club/templates/club/index.html b/src/club/templates/club/index.html index 7c6a2075f..e07cdb47d 100644 --- a/src/club/templates/club/index.html +++ b/src/club/templates/club/index.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% load active_schedule from club %} {% load chunks %} diff --git a/src/club/templates/club/schedule.html b/src/club/templates/club/schedule.html index c86f11160..754759831 100644 --- a/src/club/templates/club/schedule.html +++ b/src/club/templates/club/schedule.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} diff --git a/src/club/templates/club/year_summary.html b/src/club/templates/club/year_summary.html index 434532179..3fbda0327 100644 --- a/src/club/templates/club/year_summary.html +++ b/src/club/templates/club/year_summary.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load chunks i18n %} diff --git a/src/club/templates/payu/rec_payment.html b/src/club/templates/payu/rec_payment.html index 3b7b18459..e5d391f37 100644 --- a/src/club/templates/payu/rec_payment.html +++ b/src/club/templates/payu/rec_payment.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} diff --git a/src/club/views.py b/src/club/views.py index 85faa85ad..068c5c659 100644 --- a/src/club/views.py +++ b/src/club/views.py @@ -34,7 +34,7 @@ class DonationStep1(UpdateView): queryset = models.Schedule.objects.filter(payed_at=None) form_class = forms.DonationStep1Form slug_field = slug_url_kwarg = 'key' - template_name = 'club/2022/donation_step1.html' + template_name = 'club/donation_step1.html' step = 1 def get_context_data(self, **kwargs): @@ -50,7 +50,7 @@ class DonationStep2(UpdateView): queryset = models.Schedule.objects.filter(payed_at=None) form_class = forms.DonationStep2Form slug_field = slug_url_kwarg = 'key' - template_name = 'club/2022/donation_step2.html' + template_name = 'club/donation_step2.html' step = 2 def get_context_data(self, **kwargs): @@ -61,7 +61,7 @@ class DonationStep2(UpdateView): class JoinView(CreateView): form_class = forms.DonationStep1Form - template_name = 'club/2022/donation_step1.html' + template_name = 'club/donation_step1.html' @property def club(self): @@ -122,7 +122,7 @@ class ScheduleView(DetailView): def get_template_names(self): if not self.object.payed_at: - return 'club/2022/donation_step3.html' + return 'club/donation_step3.html' return 'club/schedule.html' def get_context_data(self, *args, **kwargs): @@ -185,7 +185,7 @@ class PayUNotifyView(payu_views.NotifyView): class ScheduleThanksView(DetailView): model = models.Schedule - template_name = 'club/2022/donation_step4.html' + template_name = 'club/donation_step4.html' slug_field = slug_url_kwarg = 'key' step = 4 diff --git a/src/dictionary/templates/dictionary/note_list.html b/src/dictionary/templates/dictionary/note_list.html index 84c111e20..54758b04b 100644 --- a/src/dictionary/templates/dictionary/note_list.html +++ b/src/dictionary/templates/dictionary/note_list.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n pagination_tags %} {% load set_get from set_get %} diff --git a/src/education/templates/education/course_detail.html b/src/education/templates/education/course_detail.html index f5a9398dd..2723438e7 100644 --- a/src/education/templates/education/course_detail.html +++ b/src/education/templates/education/course_detail.html @@ -1,4 +1,4 @@ -{% extends '2022/base.html' %} +{% extends 'base.html' %} {% block main %} diff --git a/src/experiments/templates/experiments/main_switch.html b/src/experiments/templates/experiments/main_switch.html index 762d13b9b..cb4769005 100644 --- a/src/experiments/templates/experiments/main_switch.html +++ b/src/experiments/templates/experiments/main_switch.html @@ -1,4 +1,4 @@ -{% extends "2022/base.html" %} +{% extends "base.html" %} {% load static i18n %} {% block breadcrumbs %} diff --git a/src/funding/admin.py b/src/funding/admin.py index 6f29fbc83..f87a321b6 100644 --- a/src/funding/admin.py +++ b/src/funding/admin.py @@ -62,7 +62,6 @@ class FundingAdmin(admin.ModelAdmin): list_display = ['created_at', 'completed_at', 'offer', 'amount', 'name', 'email', 'perk_names'] search_fields = ['name', 'email', 'offer__title', 'offer__author'] list_filter = [PayedFilter, 'offer', PerksFilter] - search_fields = ['user'] actions = [export_as_csv_action( fields=[ 'id', 'offer', 'name', 'email', 'amount', 'completed_at', diff --git a/src/funding/models.py b/src/funding/models.py index 089b875b1..3280d6433 100644 --- a/src/funding/models.py +++ b/src/funding/models.py @@ -70,10 +70,7 @@ class Offer(models.Model): def clear_cache(self): clear_cached_renders(self.top_bar) - clear_cached_renders(self.top_bar_2022) - clear_cached_renders(self.list_bar) clear_cached_renders(self.detail_bar) - clear_cached_renders(self.detail_bar_2022) clear_cached_renders(self.status) clear_cached_renders(self.status_more) @@ -211,33 +208,6 @@ class Offer(models.Model): 'show_title_calling': True, } - @cached_render('funding/includes/funding.html') - def top_bar(self): - ctx = self.basic_info() - ctx.update({ - 'link': True, - 'closeable': True, - 'add_class': 'funding-top-header', - }) - return ctx - - @cached_render('funding/includes/funding.html') - def list_bar(self): - ctx = self.basic_info() - ctx.update({ - 'link': True, - 'show_title_calling': False, - }) - return ctx - - @cached_render('funding/includes/funding.html') - def detail_bar(self): - ctx = self.basic_info() - ctx.update({ - 'show_title': False, - }) - return ctx - @cached_render('funding/includes/offer_status.html') def status(self): return {'offer': self} @@ -246,8 +216,8 @@ class Offer(models.Model): def status_more(self): return {'offer': self} - @cached_render('funding/2022/includes/funding.html') - def top_bar_2022(self): + @cached_render('funding/includes/funding.html') + def top_bar(self): ctx = self.basic_info() ctx.update({ 'link': True, @@ -256,8 +226,8 @@ class Offer(models.Model): }) return ctx - @cached_render('funding/2022/includes/funding.html') - def detail_bar_2022(self): + @cached_render('funding/includes/funding.html') + def detail_bar(self): ctx = self.basic_info() ctx.update({ 'show_title': False, diff --git a/src/funding/templates/funding/2022/includes/funding.html b/src/funding/templates/funding/2022/includes/funding.html deleted file mode 100644 index b2dc55890..000000000 --- a/src/funding/templates/funding/2022/includes/funding.html +++ /dev/null @@ -1,42 +0,0 @@ -{% load i18n %} -{% load time_tags %} - -{% if offer %} - - - - -{% endif %} diff --git a/src/funding/templates/funding/disable_notifications.html b/src/funding/templates/funding/disable_notifications.html index ce2b33097..1ed6a9b04 100644 --- a/src/funding/templates/funding/disable_notifications.html +++ b/src/funding/templates/funding/disable_notifications.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% load fnp_share %} diff --git a/src/funding/templates/funding/includes/funding.html b/src/funding/templates/funding/includes/funding.html index 3d24b7df2..b2dc55890 100644 --- a/src/funding/templates/funding/includes/funding.html +++ b/src/funding/templates/funding/includes/funding.html @@ -1,69 +1,42 @@ -{% spaceless %} - {% load i18n %} - {% load time_tags %} +{% load i18n %} +{% load time_tags %} - {% if offer %} -
- {% if closeable %}X{% endif %} - {% if link and is_current %} - +{% if offer %} + + +
+ {% if link %} + + Wesprzyj! +
+ {% endif %} +
+ +
+
- {% if closeable %} -
{% trans "Help free the book!" %}
- + {% if link %} +
+ {% endif %} - {% endif %} -{% endspaceless %} +
+ +{% endif %} diff --git a/src/funding/templates/funding/2022/includes/funding_box.html b/src/funding/templates/funding/includes/funding_box.html similarity index 100% rename from src/funding/templates/funding/2022/includes/funding_box.html rename to src/funding/templates/funding/includes/funding_box.html diff --git a/src/funding/templates/funding/no_thanks.html b/src/funding/templates/funding/no_thanks.html index a8f2af179..c09be855b 100644 --- a/src/funding/templates/funding/no_thanks.html +++ b/src/funding/templates/funding/no_thanks.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% load fnp_share %} diff --git a/src/funding/templates/funding/2022/offer_detail.html b/src/funding/templates/funding/offer_detail.html similarity index 98% rename from src/funding/templates/funding/2022/offer_detail.html rename to src/funding/templates/funding/offer_detail.html index 920f84440..268817ff9 100644 --- a/src/funding/templates/funding/2022/offer_detail.html +++ b/src/funding/templates/funding/offer_detail.html @@ -1,4 +1,4 @@ -{% extends '2022/base.html' %} +{% extends 'base.html' %} {% load i18n %} {% load chunks %} {% load thumbnail %} @@ -18,7 +18,7 @@ {% block main %} - {{ object.detail_bar_2022 }} + {{ object.detail_bar }}

{{ object }}

diff --git a/src/funding/templates/funding/2022/offer_list.html b/src/funding/templates/funding/offer_list.html similarity index 85% rename from src/funding/templates/funding/2022/offer_list.html rename to src/funding/templates/funding/offer_list.html index 449cfea7b..3076b681f 100644 --- a/src/funding/templates/funding/2022/offer_list.html +++ b/src/funding/templates/funding/offer_list.html @@ -1,4 +1,4 @@ -{% extends '2022/base.html' %} +{% extends 'base.html' %} {% block settings %} @@ -21,7 +21,7 @@
{% for funding in object_list %} - {% include "funding/2022/includes/funding_box.html" %} + {% include "funding/includes/funding_box.html" %} {% endfor %}
diff --git a/src/funding/templates/funding/thanks.html b/src/funding/templates/funding/thanks.html index 3d018b228..24333fb6f 100644 --- a/src/funding/templates/funding/thanks.html +++ b/src/funding/templates/funding/thanks.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% load fnp_share %} {% load polls_tags %} diff --git a/src/funding/templates/funding/wlfund.html b/src/funding/templates/funding/wlfund.html index 9b4e82e70..0054956db 100644 --- a/src/funding/templates/funding/wlfund.html +++ b/src/funding/templates/funding/wlfund.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% block titleextra %}{% trans "Remaining funds" %}{% endblock %} diff --git a/src/funding/templatetags/funding_tags.py b/src/funding/templatetags/funding_tags.py index 3e4889200..bfd0e5462 100644 --- a/src/funding/templatetags/funding_tags.py +++ b/src/funding/templatetags/funding_tags.py @@ -16,11 +16,6 @@ def funding_top_bar(): offer = Offer.current() return offer.top_bar() if offer is not None else '' -@register.simple_tag -def funding_top_bar_2022(): - offer = Offer.current() - return offer.top_bar_2022() if offer is not None else '' - @register.simple_tag(takes_context=True) def fundings(context, offer): diff --git a/src/funding/views.py b/src/funding/views.py index 35770aedc..315c3da49 100644 --- a/src/funding/views.py +++ b/src/funding/views.py @@ -71,7 +71,7 @@ class WLFundView(TemplateView): class OfferDetailView(FormView): form_class = FundingForm - template_name = 'funding/2022/offer_detail.html' + template_name = 'funding/offer_detail.html' @csrf_exempt def dispatch(self, request, slug=None): @@ -121,7 +121,7 @@ class CurrentView(OfferDetailView): class OfferListView(ListView): queryset = Offer.public() - template_name = 'funding/2022/offer_list.html' + template_name = 'funding/offer_list.html' def get_context_data(self, **kwargs): ctx = super(OfferListView, self).get_context_data(**kwargs) diff --git a/src/infopages/admin.py b/src/infopages/admin.py index d2f5fb071..d9f07487c 100644 --- a/src/infopages/admin.py +++ b/src/infopages/admin.py @@ -8,6 +8,6 @@ from infopages.models import InfoPage class InfoPageAdmin(TranslationAdmin): - list_display = ('title', 'slug', 'main_page') + list_display = ('title', 'slug') admin.site.register(InfoPage, InfoPageAdmin) diff --git a/src/infopages/migrations/0003_alter_infopage_options_remove_infopage_main_page.py b/src/infopages/migrations/0003_alter_infopage_options_remove_infopage_main_page.py new file mode 100644 index 000000000..3f0aac19c --- /dev/null +++ b/src/infopages/migrations/0003_alter_infopage_options_remove_infopage_main_page.py @@ -0,0 +1,21 @@ +# Generated by Django 4.0.8 on 2023-08-25 08:51 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('infopages', '0002_auto_20151221_1225'), + ] + + operations = [ + migrations.AlterModelOptions( + name='infopage', + options={'verbose_name': 'info page', 'verbose_name_plural': 'info pages'}, + ), + migrations.RemoveField( + model_name='infopage', + name='main_page', + ), + ] diff --git a/src/infopages/models.py b/src/infopages/models.py index e6e4eb7cd..c8720ae2d 100644 --- a/src/infopages/models.py +++ b/src/infopages/models.py @@ -9,14 +9,12 @@ from django.utils.translation import gettext_lazy as _ class InfoPage(models.Model): """An InfoPage is used to display a two-column flatpage.""" - main_page = models.IntegerField(_('main page priority'), null=True, blank=True) slug = models.SlugField(_('slug'), max_length=120, unique=True, db_index=True) title = models.CharField(_('title'), max_length=120, blank=True) left_column = models.TextField(_('left column'), blank=True) right_column = models.TextField(_('right column'), blank=True) class Meta: - ordering = ('main_page', 'slug',) verbose_name = _('info page') verbose_name_plural = _('info pages') diff --git a/src/infopages/templates/infopages/2022/infopage.html b/src/infopages/templates/infopages/infopage.html similarity index 93% rename from src/infopages/templates/infopages/2022/infopage.html rename to src/infopages/templates/infopages/infopage.html index 465ad88cc..5c6da3510 100644 --- a/src/infopages/templates/infopages/2022/infopage.html +++ b/src/infopages/templates/infopages/infopage.html @@ -1,4 +1,4 @@ -{% extends '2022/base.html' %} +{% extends 'base.html' %} {% block settings %} {% load title %} diff --git a/src/infopages/templates/infopages/on_main.html b/src/infopages/templates/infopages/on_main.html deleted file mode 100644 index 8ebbea05b..000000000 --- a/src/infopages/templates/infopages/on_main.html +++ /dev/null @@ -1,3 +0,0 @@ -{% for page in objects %} -
  • {{ page.title }}
  • -{% endfor %} diff --git a/src/infopages/templatetags/__init__.py b/src/infopages/templatetags/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/infopages/templatetags/infopages_tags.py b/src/infopages/templatetags/infopages_tags.py deleted file mode 100644 index 3c3cfdff6..000000000 --- a/src/infopages/templatetags/infopages_tags.py +++ /dev/null @@ -1,13 +0,0 @@ -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. -# -from django import template -from infopages.models import InfoPage - -register = template.Library() - - -@register.inclusion_tag('infopages/on_main.html') -def infopages_on_main(): - objects = InfoPage.objects.exclude(main_page=None) - return {"objects": objects} diff --git a/src/infopages/views.py b/src/infopages/views.py index 986d6a56e..5bc7b4b3e 100644 --- a/src/infopages/views.py +++ b/src/infopages/views.py @@ -23,7 +23,7 @@ def infopage(request, slug): return render( request, - 'infopages/2022/infopage.html', + 'infopages/infopage.html', { 'page': page, 'left_column': left_column, diff --git a/src/isbn/templates/isbn/add_isbn.html b/src/isbn/templates/isbn/add_isbn.html index 242badbd5..fc4f2a059 100644 --- a/src/isbn/templates/isbn/add_isbn.html +++ b/src/isbn/templates/isbn/add_isbn.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% block settings %} {% load title %} diff --git a/src/isbn/templates/isbn/assigned_isbn.html b/src/isbn/templates/isbn/assigned_isbn.html index 768b88cbf..dce566426 100644 --- a/src/isbn/templates/isbn/assigned_isbn.html +++ b/src/isbn/templates/isbn/assigned_isbn.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% block settings %} {% load title %} diff --git a/src/isbn/templates/isbn/confirm_isbn_wl.html b/src/isbn/templates/isbn/confirm_isbn_wl.html index cd27b54eb..5ce3a46fc 100644 --- a/src/isbn/templates/isbn/confirm_isbn_wl.html +++ b/src/isbn/templates/isbn/confirm_isbn_wl.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% block settings %} {% load title %} diff --git a/src/isbn/templates/isbn/wl_dc_tags.html b/src/isbn/templates/isbn/wl_dc_tags.html index b4c935df3..43afd4803 100644 --- a/src/isbn/templates/isbn/wl_dc_tags.html +++ b/src/isbn/templates/isbn/wl_dc_tags.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% block settings %} {% load title %} diff --git a/src/lesmianator/templates/lesmianator/2022/lesmianator.html b/src/lesmianator/templates/lesmianator/lesmianator.html similarity index 98% rename from src/lesmianator/templates/lesmianator/2022/lesmianator.html rename to src/lesmianator/templates/lesmianator/lesmianator.html index c334792aa..437911b81 100644 --- a/src/lesmianator/templates/lesmianator/2022/lesmianator.html +++ b/src/lesmianator/templates/lesmianator/lesmianator.html @@ -1,4 +1,4 @@ -{% extends "2022/base.html" %} +{% extends "base.html" %} {% load i18n %} {% load catalogue_tags %} diff --git a/src/lesmianator/views.py b/src/lesmianator/views.py index b81f57f92..e179c1483 100644 --- a/src/lesmianator/views.py +++ b/src/lesmianator/views.py @@ -16,7 +16,7 @@ def main_page(request): return render( request, - 'lesmianator/2022/lesmianator.html', + 'lesmianator/lesmianator.html', {"last": last, "shelves": shelves}) @cache.never_cache diff --git a/src/libraries/templates/libraries/catalog_view.html b/src/libraries/templates/libraries/catalog_view.html index 2f2103110..92abeac09 100644 --- a/src/libraries/templates/libraries/catalog_view.html +++ b/src/libraries/templates/libraries/catalog_view.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% block settings %} diff --git a/src/libraries/templates/libraries/library_view.html b/src/libraries/templates/libraries/library_view.html index 7b340be51..2e1ca9ba8 100644 --- a/src/libraries/templates/libraries/library_view.html +++ b/src/libraries/templates/libraries/library_view.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% block settings %} diff --git a/src/libraries/templates/libraries/main_view.html b/src/libraries/templates/libraries/main_view.html index eb2f5d273..b887bdc43 100644 --- a/src/libraries/templates/libraries/main_view.html +++ b/src/libraries/templates/libraries/main_view.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% block settings %} diff --git a/src/messaging/templates/messaging/contact_detail.html b/src/messaging/templates/messaging/contact_detail.html index ada00b3e9..b30ff229c 100644 --- a/src/messaging/templates/messaging/contact_detail.html +++ b/src/messaging/templates/messaging/contact_detail.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% block body %} diff --git a/src/messaging/templates/messaging/contact_form.html b/src/messaging/templates/messaging/contact_form.html index a32d25a74..7ce1aadea 100644 --- a/src/messaging/templates/messaging/contact_form.html +++ b/src/messaging/templates/messaging/contact_form.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% block body %} diff --git a/src/newsletter/templates/newsletter/2022/subscribe_form.html b/src/newsletter/templates/newsletter/subscribe_form.html similarity index 91% rename from src/newsletter/templates/newsletter/2022/subscribe_form.html rename to src/newsletter/templates/newsletter/subscribe_form.html index f667c08d6..e20be8aba 100644 --- a/src/newsletter/templates/newsletter/2022/subscribe_form.html +++ b/src/newsletter/templates/newsletter/subscribe_form.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% load honeypot %} diff --git a/src/newsletter/templates/newsletter/2022/subscribed.html b/src/newsletter/templates/newsletter/subscribed.html similarity index 87% rename from src/newsletter/templates/newsletter/2022/subscribed.html rename to src/newsletter/templates/newsletter/subscribed.html index 5396885ea..56cf71a37 100644 --- a/src/newsletter/templates/newsletter/2022/subscribed.html +++ b/src/newsletter/templates/newsletter/subscribed.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} diff --git a/src/newsletter/views.py b/src/newsletter/views.py index cfa394be5..f226a6b12 100644 --- a/src/newsletter/views.py +++ b/src/newsletter/views.py @@ -19,7 +19,7 @@ def subscribe_form(request, slug=''): else: form = SubscribeForm(newsletter) - template_name = 'newsletter/2022/subscribe_form.html' + template_name = 'newsletter/subscribe_form.html' return render(request, template_name, { 'page_title': newsletter.page_title, 'form': form, @@ -27,7 +27,7 @@ def subscribe_form(request, slug=''): def subscribed(request): - template_name = 'newsletter/2022/subscribed.html' + template_name = 'newsletter/subscribed.html' return render(request, template_name, { 'page_title': _('Subscribed'), }) diff --git a/src/paypal/templates/paypal/cancel.html b/src/paypal/templates/paypal/cancel.html index eb73f3397..3314700ba 100644 --- a/src/paypal/templates/paypal/cancel.html +++ b/src/paypal/templates/paypal/cancel.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% block body %} diff --git a/src/pdcounter/templates/pdcounter/2022/author_detail.html b/src/pdcounter/templates/pdcounter/author_detail.html similarity index 94% rename from src/pdcounter/templates/pdcounter/2022/author_detail.html rename to src/pdcounter/templates/pdcounter/author_detail.html index c1920d1fd..85d29adc5 100644 --- a/src/pdcounter/templates/pdcounter/2022/author_detail.html +++ b/src/pdcounter/templates/pdcounter/author_detail.html @@ -1,4 +1,4 @@ -{% extends "2022/base.html" %} +{% extends "base.html" %} {% load i18n %} {% load time_tags %} @@ -48,7 +48,7 @@
    - {% include "catalogue/2022/author_box.html" %} + {% include "catalogue/author_box.html" %}
    {% endblock %} diff --git a/src/pdcounter/templates/pdcounter/2022/book_detail.html b/src/pdcounter/templates/pdcounter/book_detail.html similarity index 98% rename from src/pdcounter/templates/pdcounter/2022/book_detail.html rename to src/pdcounter/templates/pdcounter/book_detail.html index 9f07b479c..36ec0e012 100644 --- a/src/pdcounter/templates/pdcounter/2022/book_detail.html +++ b/src/pdcounter/templates/pdcounter/book_detail.html @@ -1,4 +1,4 @@ -{% extends '2022/base.html' %} +{% extends 'base.html' %} {% load i18n %} {% load time_tags %} diff --git a/src/pdcounter/views.py b/src/pdcounter/views.py index e66254b00..ca61f161f 100644 --- a/src/pdcounter/views.py +++ b/src/pdcounter/views.py @@ -18,7 +18,7 @@ def book_stub_detail(request, slug): form = PublishingSuggestForm(initial={"books": "%s — %s, \n" % (book.author, book.title)}) - template_name = 'pdcounter/2022/book_detail.html' + template_name = 'pdcounter/book_detail.html' return render(request, template_name, { 'book': book, @@ -37,7 +37,7 @@ def author_detail(request, slug): form = PublishingSuggestForm(initial={"books": author.name + ", \n"}) - template_name = 'pdcounter/2022/author_detail.html' + template_name = 'pdcounter/author_detail.html' return render(request, template_name, { 'author': author, diff --git a/src/picture/templates/picture/2022/picture_detail.html b/src/picture/templates/picture/picture_detail.html similarity index 98% rename from src/picture/templates/picture/2022/picture_detail.html rename to src/picture/templates/picture/picture_detail.html index d9707c7af..4b6177993 100644 --- a/src/picture/templates/picture/2022/picture_detail.html +++ b/src/picture/templates/picture/picture_detail.html @@ -1,4 +1,4 @@ -{% extends '2022/base.html' %} +{% extends 'base.html' %} {% load i18n %} {% load chunks %} @@ -91,7 +91,7 @@ {% for tag in picture.authors %}
    - {% include 'catalogue/2022/author_box.html' %} + {% include 'catalogue/author_box.html' %}
    {% endfor %} diff --git a/src/picture/views.py b/src/picture/views.py index 35f0f3d44..44d516c7f 100644 --- a/src/picture/views.py +++ b/src/picture/views.py @@ -26,7 +26,7 @@ def picture_list_thumb(request): suggestions.append(t) if sum(suggestion_categories.values()) == 10: break - template_name = 'catalogue/2022/author_detail.html' + template_name = 'catalogue/author_detail.html' return render(request, template_name, { 'object_list': pictures, 'title': 'Galeria', @@ -41,7 +41,7 @@ def picture_detail(request, slug): theme_things = split_tags(picture.related_themes()) - template_name = 'picture/2022/picture_detail.html' + template_name = 'picture/picture_detail.html' return render(request, template_name, { 'picture': picture, diff --git a/src/polls/templates/polls/poll.html b/src/polls/templates/polls/poll.html index 61d651e6b..aabadec95 100644 --- a/src/polls/templates/polls/poll.html +++ b/src/polls/templates/polls/poll.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% load polls_tags %} diff --git a/src/push/templates/push/notification_form.html b/src/push/templates/push/notification_form.html index 680a77679..6767c154b 100644 --- a/src/push/templates/push/notification_form.html +++ b/src/push/templates/push/notification_form.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% block titleextra %}{% trans "Notifications" %}{% endblock %} diff --git a/src/push/templates/push/notification_sent.html b/src/push/templates/push/notification_sent.html index 53eb29bfc..8688c2d0f 100644 --- a/src/push/templates/push/notification_sent.html +++ b/src/push/templates/push/notification_sent.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% block titleextra %}{% trans "Notifications" %}{% endblock %} diff --git a/src/references/templates/references/map.html b/src/references/templates/references/map.html index f21b70b8b..3b266a1ed 100644 --- a/src/references/templates/references/map.html +++ b/src/references/templates/references/map.html @@ -1,4 +1,4 @@ -{% extends "2022/base.html" %} +{% extends "base.html" %} {% load cache %} {% load static %} {% load l10n %} diff --git a/src/reporting/templates/reporting/main.html b/src/reporting/templates/reporting/main.html index ece5d0268..5d121ce74 100644 --- a/src/reporting/templates/reporting/main.html +++ b/src/reporting/templates/reporting/main.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n l10n %} {% load reporting_stats catalogue_tags %} diff --git a/src/search/templates/search/results.html b/src/search/templates/search/results.html index 625bb6591..dbcf1c0a9 100644 --- a/src/search/templates/search/results.html +++ b/src/search/templates/search/results.html @@ -1,4 +1,4 @@ -{% extends "2022/base.html" %} +{% extends "base.html" %} {% block main %} @@ -108,7 +108,7 @@
    {% for book in results.book %} - {% include 'catalogue/2022/book_box.html' %} + {% include 'catalogue/book_box.html' %} {% endfor %}
    @@ -121,7 +121,7 @@
    {% for book in results.art %} - {% include 'catalogue/2022/book_box.html' %} + {% include 'catalogue/book_box.html' %} {% endfor %}
    @@ -153,7 +153,7 @@

    Kolekcje

    {% for collection in results.collection %} - {% include 'catalogue/2022/collection_box.html' %} + {% include 'catalogue/collection_box.html' %} {% endfor %}
    diff --git a/src/social/templates/social/carousel_2022.html b/src/social/templates/social/carousel.html similarity index 100% rename from src/social/templates/social/carousel_2022.html rename to src/social/templates/social/carousel.html diff --git a/src/social/templates/social/2022/my_shelf.html b/src/social/templates/social/my_shelf.html similarity index 94% rename from src/social/templates/social/2022/my_shelf.html rename to src/social/templates/social/my_shelf.html index a955b31b7..f42a76b27 100644 --- a/src/social/templates/social/2022/my_shelf.html +++ b/src/social/templates/social/my_shelf.html @@ -1,4 +1,4 @@ -{% extends '2022/base.html' %} +{% extends 'base.html' %} {% load catalogue_tags %} @@ -54,7 +54,7 @@
    {% for book in books %} - {% include "catalogue/2022/book_box.html" %} + {% include "catalogue/book_box.html" %} {% endfor %}
    diff --git a/src/social/templatetags/social_tags.py b/src/social/templatetags/social_tags.py index 81a69e031..7e61b9041 100644 --- a/src/social/templatetags/social_tags.py +++ b/src/social/templatetags/social_tags.py @@ -51,8 +51,8 @@ def book_shelf_tags(context, book_id): return lazy(get_value, str)() -@register.inclusion_tag('social/carousel_2022.html', takes_context=True) -def carousel_2022(context, placement): +@register.inclusion_tag('social/carousel.html', takes_context=True) +def carousel(context, placement): banners = Carousel.get(placement).carouselitem_set.all()#first().get_banner() return { 'banners': [b.get_banner() for b in banners], diff --git a/src/social/views.py b/src/social/views.py index 9087d7bba..d3f938118 100644 --- a/src/social/views.py +++ b/src/social/views.py @@ -66,7 +66,7 @@ def unlike_book(request, slug): @login_required def my_shelf(request): - template_name = 'social/2022/my_shelf.html' + template_name = 'social/my_shelf.html' tags = list(request.user.tag_set.all()) suggest = [t for t in tags if t.name] print(suggest) diff --git a/src/stats/templates/stats/top.html b/src/stats/templates/stats/top.html index 1b365b162..422624cbe 100644 --- a/src/stats/templates/stats/top.html +++ b/src/stats/templates/stats/top.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% block settings %} {% load title %} diff --git a/src/waiter/templates/waiter/wait.html b/src/waiter/templates/waiter/wait.html index b67d957f6..0cee1df4c 100644 --- a/src/waiter/templates/waiter/wait.html +++ b/src/waiter/templates/waiter/wait.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% load static from static %} diff --git a/src/wolnelektury/settings/static.py b/src/wolnelektury/settings/static.py index e91c742d4..09e6111e3 100644 --- a/src/wolnelektury/settings/static.py +++ b/src/wolnelektury/settings/static.py @@ -21,7 +21,7 @@ IMAGE_DIR = 'book/pictures/' PIPELINE = { 'STYLESHEETS': { - '2022': { + 'main': { 'source_filenames': [ 'contrib/jquery-ui-1.13.1.custom/jquery-ui.css', 'css/jquery.countdown.css', @@ -30,7 +30,7 @@ PIPELINE = { '2022/more.scss', 'chunks/edit.scss', ], - 'output_filename': 'css/compressed/2022.css', + 'output_filename': 'css/compressed/main.css', }, 'book_text': { 'source_filenames': [ @@ -51,17 +51,17 @@ PIPELINE = { }, }, 'JAVASCRIPT': { - '2022': { + 'main': { 'source_filenames': [ '2022/scripts/vendor.js', 'contrib/jquery-ui-1.13.1.custom/jquery-ui.js', 'js/search.js', - 'js/2022.js', - '2022/book/filter.js', + 'js/header.js', + 'book/filter.js', 'chunks/edit.js', '2022/scripts/modernizr.js', - '2021/scripts/main.js', + 'js/main.js', 'js/contrib/jquery.cycle2.min.js', 'sponsors/js/sponsors.js', @@ -73,15 +73,15 @@ PIPELINE = { 'pdcounter/pdcounter.js', ], - 'output_filename': 'js/2022.min.js' + 'output_filename': 'js/compressed/main.min.js' }, - '2022_player': { + 'player': { 'source_filenames': [ 'js/contrib/jplayer/jquery.jplayer.min.js', 'js/contrib/jplayer/jplayer.playlist.min.js', - 'player/2022_player.js', + 'player/player.js', ], - 'output_filename': 'js/2022_player.min.js', + 'output_filename': 'js/compressed/player.min.js', }, 'book_text': { 'source_filenames': [ diff --git a/src/wolnelektury/static/js/2022.js b/src/wolnelektury/static/js/header.js similarity index 100% rename from src/wolnelektury/static/js/2022.js rename to src/wolnelektury/static/js/header.js diff --git a/src/wolnelektury/static/2021/scripts/main.js b/src/wolnelektury/static/js/main.js similarity index 100% rename from src/wolnelektury/static/2021/scripts/main.js rename to src/wolnelektury/static/js/main.js diff --git a/src/wolnelektury/templates/2022/header.html b/src/wolnelektury/templates/2022/header.html deleted file mode 100644 index 4fa616d2c..000000000 --- a/src/wolnelektury/templates/2022/header.html +++ /dev/null @@ -1,106 +0,0 @@ -{% load cache %} -{% load static %} -{% load menu %} -{% load latest_blog_posts from blog %} -{% load preview_ad from catalogue_tags %} - - - -{% block under-menu %}{% endblock %} diff --git a/src/wolnelektury/templates/2022/paginate.html b/src/wolnelektury/templates/2022/paginate.html deleted file mode 100644 index 79ac19137..000000000 --- a/src/wolnelektury/templates/2022/paginate.html +++ /dev/null @@ -1,27 +0,0 @@ -{% if is_paginated %} -
    - {% if page_obj.has_previous %} - - - - {% endif %} -
      - {% for page in pages %} - {% if page %} - {% if page == page_obj.number %} -
    • {{ page }}
    • - {% else %} -
    • {{ page }}
    • - {% endif %} - {% else %} -
    • …
    • - {% endif %} - {% endfor %} -
    - {% if page_obj.has_next %} - - - - {% endif %} -
    -{% endif %} diff --git a/src/wolnelektury/templates/404.html b/src/wolnelektury/templates/404.html index 372c94118..b2bc74c2c 100644 --- a/src/wolnelektury/templates/404.html +++ b/src/wolnelektury/templates/404.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% load i18n %} {% block settings %} diff --git a/src/wolnelektury/templates/account/base.html b/src/wolnelektury/templates/account/base.html index 5f9693d51..40c1de9e7 100644 --- a/src/wolnelektury/templates/account/base.html +++ b/src/wolnelektury/templates/account/base.html @@ -1,4 +1,4 @@ -{% extends "2022/base_simple.html" %} +{% extends "base_simple.html" %} {% block body %}
    diff --git a/src/wolnelektury/templates/2022/base.html b/src/wolnelektury/templates/base.html similarity index 87% rename from src/wolnelektury/templates/2022/base.html rename to src/wolnelektury/templates/base.html index c31eb7819..713a5b559 100644 --- a/src/wolnelektury/templates/2022/base.html +++ b/src/wolnelektury/templates/base.html @@ -20,19 +20,19 @@ href="{% static 'opensearch.xml' %}"/> - {% stylesheet '2022' %} + {% stylesheet 'main' %} {% tracking_code %} {% block extrahead %}{% endblock %} - {% include '2022/header.html' %} + {% include 'header.html' %} {% block under-menu %}{% endblock %} {% if not funding_no_show_current %}
    {% cache 120 funding_top_bar LANGUAGE_CODE %} - {% funding_top_bar_2022 %} + {% funding_top_bar %} {% endcache %}
    {% endif %} @@ -51,16 +51,16 @@ {% endblock %} {% block footer %} - {% include '2022/footer.html' %} + {% include 'footer.html' %} {% endblock %} - {% javascript '2022' %} - {% javascript '2022_player' %} + {% javascript 'main' %} + {% javascript 'player' %} {% block extrabody %}{% endblock %} - {% include '2022/hotjar.html' %} + {% include 'hotjar.html' %} {% csrf_token %} diff --git a/src/wolnelektury/templates/2022/base_simple.html b/src/wolnelektury/templates/base_simple.html similarity index 88% rename from src/wolnelektury/templates/2022/base_simple.html rename to src/wolnelektury/templates/base_simple.html index 481d81436..01d89b960 100644 --- a/src/wolnelektury/templates/2022/base_simple.html +++ b/src/wolnelektury/templates/base_simple.html @@ -1,4 +1,4 @@ -{% extends "2022/base.html" %} +{% extends "base.html" %} {% block main %} diff --git a/src/wolnelektury/templates/2022/footer.html b/src/wolnelektury/templates/footer.html similarity index 100% rename from src/wolnelektury/templates/2022/footer.html rename to src/wolnelektury/templates/footer.html diff --git a/src/wolnelektury/templates/forms/form_detail.html b/src/wolnelektury/templates/forms/form_detail.html index 32df9d05f..c94d70244 100644 --- a/src/wolnelektury/templates/forms/form_detail.html +++ b/src/wolnelektury/templates/forms/form_detail.html @@ -1,4 +1,4 @@ -{% extends form.base_template|default:"2022/base.html" %} +{% extends form.base_template|default:"base.html" %} {% load forms_builder_tags %} {% load title %} diff --git a/src/wolnelektury/templates/forms/form_sent.html b/src/wolnelektury/templates/forms/form_sent.html index ee4cc1f07..515a643ea 100644 --- a/src/wolnelektury/templates/forms/form_sent.html +++ b/src/wolnelektury/templates/forms/form_sent.html @@ -1,4 +1,4 @@ -{% extends form.base_template|default:"2022/base_simple.html" %} +{% extends form.base_template|default:"base_simple.html" %} {% load forms_builder_tags %} {% load title %} {% load i18n %} diff --git a/src/wolnelektury/templates/header.html b/src/wolnelektury/templates/header.html new file mode 100644 index 000000000..225672487 --- /dev/null +++ b/src/wolnelektury/templates/header.html @@ -0,0 +1,109 @@ +{% load cache %} +{% load static %} +{% load menu %} +{% load latest_blog_posts from blog %} +{% load preview_ad from catalogue_tags %} + + + +{% block under-menu %}{% endblock %} diff --git a/src/wolnelektury/templates/2022/hotjar.html b/src/wolnelektury/templates/hotjar.html similarity index 100% rename from src/wolnelektury/templates/2022/hotjar.html rename to src/wolnelektury/templates/hotjar.html diff --git a/src/wolnelektury/templates/lang-switcher.html b/src/wolnelektury/templates/lang-switcher.html new file mode 100644 index 000000000..ea59d9f2a --- /dev/null +++ b/src/wolnelektury/templates/lang-switcher.html @@ -0,0 +1,20 @@ +{% comment %} +{% load i18n %} +
    +
    + + {{ LANGUAGE_CODE|language_name_local }} + +
    +
    + {% csrf_token %} +
    + {% for lang in LANGUAGES %} + + {% endfor %} +
    +
    +
    +{% endcomment %} diff --git a/src/wolnelektury/templates/2022/main_page.html b/src/wolnelektury/templates/main_page.html similarity index 98% rename from src/wolnelektury/templates/2022/main_page.html rename to src/wolnelektury/templates/main_page.html index 8a826e6e7..386ebe620 100644 --- a/src/wolnelektury/templates/2022/main_page.html +++ b/src/wolnelektury/templates/main_page.html @@ -1,4 +1,4 @@ -{% extends "2022/base.html" %} +{% extends "base.html" %} {% load static %} {% load thumbnail %} {% load catalogue_tags %} @@ -159,7 +159,7 @@
    {% for book in recommended_collection.get_books %} - {% include 'catalogue/2022/book_box.html' %} + {% include 'catalogue/book_box.html' %} {% endfor %}
    @@ -173,7 +173,7 @@
    @@ -280,7 +280,7 @@
    {% for book in last_published %} - {% include 'catalogue/2022/book_box.html' %} + {% include 'catalogue/book_box.html' %} {% endfor %}
    diff --git a/src/wolnelektury/templates/pagination/pagination.html b/src/wolnelektury/templates/pagination/pagination.html index 460932127..79ac19137 100644 --- a/src/wolnelektury/templates/pagination/pagination.html +++ b/src/wolnelektury/templates/pagination/pagination.html @@ -1,27 +1,27 @@ -{% load i18n %} - {% if is_paginated %} -