Remove old version.
authorRadek Czajka <rczajka@rczajka.pl>
Thu, 3 Aug 2023 15:26:24 +0000 (17:26 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Thu, 3 Aug 2023 15:26:24 +0000 (17:26 +0200)
150 files changed:
src/ajaxable/templates/ajaxable/form.html
src/ajaxable/templates/ajaxable/form_on_page.html
src/ajaxable/templatetags/__init__.py [deleted file]
src/ajaxable/templatetags/ajaxable_tags.py [deleted file]
src/api/templates/api/main.html
src/api/templates/oauth/authorize_token.html
src/catalogue/models/collection.py
src/catalogue/models/fragment.py
src/catalogue/templates/catalogue/book_detail.html [deleted file]
src/catalogue/templates/catalogue/book_fragments.html [deleted file]
src/catalogue/templates/catalogue/book_list.html [deleted file]
src/catalogue/templates/catalogue/book_searched.html [deleted file]
src/catalogue/templates/catalogue/book_short.html
src/catalogue/templates/catalogue/book_wide.html [deleted file]
src/catalogue/templates/catalogue/catalogue.html
src/catalogue/templates/catalogue/collection.html [deleted file]
src/catalogue/templates/catalogue/collection_box.html [deleted file]
src/catalogue/templates/catalogue/collections.html [deleted file]
src/catalogue/templates/catalogue/custom_pdf_form.html
src/catalogue/templates/catalogue/daisy_list.html [deleted file]
src/catalogue/templates/catalogue/differentiate_tags.html
src/catalogue/templates/catalogue/fragment_short.html [deleted file]
src/catalogue/templates/catalogue/picture_detail.html [deleted file]
src/catalogue/templates/catalogue/picture_list.html [deleted file]
src/catalogue/templates/catalogue/player.html [deleted file]
src/catalogue/templates/catalogue/snippets/jplayer.html [deleted file]
src/catalogue/templates/catalogue/snippets/like_button.html [deleted file]
src/catalogue/templates/catalogue/tag_catalogue.html [deleted file]
src/catalogue/templates/catalogue/tagged_object_list.html [deleted file]
src/catalogue/templates/catalogue/work-list.html [deleted file]
src/catalogue/templatetags/catalogue_tags.py
src/catalogue/urls.py
src/catalogue/views.py
src/club/forms.py
src/club/payment_methods.py
src/club/templates/club/dummy_payment.html [deleted file]
src/club/templates/club/index.html
src/club/templates/club/membership_form.html [deleted file]
src/club/templates/club/membership_form_app.html [deleted file]
src/club/templates/club/payment/dummy-re.html [deleted file]
src/club/templates/club/payment/dummy.html [deleted file]
src/club/templates/club/payment/paypal.html [deleted file]
src/club/templates/club/payment/payu-re.html [deleted file]
src/club/templates/club/payment/payu.html [deleted file]
src/club/templates/club/payment_form.html [deleted file]
src/club/templates/club/payment_info.html [deleted file]
src/club/templates/club/schedule.html
src/club/templates/club/thanks.html [deleted file]
src/club/templates/club/widgets/plan.html [deleted file]
src/club/templates/club/year_summary.html
src/club/templates/payu/rec_payment.html
src/club/urls.py
src/club/views.py
src/dictionary/templates/dictionary/note_list.html
src/experiments/templates/experiments/main_switch.html
src/funding/templates/funding/disable_notifications.html
src/funding/templates/funding/no_thanks.html
src/funding/templates/funding/offer_detail.html [deleted file]
src/funding/templates/funding/offer_list.html [deleted file]
src/funding/templates/funding/thanks.html
src/funding/templates/funding/wlfund.html
src/funding/views.py
src/infopages/templates/infopages/infopage.html [deleted file]
src/infopages/views.py
src/isbn/templates/isbn/add_isbn.html
src/isbn/templates/isbn/assigned_isbn.html
src/isbn/templates/isbn/confirm_isbn_wl.html
src/isbn/templates/isbn/wl_dc_tags.html
src/lesmianator/templates/lesmianator/lesmianator.html [deleted file]
src/lesmianator/views.py
src/libraries/templates/libraries/catalog_view.html
src/libraries/templates/libraries/library_view.html
src/libraries/templates/libraries/main_view.html
src/messaging/templates/messaging/contact_detail.html
src/messaging/templates/messaging/contact_form.html
src/newsletter/templates/newsletter/confirm_subscription.html [deleted file]
src/newsletter/templates/newsletter/subscribe_form.html [deleted file]
src/newsletter/templates/newsletter/subscribed.html [deleted file]
src/newsletter/views.py
src/paypal/forms.py [deleted file]
src/paypal/templates/paypal/cancel.html
src/paypal/templates/paypal/error.html [deleted file]
src/paypal/templates/paypal/error_page.html [deleted file]
src/paypal/templates/paypal/form.html [deleted file]
src/paypal/templates/paypal/return.html [deleted file]
src/paypal/views.py
src/pdcounter/templates/pdcounter/author_detail.html [deleted file]
src/pdcounter/templates/pdcounter/book_stub_detail.html [deleted file]
src/pdcounter/templates/pdcounter/pd_author_box.html [deleted file]
src/pdcounter/views.py
src/picture/models.py
src/picture/templates/picture/collection.html [deleted file]
src/picture/templates/picture/picture_detail.html [deleted file]
src/picture/templates/picture/picture_list_thumb.html [deleted file]
src/picture/templates/picture/picture_searched.html [deleted file]
src/picture/templates/picture/picture_wide.html [deleted file]
src/picture/templates/picture/picturearea_short.html [deleted file]
src/picture/templatetags/picture_tags.py
src/picture/views.py
src/polls/templates/polls/poll.html
src/push/templates/push/notification_form.html
src/push/templates/push/notification_sent.html
src/search/context_processors.py [deleted file]
src/search/fields.py
src/search/forms.py
src/search/templates/newsearch/search.html [deleted file]
src/search/templatetags/__init__.py [deleted file]
src/search/templatetags/search_tags.py [deleted file]
src/search/templatetags/set_get_parameter.py [deleted file]
src/search/views.py
src/social/templates/social/carousel.html [deleted file]
src/social/templates/social/cite_info.html [deleted file]
src/social/templates/social/my_shelf.html [deleted file]
src/social/templates/social/sets_form.html [deleted file]
src/social/templatetags/social_tags.py
src/social/urls.py
src/social/views.py
src/stats/templates/stats/top.html
src/suggest/templates/publishing_suggest.html
src/suggest/templates/suggest.html
src/wolnelektury/settings/auth.py
src/wolnelektury/settings/basic.py
src/wolnelektury/static/2021/scripts/main.js
src/wolnelektury/static/2022/styles/components/_lang.scss
src/wolnelektury/static/2022/styles/components/_media.scss
src/wolnelektury/static/2022/styles/layout/_navigation.scss
src/wolnelektury/templates/404.html
src/wolnelektury/templates/account/base.html
src/wolnelektury/templates/auth/login.html [deleted file]
src/wolnelektury/templates/auth/login_register.html [deleted file]
src/wolnelektury/templates/auth/register.html [deleted file]
src/wolnelektury/templates/auth/register_form.html [deleted file]
src/wolnelektury/templates/bajki.html [deleted file]
src/wolnelektury/templates/base/app.html [deleted file]
src/wolnelektury/templates/base/base.html [deleted file]
src/wolnelektury/templates/base/superbase.html [deleted file]
src/wolnelektury/templates/forms/form_sent.html
src/wolnelektury/templates/forms/includes/built_form.html
src/wolnelektury/templates/main_menu.html [deleted file]
src/wolnelektury/templates/main_page.html [deleted file]
src/wolnelektury/templates/podcast.html [deleted file]
src/wolnelektury/templates/post_test.html [deleted file]
src/wolnelektury/templates/publish_plan.html
src/wolnelektury/templates/site_base.html
src/wolnelektury/templates/socialaccount/base.html
src/wolnelektury/templates/socialaccount/login_cancelled.html
src/wolnelektury/templates/socialaccount/signup.html
src/wolnelektury/templates/user.html
src/wolnelektury/urls.py
src/wolnelektury/views.py

index 8cc3004..d92b340 100644 (file)
@@ -9,21 +9,11 @@
     {% load honeypot %}
     {% render_honeypot_field %}
   {% endif %}
     {% load honeypot %}
     {% render_honeypot_field %}
   {% endif %}
-  {% if request.EXPERIMENTS.layout.value %}
-    {{ form.as_p }}
-    <p class="helptext">
-      {{ form.data_processing }}
-    </p>
-    <button>{{ submit }}</button>
-  {% else %}
-    <ol>
-      <div id="id_{% if form_prefix %}{{ form_prefix }}-{% endif %}__all__"></div>
-      {% block form_fields %}
-        {{ form.as_p }}
-      {% endblock %}
-      <li><input type="submit" value="{{ submit }}"/></li>
-  </ol>
-  {% endif %}
+  {{ form.as_p }}
+  <p class="helptext">
+    {{ form.data_processing }}
+  </p>
+  <button>{{ submit }}</button>
 </form>
 
 <div class="form-extra">
 </form>
 
 <div class="form-extra">
index 08f713d..de00a47 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 
 {% block titleextra %}{{ title }}{% endblock %}
 {% load i18n %}
 
 {% block titleextra %}{{ title }}{% endblock %}
diff --git a/src/ajaxable/templatetags/__init__.py b/src/ajaxable/templatetags/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/ajaxable/templatetags/ajaxable_tags.py b/src/ajaxable/templatetags/ajaxable_tags.py
deleted file mode 100644 (file)
index a9a308d..0000000
+++ /dev/null
@@ -1,47 +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 django.utils.encoding import force_str
-from django.utils.safestring import mark_safe
-from ajaxable.utils import placeholdized
-
-
-register = template.Library()
-
-
-@register.filter
-def placeholdize(form):
-    return placeholdized(form)
-
-
-@register.filter
-def placeholdized_ul(form):
-    return placeholdized(form).as_ul()
-
-
-@register.filter
-def pretty_field(field, template=None):
-    if template is None:
-        template = '''
-            <li>
-              <span class="error">%(errors)s</span>
-              <label class="nohide"><span class="label">%(label)s: </span>%(input)s</label>
-              <span class="helptext">%(helptext)s</span>
-            </li>'''
-    return mark_safe(template % {
-        'errors': field.errors,
-        'input': field,
-        'label': ('*' if field.field.required else '') + force_str(field.label),
-        'helptext': force_str(field.help_text),
-    })
-
-
-@register.filter
-def pretty_checkbox(field):
-    return pretty_field(field, template='''
-        <li class="checkbox">
-          <span class="error">%(errors)s</span>
-          <label class="nohide">%(input)s<span class="label"> %(label)s</span></label>
-          <span class="helptext">%(helptext)s</span>
-        </li>''')
index 7af79da..06688d0 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 {% load build_absolute_uri from fnp_common %}
 
 {% load i18n %}
 {% load build_absolute_uri from fnp_common %}
 
index 49dd098..70c5e49 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 
 {% block settings %}
 {% load i18n %}
 
 {% block settings %}
index 8510b2c..2c9a348 100644 (file)
@@ -62,11 +62,5 @@ class Collection(models.Model):
     def example3(self):
         return self.get_books()[:3]
 
     def example3(self):
         return self.get_books()[:3]
 
-    @cached_render('catalogue/collection_box.html')
-    def box(self):
-        return {
-            'collection': self
-        }
-
     def clear_cache(self):
         clear_cached_renders(self.box)
     def clear_cache(self):
         clear_cached_renders(self.box)
index 9ee48c9..fe9355a 100644 (file)
@@ -39,10 +39,6 @@ class Fragment(models.Model):
         """Returns short version of the fragment."""
         return self.short_text if self.short_text else self.text
 
         """Returns short version of the fragment."""
         return self.short_text if self.short_text else self.text
 
-    @cached_render('catalogue/fragment_short.html')
-    def midi_box(self):
-        return {'fragment': self}
-
     @cached_render('catalogue/fragment_promo.html')
     def promo_box(self):
         return {'fragment': self}
     @cached_render('catalogue/fragment_promo.html')
     def promo_box(self):
         return {'fragment': self}
@@ -52,5 +48,4 @@ class Fragment(models.Model):
         return self.tags.filter(category='theme')
 
     def clear_cache(self):
         return self.tags.filter(category='theme')
 
     def clear_cache(self):
-        clear_cached_renders(self.midi_box)
         clear_cached_renders(self.promo_box)
         clear_cached_renders(self.promo_box)
diff --git a/src/catalogue/templates/catalogue/book_detail.html b/src/catalogue/templates/catalogue/book_detail.html
deleted file mode 100644 (file)
index d2bfda7..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load catalogue_tags %}
-{% load build_absolute_uri from fnp_common %}
-{% load annoy_banner from annoy %}
-{% load cache %}
-
-{% block titleextra %}{{ book.pretty_title }}{% endblock %}
-{% block ogimage %}{% if book.cover %}{{ book.cover.url|build_absolute_uri:request }}{% endif %}{% endblock %}
-
-{% block metadescription %}{% book_title book %}. {{ block.super }}{% endblock %}
-
-{% block bodyid %}book-detail{% endblock %}
-
-
-{% block body %}
-  {% include 'catalogue/book_wide.html' %}
-
-  {% work_list book_children %}
-
-  {% spaceless %}
-    {% if book.other_versions %}
-      <section class="see-also">
-        <h1>{% trans "Other versions" %}:</h1>
-        {% for rel in book.other_versions %}
-         {{ rel.mini_box }}
-        {% endfor %}
-      </section>
-    {% endif %}
-
-    {% annoy_banner 'book-page' %}
-
-    <section class="see-also">
-      <h2>{% trans "See also" %}:</h2>
-      {% related_books book taken=book.other_versions|length %}
-    </section>
-  {% endspaceless %}
-
-  {% with book.related_themes as themes %}
-    {% if themes %}
-      <h2>{% trans "Themes" %}</h2>
-      {% plain_list themes book=book %}
-    {% endif %}
-  {% endwith %}
-
-
-  <h2>{% trans "Information about the work" %}</h2>
-  {% for author in book.authors %}
-    <div class="white-box">
-      <a style="display:block" href="{{ author.get_absolute_url }}">
-       {% cache 86400 catalogue_tag_box author.pk %}
-          {% include 'catalogue/tag_box.html' with tag=author %}
-       {% endcache %}
-      </a>
-    </div>
-  {% endfor %}
-
-
-  {% with extra_info=book.get_extra_info_json %}
-    {% for source_url in extra_info.source_urls %}
-      <div class="white-box">
-        <a href="{{ source_url }}">{% trans "Source" %}</a> {% trans "of the book" %}
-        {% trans "in" %} {% source_name source_url %}
-      </div>
-    {% empty %}
-      {% if extra_info.source_url %}
-        <div class="white-box">
-          <a href="{{ extra_info.source_url }}">{% trans "Source" %}</a> {% trans "of the book" %}
-          {% trans "in" %} {% source_name extra_info.source_url %}
-        </div>
-      {% endif %}
-    {% endfor %}
-  {% if book|status:user != 'closed' %}
-    <div class="white-box"><a href="{{ book.xml_url }}">{% trans "Source XML file" %}</a></div>
-  {% endif %}
-  {% if extra_info.about and not hide_about %}
-    <div class="white-box">
-      {% trans "Book on" %} <a href="{{ extra_info.about }}">{% trans "Editor's Platform" %}</a>
-    </div>
-  {% endif %}
-  {% if book.wiki_link %}
-    <div class="white-box">
-      <a href="{{ book.wiki_link }}">{% trans "Book description on Wikipedia" %}</a>
-    </div>
-  {% endif %}
-  <div class="white-box">
-    <a href="{% url 'poem_from_book' book.slug %}">{% trans "Mix this book" %}</a>
-  </div>
-{% endwith %}
-
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/book_fragments.html b/src/catalogue/templates/catalogue/book_fragments.html
deleted file mode 100644 (file)
index 4bcb30e..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load work_list from catalogue_tags %}
-{% load annoy_banner from annoy %}
-
-{% block titleextra %}{% trans "Theme" %} {{ theme }} {% trans "in work " %} {{ book }}{% endblock %}
-
-{% block bodyid %}tagged-object-list{% endblock %}
-
-{% block body %}
-  <div class="left-column">
-  <h1>{% trans "Theme" %}
-    <a href="{{ theme.get_absolute_url }}">{{ theme }}</a>
-    <br/>{% trans "in work " %}
-    <a href="{{ book.get_absolute_url }}">{{ book }}</a></h1>
-
-  {% annoy_banner 'book-fragment-list' %}
-
-  </div>
-
-  <div class="right-column">
-    {% work_list fragments %}
-  </div>
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/book_list.html b/src/catalogue/templates/catalogue/book_list.html
deleted file mode 100644 (file)
index 0107f5f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
-{% load i18n %}
-{% load catalogue_tags %}
-{% load chunk from chunks %}
-
-{% block bodyid %}book-a-list{% endblock %}
-
-{% block titleextra %}{% trans "Listing of all works" %}{% endblock %}
-
-{% block body %}
-  {% spaceless %}
-    <h1>{% block book_list_header %}{% trans "Listing of all works" %}{% endblock %}</h1>
-
-    <div class="left-column"><div class="normal-text" style="margin-bottom: 2em">
-      {% block book_list_info %}
-        {% chunk 'book-list' %}
-      {% endblock %}
-    </div></div>
-
-    <div style='clear:both;'></div>
-
-    <a name="top"></a>
-
-    <div id="book-list-nav">
-      <h2>{% trans "Table of Content" %}</h2>
-      <div id="book-list-nav-index">
-        {{ rendered_nav }}
-      </div>
-    </div>
-    <div id="book-list">
-      {% block book_list %}
-        {{ rendered_book_list }}
-      {% endblock %}
-    </div>
-    <a id="book-list-up" href="#top">{% trans "↑ top ↑" %}</a>
-  {% endspaceless %}
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/book_searched.html b/src/catalogue/templates/catalogue/book_searched.html
deleted file mode 100644 (file)
index e257467..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-{% extends "catalogue/book_short.html" %}
-{% load inline_tag_list from catalogue_tags %}
-
-{% block right-column %}
-  <div class="book-right-column">
-    <div class="snippets">
-      {% for hit in hits %}
-        {% if hit.snippet %}
-          <div class="snippet-text">
-            <a href="{% url 'book_text' book.slug %}#sec{{hit.section_number}}">{{hit.snippet|safe}}</a>
-          </div>
-        {% elif hit.fragment %}
-          <div class="snippet-text">
-            {% if hit.themes_hit %}
-              {% inline_tag_list hit.themes_hit  %}
-            {% endif %}
-            <a href="{{hit.fragment.get_absolute_url}}">
-              {% if hit.snippet %}
-                {{hit.snippet|safe}}
-              {% else %}
-                {{hit.fragment.text|truncatewords_html:15|safe}}
-              {% endif %}
-            </a>
-          </div>
-        {% endif %}
-      {% endfor %}
-    </div>
-    {% include 'catalogue/snippets/jplayer.html' %}
-  </div>
-{% endblock %}
index 9c2e6a0..133ed0c 100644 (file)
   <div class="{% block box-class %}book-box{% if audiobooks %} audiobook-box{% endif %}{% endblock %}">
     <div class="book-box-inner">
 
   <div class="{% block box-class %}book-box{% if audiobooks %} audiobook-box{% endif %}{% endblock %}">
     <div class="book-box-inner">
 
-    {% block book-box-pre %}
-      {% include "catalogue/snippets/like_button.html" %}
-    {% endblock %}
-
     {% with book.tags_by_category as tags %}
     <div class="book-left-column">
       <div class="book-box-body">
     {% with book.tags_by_category as tags %}
     <div class="book-left-column">
       <div class="book-box-body">
     </div>
     {% endwith %}
 
     </div>
     {% endwith %}
 
-    {% block right-column %}
-      {% if audiobooks %}{% if book|status:request.user != 'closed' %}
-        <div class="book-right-column">
-          {% include 'catalogue/snippets/jplayer.html' %}
-        </div>
-      {% endif %}{% endif %}
-    {% endblock %}
     {% if book.abstract %}
       <div class="abstract more-expand">
         {{ book.abstract|safe }}
     {% if book.abstract %}
       <div class="abstract more-expand">
         {{ book.abstract|safe }}
diff --git a/src/catalogue/templates/catalogue/book_wide.html b/src/catalogue/templates/catalogue/book_wide.html
deleted file mode 100644 (file)
index 9413ee7..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-{% extends "catalogue/book_short.html" %}
-{% load i18n %}
-{% load choose_fragment license_icon from catalogue_tags %}
-{% load choose_cite from social_tags %}
-{% load status from catalogue_tags %}
-{% load chunks %}
-
-
-{% block box-class %}book-wide-box{% endblock %}
-
-
-{% block cover-link %}{% if book.get_first_text %}{% url 'book_text' book.get_first_text.slug %}{% endif %}{% endblock %}
-
-
-{% block cover-area-extra %}
-  {% with license=book.get_extra_info_json.license %}
-    {% if license %}
-      {% license_icon license %}
-    {% endif %}
-  {% endwith %}
-{% endblock %}
-
-
-{% block preview-info %}
-  <p class="book-box-tools book-box-tools-warn">
-    {% chunk "book-preview-warn" %}
-  </p>
-{% endblock %}
-
-
-
-{% block right-column %}
-  <div class="right-column">
-    <div class="quote">
-      {% choose_cite book as cite_promo %}
-      {% if cite_promo %}
-        {{ cite.promo_box }}
-      {% else %}
-        {% choose_fragment book as fragment_promo %}
-       {% if fragment_promo %}
-         {{ fragment_promo.promo_box }}
-       {% endif %}
-      {% endif %}
-    </div>
-    {% include 'catalogue/snippets/jplayer.html' %}
-
-    {% if book|status:request.user == 'closed' %}
-      {% with form=club_form %}
-        <form method="POST" action="{% url 'club_join' %}" id="payment-form" class="wlform">
-          {% csrf_token %}
-          {% include "club/payment_form.html" %}
-          {% chunk 'club_form_bottom' %}
-        </form>
-      {% endwith %}
-
-      {% include "club/payment_info.html" %}
-    {% endif %}
-
-
-  </div>
-{% endblock %}
-
-
-{% block book-box-body-pre %}
-  {% include "catalogue/snippets/like_button.html" %}
-{% endblock %}
-
-{% block book-box-pre %}
-{% endblock %}
index 4494eff..b0102d8 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout|yesno:"2022/base.html,base/base.html" %}
+{% extends "2022/base.html" %}
 {% load i18n %}
 {% load catalogue_tags reporting_stats %}
 
 {% load i18n %}
 {% load catalogue_tags reporting_stats %}
 
diff --git a/src/catalogue/templates/catalogue/collection.html b/src/catalogue/templates/catalogue/collection.html
deleted file mode 100644 (file)
index 7a08ab6..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load catalogue_tags %}
-
-{% block titleextra %}{{ collection.title }}{% endblock %}
-
-{% block bodyid %}collection{% endblock %}
-
-{% block body %}
-  <h1>{{ collection.title }}</h1>
-
-  {{ collection.description|safe }}
-
-  {% plain_list collection.get_books by_author=True %}
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/collection_box.html b/src/catalogue/templates/catalogue/collection_box.html
deleted file mode 100644 (file)
index ec79ca6..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{% spaceless %}
-  {% load i18n %}
-  {% load thumbnail %}
-  <div class="collection-box white-box">
-    <h2><a href="{{ collection.get_absolute_url }}">{{ collection }}</a></h2>
-    <div class="description">
-    {% if collection.description %}
-      {{ collection.description|safe|truncatewords_html:40 }}
-    {% endif %}
-    </div>
-    <div class="covers">
-      {% for book in collection.get_books|slice:":6" %}
-        <a href="{{ book.get_absolute_url }}">
-          <img src="{% thumbnail book.cover_clean '139x193' as th %}{{ th.url }}{% endthumbnail %}" alt="{{ book.pretty_title }}" title="{{ book.pretty_title }}">
-        </a>
-      {% endfor %}
-    </div>
-  </div>
-{% endspaceless %}
diff --git a/src/catalogue/templates/catalogue/collections.html b/src/catalogue/templates/catalogue/collections.html
deleted file mode 100644 (file)
index 1d7b0f7..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load catalogue_tags %}
-
-{% block titleextra %}{% trans "Collections" %}{% endblock %}
-
-{% block bodyid %}collections{% endblock %}
-
-{% block body %}
-  <h1>{% trans "Collections" %}</h1>
-
-  {% for obj in best %}
-    {{ obj.box }}
-  {% endfor %}
-
-  <h2>{% trans "All collections" %}</h2>
-  {% plain_list objects %}
-{% endblock %}
index cfebdf3..46b2e85 100644 (file)
@@ -1,25 +1,11 @@
 {% load i18n %}
 {% load honeypot %}
 {% load i18n %}
 {% load honeypot %}
-{% load ajaxable_tags %}
 
 <h1>{% trans "Download custom PDF" %}</h1>
 
 <form id='custom-pdf-form' action="" method="post" accept-charset="utf-8" class="cuteform">
   {% csrf_token %}
   {% render_honeypot_field %}
 
 <h1>{% trans "Download custom PDF" %}</h1>
 
 <form id='custom-pdf-form' action="" method="post" accept-charset="utf-8" class="cuteform">
   {% csrf_token %}
   {% render_honeypot_field %}
-  {% if request.EXPERIMENTS.layout.value %}
-    {{ form.as_p }}
-    <button type="submit">{% trans "Download" %}</button>
-  {% else %}
-  <ol>
-    {{ form.nofootnotes|pretty_checkbox }}
-    {{ form.nothemes|pretty_checkbox }}
-    {{ form.nowlfont|pretty_checkbox }}
-    {{ form.nocover|pretty_checkbox }}
-    {{ form.leading|pretty_field }}
-    {{ form.fontsize|pretty_field }}
-
-    <li><input type="submit" value="{% trans "Download" %}"/></li>
-  </ol>
-  {% endif %}
+  {{ form.as_p }}
+  <button type="submit">{% trans "Download" %}</button>
 </form>
 </form>
diff --git a/src/catalogue/templates/catalogue/daisy_list.html b/src/catalogue/templates/catalogue/daisy_list.html
deleted file mode 100644 (file)
index 0ef6878..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{% extends "catalogue/book_list.html" %}
-{% load i18n %}
-{% load chunk from chunks %}
-
-{% block bodyid %}book-a-list{% endblock %}
-
-{% block titleextra %}{% trans "Listing of all DAISY files" %}{% endblock %}
-
-{% block extrahead %}
-  <link rel="alternate" type="application/atom+xml"
-        title="{% trans "Latest DAISY audiobooks" %}"
-        href="{% url 'audiobook_feed' 'daisy' %}" />
-{% endblock %}
-
-{% block book_list_header %}{% trans "Listing of all DAISY files" %}{% endblock %}
-
-{% block book_list_info %}
-  {% chunk 'daisy-list' %}
-{% endblock %}
index 05709dd..494674b 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 {% load catalogue_tags %}
 
 {% load i18n %}
 {% load catalogue_tags %}
 
diff --git a/src/catalogue/templates/catalogue/fragment_short.html b/src/catalogue/templates/catalogue/fragment_short.html
deleted file mode 100644 (file)
index 935a1a5..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-{% load i18n %}
-{% load book_title_html from catalogue_tags %} 
-
-<div class="cite {% if fragment.short_text %}fragment-with-short{% endif %}">
-  {% if fragment.short_text %}
-    <div class="fragment-short-text">
-      <blockquote class="cite-body">
-        <a href="{{ fragment.get_absolute_url }}" class="fragment">
-          {{ fragment.short_text|safe }}
-        </a>
-      </blockquote>
-      <a href="#" class="toggle mono">↓ {% trans "Expand fragment" %} ↓</a>
-    </div>
-  {% endif %}
-  <div class="fragment-long-text" {% if fragment.short_text %}style="display:none;"{% endif %}>
-    <blockquote class="cite-body fragment-text">
-      <a href="{{ fragment.get_absolute_url }}" class="fragment">
-        {{ fragment.text|safe }}
-      </a>
-    </blockquote>
-    {% if fragment.short_text %}
-      <a href="#" class="toggle mono">↑ {% trans "Hide fragment" %} ↑</a>
-    {% endif %}
-  </div>
-  <p class="mono source">{% book_title_html fragment.book %}</p>
-</div>
diff --git a/src/catalogue/templates/catalogue/picture_detail.html b/src/catalogue/templates/catalogue/picture_detail.html
deleted file mode 100644 (file)
index 9cb0b19..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load catalogue_tags pagination_tags %}
-{% load thumbnail %}
-
-
-{% block titleextra %}{{ picture.title }}{% endblock %}
-
-{% block bodyid %}picture-detail{% endblock %}
-
-{% block body %}
-  <h1>{{picture.title}}</h1>
-
-  <div id="books-list">
-    <div id='breadcrumbs'>
-      {% if categories.author %}
-        {% for tag in categories.author %}
-          <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
-        {% endfor %}
-        &#187;
-      {% endif %}
-    </div>
-
-    {% thumbnail picture.image_file "400x500" upscale="false" as im %}
-      <img style="margin:{{ im|margin:"500x500" }}" src="{{ im.url }}" width="{{ im.x }}" height="{{ im.y }}"/>
-    {% endthumbnail %}
-
-    {% if picture.info.license %}
-      <p>{% trans "Work is licensed under " %} <a href="{{ picture.info.license }}">{{ picture.info.license_description }}</a>.</p>
-    {% endif %}
-    <p>{% trans "Based on" %}: {{ picture.info.source_name }}</p>
-    {% if picture.info.description %}
-      <div id="description">
-        <div id='description-long'>{{ picture.info.description|safe }}</div>
-        {# <div id='description-short'>{{ picture.info.description|safe|truncatewords_html:30 }}</div> #}
-      </div>
-      <div id="toggle-description"><p></p></div>
-    {% endif %}
-  </div>
-
-  <div id="tags-list">
-    <div id="book-info">
-      <h2>{% trans "Details" %}</h2>
-      <ul>
-        <li>
-          {% trans "Author" %}:
-          {% for tag in categories.author %}
-            <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
-          {% endfor %}
-        </li>
-        <li>
-          {% trans "Epoch" %}:
-          {% for tag in categories.epoch %}
-            <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
-          {% endfor %}
-        </li>
-        <li>
-          {% trans "Kind" %}:
-          {% for tag in categories.kind %}
-            <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
-          {% endfor %}
-        </li>
-      </ul>
-      <h2>{% trans "Other resources" %}</h2>
-      <ul>
-        {% if picture.info.source_url %}
-          <li><a href="{{ picture.info.source_url }}">{% trans "Source of the image" %}</a></li>
-        {% endif %}
-        {% if picture.info.about and not hide_about %}
-          <li><a href="{{ picture.info.about }}">{% trans "Image on the Editor's Platform" %}</a></li>
-        {% endif %}
-      </ul>
-      <p><a href="{{ picture.xml_file.url }}">{% trans "View XML source" %}</a></p>
-    </div>
-    <div id="themes-list">
-      <h2>{% trans "Work's themes " %}</h2>
-      <ul>
-        {% for theme in picture_themes %}
-          <li><a href="{{ theme.get_absolute_url }}">{{ theme }} ({{ theme.count }})</a></li>
-        {% endfor %}
-      </ul>
-    </div>
-    <div class="clearboth"></div>
-  </div>
-{% endblock %}
-
-
-{% block extrabody %}
-  {% javascript "picture" %}
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/picture_list.html b/src/catalogue/templates/catalogue/picture_list.html
deleted file mode 100644 (file)
index 60f2eb0..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{% extends "catalogue/book_list.html" %}
-{% load i18n %}
-{% load catalogue_tags chunks %}
-{% load thumbnail %}
-
-{% block bodyid %}picture-list{% endblock %}
-
-{% block titleextra %}{% trans "Listing of all works" %}{% endblock %}
-
-{% block picture_list_header %}{% trans "Listing of all works" %}{% endblock %}
-
-
-{% block book_list %}
-  {% for author, group in pictures_by_author.items %}
-    <a name="{{ author.slug }}"></a>
-    <div class="group">
-      <h2><a href="{{ author.get_absolute_url }}">{{ author }}</a></h2>
-      {% for picture in group %}
-        <div class="picture">
-          {% thumbnail picture.image_file "300x300" as im %}
-            <img style="float: left; margin:{{ im|margin:"300x300" }}" src="{{ im.url }}" width="{{ im.x }}" height="{{ im.y }}" />
-          {% endthumbnail %}
-          <span class="title"><a href="{{picture.get_absolute_url}}">{{picture.title}}</a></span>
-          <br class="clearboth"/>
-        </div>
-      {% endfor %}
-    </div>
-  {% endfor %}
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/player.html b/src/catalogue/templates/catalogue/player.html
deleted file mode 100644 (file)
index 7c3e0b9..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE html>
-<html>
-  {% load static from static %}
-  {% load i18n pipeline %}
-  {% load catalogue_tags %}
-  {% load thumbnail %}
-  {% load piwik_tags %}
-  <head>
-    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
-    <meta name="description"
-        content="{{ book.title }} - darmowy audiobook na wolnej licencji" />
-    <title>{% trans "Wolne Lektury" %} ::
-        {{ book.title }} - {{ audiobook }}</title>
-    <link rel="icon" href="{% static "img/favicon.png" %}" type="image/png" />
-    {% stylesheet 'main' %}
-    {% stylesheet "player" %}
-    {% tracking_code %}
-  </head>
-  <body id="{% block bodyid %}player{% endblock %}">
-    {% if book.cover_thumb %}
-      <img src="{% thumbnail book.cover_thumb "101x140" as thumb %}{{ thumb.url }}{% empty %}{{ book.cover_thumb.url }}{% endthumbnail %}"
-           alt="Cover" style="float: left; margin: .5em 1em 1em 1em;" />
-    {% endif %}
-
-
-  <h1>{% book_title book %}</h1>
-
-  <div class="player-info normal-text">
-    <p><a target="_blank" href="{{ book.get_absolute_url }}">{% trans "Book's page" %}</a>.</p>
-    <p>{% trans "Download as" %} {% download_audio book False %}.</p>
-
-    {% if book.has_daisy_file %}
-      <p>DAISY:</p>
-      <ul class="daisy-list">
-      {% for media in book.get_daisy %}
-          <li><a href="{{ media.file.url }}">{{ media.name }}</a></li>
-      {% endfor %}
-      </ul>
-    {% endif %}
-  </div>
-
-  <div style="clear: both"></div>
-    {% include "catalogue/snippets/jplayer.html" %}
-
-    {% if projects|length > 1 %}
-      <p>{% trans "Audiobooks were prepared as a part of the projects:" %}</p>
-      <ul>
-        {% for cs, fb in projects %}
-          <li>
-            {% if fb %}
-              {% blocktrans %}{{ cs }}, funded by {{ fb }}{% endblocktrans %}
-            {% else %}
-              {{ cs }}
-            {% endif %}
-          </li>
-        {% endfor %}
-      </ul>
-    {% else %}
-      <p>
-        {% with cs=projects.0.0 fb=projects.0.1 %}
-          {% if fb %}
-            {% blocktrans %}Audiobooks were prepared as a part of the <em>{{ cs }}</em> project funded by {{ fb }}.{% endblocktrans %}
-          {% else %}
-            {% blocktrans %}Audiobooks were prepared as a part of the <em>{{ cs }}</em> project.{% endblocktrans %}
-          {% endif %}
-        {% endwith %}
-      </p>
-    {% endif %}
-
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js" integrity="sha512-BkBgWiL0N/EFIbLZYGTgbksKG5bS6PtwnWvVk3gccv+KhtK/4wkLxCRGh+kelKiXx7Ey4jfTabLg3AEIPC7ENA==" crossorigin="anonymous"></script>
-    {% javascript "player" %}
-
-  </body>
-</html>
diff --git a/src/catalogue/templates/catalogue/snippets/jplayer.html b/src/catalogue/templates/catalogue/snippets/jplayer.html
deleted file mode 100644 (file)
index 647f42d..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-{% load i18n catalogue_tags %}
-{% if audiobooks %}{% if book|status:request.user != 'closed' %}
-  <div class="jp-type-playlist" data-book-id="{{ book.pk }}" data-book-slug="{{ book.slug }}">
-    <div id="jplayer" class="jp-jplayer" data-player="jp_container_{{ book.pk }}"
-         data-supplied="oga,mp3"></div>
-    <div id="jp_container_{{ book.pk }}" class="jp-audio">
-      <div class="jp-type-single">
-        <span class="title"></span>
-        <div class="jp-gui jp-interface">
-          <ul class="jp-controls">
-            <li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
-            <li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
-            <li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
-            <li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
-          </ul>
-          <div class="jp-progress">
-            <div class="jp-seek-bar">
-              <div class="jp-play-bar"></div>
-            </div>
-          </div>
-          <div class="jp-volume-bar">
-            <div class="jp-volume-bar-value"></div>
-          </div>
-          <div class="jp-time-holder">
-            <div class="jp-current-time"></div>
-            <div class="jp-duration"></div>
-          </div>
-        </div>
-        <div class="jp-playlist">
-          <ul>
-            {% for i in audiobooks %}
-              <li data-mp3='{{ i.mp3.file.url }}' data-ogg='{{ i.ogg.file.url }}' data-media-id="{{ i.mp3.id }}">
-                <div class='play'>{{ i.mp3.name }}
-                  <div class='extra-info'>
-                  {% with extra_info=i.mp3.get_extra_info_json %}
-                    {% trans "Artist:" %}&nbsp;<span class='artist'>{{ extra_info.artist_name }}</span>,
-                    {% trans "director:" %}&nbsp;<span class='director'>{{ extra_info.director_name }}</span>
-                    {% if extra_info.license %}{% license_icon extra_info.license %}{% endif %}
-                    {% if i.mp3.project_icon %}<img class="project-icon" src="{{ i.mp3.project_icon }}">{% endif %}
-                    <p>
-                     {% if i.mp3.project_description %}{{ i.mp3.project_description }}{% else %}
-                      {% with fb=extra_info.funded_by %}
-                        {% if fb %}Dofinansowano ze środków: {{ fb }}.{% endif %}
-                      {% endwith %}
-                    {% endif %}
-                    </p>
-                 {% endwith %}
-                  </div>
-                </div>
-              </li>
-            {% endfor %}
-          </ul>
-        </div>
-
-        <div class="jp-no-solution">
-          <span>Update Required</span>
-          To play the media you will need to either update your browser to a recent version or update your
-          <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
-        </div>
-      </div>
-    </div>
-    <div>
-      {% if audiobooks|length > 1 %}
-        <a class="play-prev">« {% trans "previous" %}</a>
-        {% trans "Part" %} <span class="number">1</span> / {{ audiobooks|length }}
-        <a class="play-next">{% trans "next" %} »</a>
-      {% endif %}
-    </div>
-  </div>
-{% endif %}{% endif %}
diff --git a/src/catalogue/templates/catalogue/snippets/like_button.html b/src/catalogue/templates/catalogue/snippets/like_button.html
deleted file mode 100644 (file)
index 298f34e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{% load likes_book from social_tags %}
-{% likes_book book as likes %}
-<div class="star {% if not likes %}un{% endif %}like">
-  <div class="if-like" >
-    <a id="social-book-sets-{{ book.slug }}" data-callback='social-book-sets'
-       class='ajaxable' href='{% url "social_book_sets" book.slug %}'>★</a>
-  </div>
-  <div class="if-unlike">
-    <form id="social-like-book-{{ book.slug }}"
-          data-callback='social-like-book' method='post'
-          class='ajax-form' action='{% url "social_like_book" book.slug %}'>
-      {% csrf_token %}
-      <button type='submit'>☆</button>
-    </form>
-  </div>
-</div>
diff --git a/src/catalogue/templates/catalogue/tag_catalogue.html b/src/catalogue/templates/catalogue/tag_catalogue.html
deleted file mode 100644 (file)
index 4c6a99f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load cache %}
-{% load plain_list from catalogue_tags %}
-
-{% block titleextra %}{{ title }}{% endblock %}
-
-{% block bodyid %}tag-catalogue{% endblock %}
-
-{% block body %}
-  <h1>{{ title|title }} {% trans "on Wolne Lektury" %}</h1>
-
-  {% for tag in best %}
-    <a class="tag-box" href="{{ tag.get_absolute_url }}">
-      {% cache 86400 catalogue_tag_box tag.pk %}
-        {% include 'catalogue/tag_box.html' %}
-      {% endcache %}
-    </a>
-  {% endfor %}
-
-  <h2>{{ whole_category }}</h2>
-
-  {% plain_list tags %}
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/tagged_object_list.html b/src/catalogue/templates/catalogue/tagged_object_list.html
deleted file mode 100644 (file)
index 22554d6..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load catalogue_tags social_tags %}
-
-{% block titleextra %}{% if tags %}{% title_from_tags tags %}{% elif list_type == 'gallery' %}{% trans "Art" %}{% elif list_type == 'audiobooks' %}{% trans "Audiobooks" %}{% else %}{% trans "Literature" %}{% endif %}{% endblock %}
-
-
-{% block bodyid %}tagged-object-list{% endblock %}
-
-{% block body %}
-  <div class="tabbed-filter">
-    <h1>{% if tags %}{% html_title_from_tags tags %}{% endif %}</h1>
-
-    <div class="tabs">
-      <a class="tab white-box" data-id="authors">{% trans "Authors" %}</a>
-      <a class="tab white-box" data-id="epochs">{% trans "Epochs" %}</a>
-      <a class="tab white-box" data-id="genres">{% trans "Genres" %}</a>
-      <a class="tab white-box" data-id="kinds">{% trans "Kinds" %}</a>
-      {% if theme_is_set %}
-        <a class="tab white-box" data-id="themes">{% trans "Themes" %}</a>
-      {% endif %}
-    </div>
-  </div>
-
-  <div class="tabbed-filter-contents">
-    <div id="authors" class="white-box normal-text tab-content">
-      {% inline_tag_list categories.author tags 'author' list_type=list_type %}
-    </div>
-    <div id="epochs" class="white-box normal-text tab-content">
-      {% inline_tag_list categories.epoch tags 'epoch' list_type=list_type %}
-    </div>
-    <div id="genres" class="white-box normal-text tab-content">
-      {% inline_tag_list categories.genre tags 'genre' list_type=list_type %}
-    </div>
-    <div id="kinds" class="white-box normal-text tab-content">
-      {% inline_tag_list categories.kind tags 'kind' list_type=list_type %}
-    </div>
-    {% if theme_is_set %}
-      <div id="themes" class="white-box normal-text tab-content">
-        {% inline_tag_list categories.theme tags 'theme' list_type=list_type %}
-      </div>
-    {% endif %}
-  </div>
-
-  {% if theme_is_set %}
-    {% work_list object_list %}
-  {% else %}
-    <div id="books-list">
-      {% if object_list %}
-        {% work_list best %}
-        {% if tags %}
-          <h2>{% trans "All matching works" %}</h2>
-        {% else %}
-          {% if list_type == 'audiobooks' %}
-            <h2>{% trans "Listing of all audiobooks" %}</h2>
-          {% else %}
-            <h2>{% trans "All works" %}</h2>
-          {% endif %}
-        {% endif %}
-        {% plain_list object_list by_author=True list_type=list_type %}
-        {% if daisy %}
-          <h2>{% trans "DAISY files" %}</h2>
-          {% plain_list daisy by_author=True %}
-        {% endif %}
-      {% else %}
-        {% trans "Sorry! Search cirteria did not match any resources." %}
-        {% include "info/join_us.html" %}
-      {% endif %}
-    </div>
-
-    {% if categories.theme and list_type != 'audiobooks' %}
-      <h2>{% trans "Motifs and themes" %}</h2>
-      {% plain_list categories.theme choice=tags list_type=list_type %}
-    {% endif %}
-  {% endif %}
-
-  {% for tag in tags %}
-    {% if tag.category != 'set' %}
-      <h2>{% trans tag.category as c %}{{ c|capfirst }}: {{ tag }}</h2>
-      <div class="white-box">
-        {% if tag.has_description %}
-          {{ tag.description|safe }}
-        {% else %}
-          <em>{% trans "No description." %}</em>
-        {% endif %}
-      </div>
-
-      {% if tag.wiki_link %}
-        <div class="white-box">
-        <a href="{{ tag.wiki_link }}">
-          {{ tag }} {% trans "in Wikipedia" %}
-        </a></div>
-      {% endif %}
-      {% if tag.culturepl_link %}
-        <div class="white-box">
-        <a href="{{ tag.culturepl_link }}">
-          {{ tag }} {% trans "in Culture.pl" %}
-        </a></div>
-      {% endif %}
-    {% endif %}
-  {% endfor %}
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/work-list.html b/src/catalogue/templates/catalogue/work-list.html
deleted file mode 100644 (file)
index 58e28c7..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-{% spaceless %}
-
-  {% load cache %}
-  {% load pagination_tags %}
-  {% load class_name from catalogue_tags %}
-  {% load status from catalogue_tags %}
-
-  {% autopaginate object_list 10 %}
-
-  <ol class='work-list'>
-    {% for item in object_list %}
-      <li class='{{ item|class_name }}-item'>
-        {% if item|class_name == 'Book' %}
-          {% include "catalogue/book_short.html" with book=item %}
-        {% else %}
-         {{ item.midi_box }}
-        {% endif %}
-      </li>
-    {% endfor %}
-  </ol>
-
-  {% paginate %}
-
-{% endspaceless %}
index 67ba553..dd0d402 100644 (file)
@@ -340,12 +340,6 @@ def book_info(book):
     }
 
 
     }
 
 
-@register.inclusion_tag('catalogue/work-list.html', takes_context=True)
-def work_list(context, object_list):
-    request = context.get('request')
-    return {'object_list': object_list, 'request': request}
-
-
 @register.inclusion_tag('catalogue/plain_list.html', takes_context=True)
 def plain_list(context, object_list, with_initials=True, by_author=False, choice=None, book=None, list_type='books',
                paged=True, initial_blocks=False):
 @register.inclusion_tag('catalogue/plain_list.html', takes_context=True)
 def plain_list(context, object_list, with_initials=True, by_author=False, choice=None, book=None, list_type='books',
                paged=True, initial_blocks=False):
@@ -481,11 +475,6 @@ def license_locative(license_url, default):
     return LICENSES.get(license_url, {}).get('locative', default)
 
 
     return LICENSES.get(license_url, {}).get('locative', default)
 
 
-@register.filter
-def class_name(obj):
-    return obj.__class__.__name__
-
-
 @register.simple_tag
 def source_name(url):
     url = url.lstrip()
 @register.simple_tag
 def source_name(url):
     url = url.lstrip()
index 7049b1c..0a8df78 100644 (file)
@@ -30,12 +30,12 @@ urlpatterns = [
     path('rodzaj/', views.tag_catalogue, {'category': 'kind'}, name='kind_catalogue'),
     path('motyw/', views.tag_catalogue, {'category': 'theme'}, name='theme_catalogue'),
 
     path('rodzaj/', views.tag_catalogue, {'category': 'kind'}, name='kind_catalogue'),
     path('motyw/', views.tag_catalogue, {'category': 'theme'}, name='theme_catalogue'),
 
-    path('galeria/', views.gallery, name='gallery'),
+    path('galeria/', views.GalleryView.as_view(), name='gallery'),
     path('kolekcje/', views.collections, name='catalogue_collections'),
 
     path('kolekcje/', views.collections, name='catalogue_collections'),
 
-    path('lektury/', views.literature, name='book_list'),
+    path('lektury/', views.LiteratureView.as_view(), name='book_list'),
     path('lektury/<slug:slug>/', views.collection, name='collection'),
     path('lektury/<slug:slug>/', views.collection, name='collection'),
-    path('audiobooki/', views.audiobooks, name='audiobook_list'),
+    path('audiobooki/', views.AudiobooksView.as_view(), name='audiobook_list'),
     path('daisy/', views.daisy_list, name='daisy_list'),
     path('jtags/', search.views.hint, {'param': 'q', 'mozhint': True}, name='jhint'),
     path('nowe/', ListView.as_view(
     path('daisy/', views.daisy_list, name='daisy_list'),
     path('jtags/', search.views.hint, {'param': 'q', 'mozhint': True}, name='jhint'),
     path('nowe/', ListView.as_view(
@@ -63,7 +63,6 @@ urlpatterns = [
 
     # Public interface. Do not change this URLs.
     path('lektura/<slug:slug>.html', views.book_text, name='book_text'),
 
     # Public interface. Do not change this URLs.
     path('lektura/<slug:slug>.html', views.book_text, name='book_text'),
-    path('lektura/<slug:slug>/audiobook/', views.player, name='book_player'),
     path('lektura/<slug:slug>/', views.book_detail, name='book_detail'),
     path('lektura/<slug:slug>/motyw/<slug:theme_slug>/',
          views.book_fragments, name='book_fragments'),
     path('lektura/<slug:slug>/', views.book_detail, name='book_detail'),
     path('lektura/<slug:slug>/motyw/<slug:theme_slug>/',
          views.book_fragments, name='book_fragments'),
index d93ae35..817b3ad 100644 (file)
@@ -19,7 +19,7 @@ from django.views.decorators.cache import never_cache
 from django.views.generic import TemplateView
 
 from ajaxable.utils import AjaxableFormView
 from django.views.generic import TemplateView
 
 from ajaxable.utils import AjaxableFormView
-from club.forms import ScheduleForm, DonationStep1Form
+from club.forms import DonationStep1Form
 from club.models import Club
 from annoy.models import DynamicTextInsert
 from pdcounter import views as pdcounter_views
 from club.models import Club
 from annoy.models import DynamicTextInsert
 from pdcounter import views as pdcounter_views
@@ -45,37 +45,13 @@ def catalogue(request):
     })
 
 
     })
 
 
-def book_list(request, filters=None, template_name='catalogue/book_list.html',
-              nav_template_name='catalogue/snippets/book_list_nav.html',
-              list_template_name='catalogue/snippets/book_list.html'):
-    """ generates a listing of all books, optionally filtered """
-    books_by_author, orphans, books_by_parent = Book.book_list(filters)
-    books_nav = OrderedDict()
-    for tag in books_by_author:
-        if books_by_author[tag]:
-            books_nav.setdefault(tag.sort_key[0], []).append(tag)
-    return render(request, template_name, {
-        'rendered_nav': render_to_string(nav_template_name, {'books_nav': books_nav}),
-        'rendered_book_list': render_to_string(list_template_name, {
-            'books_by_author': books_by_author,
-            'orphans': orphans,
-            'books_by_parent': books_by_parent,
-        })
-    })
-
-
 def daisy_list(request):
 def daisy_list(request):
-    if request.EXPERIMENTS['layout'].value:
-        return object_list(request, Book.objects.filter(media__type='daisy'))
-    return book_list(request, Q(media__type='daisy'), template_name='catalogue/daisy_list.html')
+    return object_list(request, Book.objects.filter(media__type='daisy'))
 
 
 def collection(request, slug):
     coll = get_object_or_404(Collection, slug=slug)
 
 
 def collection(request, slug):
     coll = get_object_or_404(Collection, slug=slug)
-    if request.EXPERIMENTS['layout'].value:
-        template_name = 'catalogue/2022/collection.html'
-    else:
-        template_name = 'catalogue/collection.html'
+    template_name = 'catalogue/2022/collection.html'
     return render(request, template_name, {
         'collection': coll,
         'active_menu_item': 'collections',
     return render(request, template_name, {
         'collection': coll,
         'active_menu_item': 'collections',
@@ -403,43 +379,18 @@ def object_list(request, objects, fragments=None, related_tags=None, tags=None,
     if extra:
         result.update(extra)
 
     if extra:
         result.update(extra)
 
-    if request.EXPERIMENTS['layout'].value:
-        has_theme = any(((theme := x).category == 'theme' for x in tags))
-        if has_theme:
-            result['main_tag'] = theme
-            template = 'catalogue/2022/theme_detail.html'
-        else:
-            template = 'catalogue/2022/author_detail.html'
+    has_theme = any(((theme := x).category == 'theme' for x in tags))
+    if has_theme:
+        result['main_tag'] = theme
+        template = 'catalogue/2022/theme_detail.html'
     else:
     else:
-        template = 'catalogue/tagged_object_list.html'
+        template = 'catalogue/2022/author_detail.html'
         
     return render(
         request, template, result,
     )
 
 
         
     return render(
         request, template, result,
     )
 
 
-def literature(request):
-    if request.EXPERIMENTS['layout'].value:
-        return LiteratureView.as_view()(request)
-    books = Book.objects.filter(parent=None, findable=True)
-    return object_list(request, books, related_tags=get_top_level_related_tags([]))
-
-
-def gallery(request):
-    if request.EXPERIMENTS['layout'].value:
-        return GalleryView.as_view()(request)
-    return object_list(request, Picture.objects.all(), list_type='gallery')
-
-
-def audiobooks(request):
-    if request.EXPERIMENTS['layout'].value:
-        return AudiobooksView.as_view()(request)
-    audiobooks = Book.objects.filter(findable=True, media__type__in=('mp3', 'ogg')).distinct()
-    return object_list(request, audiobooks, list_type='audiobooks', extra={
-        'daisy': Book.objects.filter(findable=True, media__type='daisy').distinct(),
-    })
-
-
 class ResponseInstead(Exception):
     def __init__(self, response):
         super(ResponseInstead, self).__init__()
 class ResponseInstead(Exception):
     def __init__(self, response):
         super(ResponseInstead, self).__init__()
@@ -500,7 +451,7 @@ def theme_list(request, tags, list_type):
 
 
 def tagged_object_list(request, tags, list_type):
 
 
 def tagged_object_list(request, tags, list_type):
-    if request.EXPERIMENTS['layout'].value and list_type in ('books', 'audiobooks'):
+    if list_type in ('books', 'audiobooks'):
         return TaggedObjectList.as_view()(request, tags=tags)
 
     try:
         return TaggedObjectList.as_view()(request, tags=tags)
 
     try:
@@ -550,11 +501,7 @@ def book_fragments(request, slug, theme_slug):
     fragments = Fragment.tagged.with_all([theme]).filter(
         Q(book=book) | Q(book__ancestor=book))
 
     fragments = Fragment.tagged.with_all([theme]).filter(
         Q(book=book) | Q(book__ancestor=book))
 
-    if request.EXPERIMENTS['layout'].value:
-        template_name = 'catalogue/2022/book_fragments.html'
-    else:
-        template_name = 'catalogue/book_fragments.html'
-    
+    template_name = 'catalogue/2022/book_fragments.html'
     return render(
         request,
         template_name,
     return render(
         request,
         template_name,
@@ -573,41 +520,19 @@ def book_detail(request, slug):
     except Book.DoesNotExist:
         return pdcounter_views.book_stub_detail(request, slug)
 
     except Book.DoesNotExist:
         return pdcounter_views.book_stub_detail(request, slug)
 
-    new_layout = request.EXPERIMENTS['layout']
-    
     return render(
         request,
     return render(
         request,
-        'catalogue/2022/book_detail.html' if new_layout.value else 'catalogue/book_detail.html',
+        'catalogue/2022/book_detail.html',
         {
             'book': book,
             'accessible': book.is_accessible_to(request.user),
             'book_children': book.children.all().order_by('parent_number', 'sort_key'),
             'active_menu_item': 'books',
         {
             'book': book,
             'accessible': book.is_accessible_to(request.user),
             'book_children': book.children.all().order_by('parent_number', 'sort_key'),
             'active_menu_item': 'books',
-            'club_form': ScheduleForm() if book.preview else None,
             'club': Club.objects.first() if book.preview else None,
             'donation_form': DonationStep1Form(),
         })
 
 
             'club': Club.objects.first() if book.preview else None,
             'donation_form': DonationStep1Form(),
         })
 
 
-# używane w publicznym interfejsie
-def player(request, slug):
-    book = get_object_or_404(Book, slug=slug)
-    if not book.has_media('mp3'):
-        raise Http404
-
-    audiobooks, projects, total_duration = book.get_audiobooks()
-
-    return render(
-        request,
-        'catalogue/player.html',
-        {
-            'book': book,
-            'audiobook': '',
-            'audiobooks': audiobooks,
-            'projects': projects,
-        })
-
-
 def book_text(request, slug):
     book = get_object_or_404(Book, slug=slug)
 
 def book_text(request, slug):
     book = get_object_or_404(Book, slug=slug)
 
@@ -736,11 +661,7 @@ def tag_catalogue(request, category):
     else:
         best = described_tags
 
     else:
         best = described_tags
 
-    if request.EXPERIMENTS['layout'].value:
-        template_name = 'catalogue/2022/tag_catalogue.html'
-    else:
-        template_name = 'catalogue/tag_catalogue.html'
-
+    template_name = 'catalogue/2022/tag_catalogue.html'
     return render(request, template_name, {
         'tags': tags,
         'best': best,
     return render(request, template_name, {
         'tags': tags,
         'best': best,
@@ -758,11 +679,7 @@ def collections(request):
     else:
         best = objects
 
     else:
         best = objects
 
-    if request.EXPERIMENTS['layout'].value:
-        template_name = 'catalogue/2022/collections.html'
-    else:
-        template_name = 'catalogue/collections.html'
-
+    template_name = 'catalogue/2022/collections.html'
     return render(request, template_name, {
         'objects': objects,
         'best': best,
     return render(request, template_name, {
         'objects': objects,
         'best': best,
index 098a70e..dd088f7 100644 (file)
@@ -9,109 +9,6 @@ from . import models, payment_methods
 from .payu.forms import CardTokenForm
 
 
 from .payu.forms import CardTokenForm
 
 
-class ScheduleForm(forms.ModelForm, NewsletterForm):
-    data_processing = '''Informacja o przetwarzaniu danych osobowych
-
-<div class='more-expand'>Administratorem Twoich danych osobowych jest Fundacja Wolne Lektury z siedzibą w Warszawie, przy ul. Marszałkowskiej 84/92 lok.125, 00-514 Warszawa (dalej: Fundacja).
-
-Z Fundacją można się kontaktować we wszystkich sprawach dotyczących przetwarzania danych osobowych oraz korzystania z praw związanych z przetwarzaniem danych, w szczególności w zakresie wycofania udzielonej zgody na przetwarzanie danych poprzez adres e-mail fundacja@nowoczesnapolska.org.pl, telefonicznie pod numerem +48 22 621 30 17 (w dni powszednie w godz. 9-17) lub listownie pisząc na adres siedziby Fundacji.
-Podanie danych osobowych jest dobrowolne, jednak konieczne do przeprowadzenia płatności oraz realizacji innych celów wskazanych poniżej.
-
-Twoje dane będą przetwarzane w celu:
-    • rozliczeniowym, księgowym, i innych sprawach związanych z Twoją darowizną na podstawie art. 6 ust. 1 lit. b i c RODO,
-    • kontaktu telefonicznego, przez media elektroniczne oraz listownie, celem informowania o działalności oraz prośby o wsparcie na podstawie art. 6 ust. 1 lit. a,
-    • przesyłania e-mailem newslettera: regularnej informacji o działalności fundacji oraz próśb o wsparcie na podstawie art. 6 ust. 1 lit. a RODO,
-    • ewentualnego ustalenia i dochodzenia roszczeń lub obrony przed nimi; zapewnienia bezpieczeństwa u Administratora oraz realizacji wewnętrznych celów administracyjnych, analitycznych i statystycznych na podstawie art. 6 ust. 1 lit. f RODO; uzasadnionym interesem Administratora jest możliwość obrony przed ewentualnymi roszczeniami, zapewnienia bezpieczeństwa u Administratora oraz możliwość realizacji wewnętrznych celów administracyjnych, analitycznych i statystycznych przez Fundację.
-
-Fundacja nie udostępnia Twoich danych osobowych podmiotom trzecim. Fundacja może korzystać z usług podwykonawców w celu realizacji kontaktu w ramach wyrażonej zgody. W szczególności Twoje dane mogą być przekazywane podmiotom takim jak banki, firma obsługująca księgowość i firmy współpracujące przy prowadzeniu akcji informacyjnych i edukacyjnych – przy czym takie podmioty przetwarzają dane wyłącznie na podstawie umowy z administratorem, wyłącznie zgodnie z poleceniami administratora i wyłącznie zgodnie z zakresem udzielonej zgody.
-
-Twoje dane osobowe będą przechowywane do momentu wycofania zgody, rozliczenia darowizn, a po tym okresie przez okres przedawnienia ewentualnych roszczeń lub przez okres, który wynika z przepisów prawa, w szczególności obowiązku przechowywania dokumentów księgowych (rachunkowych).
-
-Przysługuje Ci prawo dostępu do Twoich danych oraz prawo żądania ich sprostowania, ich usunięcia lub ograniczenia ich przetwarzania. W zakresie, w jakim podstawą przetwarzania Twoich danych osobowych jest przesłanka prawnie uzasadnionego interesu administratora, przysługuje Ci prawo wniesienia sprzeciwu wobec przetwarzania Twoich danych osobowych. W zakresie, w jakim podstawą przetwarzania Twoich danych osobowych jest zgoda, masz prawo wycofania zgody. Wycofanie zgody nie ma wpływu na zgodność z prawem przetwarzania, którego dokonano na podstawie zgody przed jej wycofaniem. W celu skorzystania z powyższych praw należy skontaktować się z fundacją w dowolny wskazany powyżej sposób.
-
-Masz prawo do wniesienia skargi do organu nadzorczego, jeżeli uważasz, że Twoje dane osobowe są przetwarzane w niewłaściwy sposób.
-
-Twoje dane osobowe nie będą profilowane, ani przesyłane do państw trzecich i organizacji międzynarodowych.
-
-</div>
-'''.replace('\n', '<br>')
-
-    class Meta:
-        model = models.Schedule
-        fields = ['monthly', 'amount',
-                  'first_name', 'last_name',
-                  'email', 'phone',
-                  'postal',
-                  'postal_code', 'postal_town', 'postal_country',
-                  'method']
-        widgets = {
-            'amount': forms.HiddenInput,
-            'monthly': forms.HiddenInput,
-            'method': forms.HiddenInput,
-
-            'first_name': forms.TextInput(attrs={"placeholder": _('first name')}),
-            'last_name': forms.TextInput(attrs={"placeholder": _('last name')}),
-
-            'postal': forms.Textarea(attrs={"placeholder": _("street address")}),
-            'postal_code': forms.TextInput(attrs={"placeholder": _('postal code')}),
-            'postal_town': forms.TextInput(attrs={"placeholder": _('town')}),
-        }
-
-    def __init__(self, referer=None, **kwargs):
-        self.referer = referer
-        super().__init__(**kwargs)
-
-        self.fields['first_name'].required = True
-        self.fields['last_name'].required = True
-        self.fields['phone'].required = True
-        
-        self.consent = []
-        for c in models.Consent.objects.filter(active=True).order_by('order'):
-            key = f'consent{c.id}'
-            self.fields[key] = forms.BooleanField(
-                label=c.text,
-                required=c.required
-            )
-            self.consent.append((
-                c, key, (lambda k: lambda: self[k])(key)
-            ))
-
-    def clean_amount(self):
-        value = self.cleaned_data['amount']
-        club = models.Club.objects.first()
-        if club and value < club.min_amount:
-            raise forms.ValidationError(
-                _('Minimal amount is %(amount)d PLN.') % {
-                    'amount': club.min_amount
-                }
-            )
-        return value
-
-    def clean_method(self):
-        value = self.cleaned_data['method']
-        monthly = self.cleaned_data['monthly']
-        for m in payment_methods.methods:
-            if m.slug == value:
-                if (monthly and m.is_recurring) or (not monthly and m.is_onetime):
-                    return value
-        if monthly:
-            return payment_methods.recurring_payment_method.slug
-        else:
-            return payment_methods.single_payment_method.slug
-    
-    def save(self, *args, **kwargs):
-        NewsletterForm.save(self, *args, **kwargs)
-        self.instance.source = self.referer or ''
-        instance = super().save(*args, **kwargs)
-
-        consents = []
-        for consent, key, consent_field in self.consent:
-            if self.cleaned_data[key]:
-                instance.consent.add(consent)
-
-        return instance
-
-
 class PayUCardTokenForm(CardTokenForm):
     def get_queryset(self, view):
         return view.get_schedule().payucardtoken_set
 class PayUCardTokenForm(CardTokenForm):
     def get_queryset(self, view):
         return view.get_schedule().payucardtoken_set
index 4a596e4..825210c 100644 (file)
@@ -19,7 +19,7 @@ class PaymentMethod(object):
     updateable = False
 
     def initiate(self, request, schedule):
     updateable = False
 
     def initiate(self, request, schedule):
-        return reverse('club_dummy_payment', args=[schedule.key])
+        raise NotImplementedError
 
 
 class PayU(PaymentMethod):
 
 
 class PayU(PaymentMethod):
@@ -27,7 +27,6 @@ class PayU(PaymentMethod):
     expiration_reliable = True
     slug = 'payu'
     name = 'PayU'
     expiration_reliable = True
     slug = 'payu'
     name = 'PayU'
-    template_name = 'club/payment/payu.html'
 
     def __init__(self, pos_id):
         self.pos_id = pos_id
 
     def __init__(self, pos_id):
         self.pos_id = pos_id
@@ -55,7 +54,6 @@ class PayU(PaymentMethod):
 class PayURe(PaymentMethod):
     slug = 'payu-re'
     name = 'PayU recurring'
 class PayURe(PaymentMethod):
     slug = 'payu-re'
     name = 'PayU recurring'
-    template_name = 'club/payment/payu-re.html'
     is_recurring = True
     expiration_reliable = True
     cancellable = True
     is_recurring = True
     expiration_reliable = True
     cancellable = True
@@ -145,7 +143,6 @@ class PayURe(PaymentMethod):
 class PayPal(PaymentMethod):
     slug = 'paypal'
     name = 'PayPal'
 class PayPal(PaymentMethod):
     slug = 'paypal'
     name = 'PayPal'
-    template_name = 'club/payment/paypal.html'
     is_recurring = True
     is_onetime = False
 
     is_recurring = True
     is_onetime = False
 
diff --git a/src/club/templates/club/dummy_payment.html b/src/club/templates/club/dummy_payment.html
deleted file mode 100644 (file)
index d776e75..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-{% extends request.session.from_app|yesno:"base/app.html,base/base.html" %}
-
-
-{% block titleextra %}{% trans "Wolne Lektury need your help!" %}{% endblock %}
-
-
-{% block body %}
-  <div class="white-box normal-text">
-
-    <h1>Testowa płatność</h1>
-
-    <p>        {{ schedule.email }}</p>
-    <p>        {{ schedule.amount }}</p>
-    <p>        {{ schedule.plan.get_interval_display }}</p>
-
-    <!--form method="POST" action="">
-         {% csrf_token %}
-
-         {{ form.as_p }}
-         <button type='submit'>Zapłać</button>
-         </form-->
-
-
-    {% if request.GET.p == 'inline' %}
-      <div id="payu-widget"></div>
-    {% else %}
-      {% if request.GET.p == 'popup' %}
-        <form action="http://exampledomain.com/processOrder.php" method="post">
-          <button id="pay-button">Pay now</button>
-        </form>
-        <script
-            src="https://secure.payu.com/front/widget/js/payu-bootstrap.js"
-            pay-button="#pay-button"
-            merchant-pos-id="145227"
-            shop-name="Nazwa sklepu"
-            total-amount="9.99"
-            currency-code="PLN"
-            customer-language="pl"
-            store-card="true"
-            customer-email="email@exampledomain.com"
-            sig="250f5f53e465777b6fefb04f171a21b598ccceb2899fc9f229604ad529c69532">
-        </script>
-
-
-      {% else %}
-        <form method="POST" action="">
-          {% csrf_token %}
-
-          {{ form.as_p }}
-          <button type='submit'>Zapłać</button>
-        </form>
-      {% endif %}
-    {% endif %}
-
-  </div>
-
-  <script
-      src="https://secure.payu.com/front/widget/js/payu-bootstrap.js"
-      merchant-pos-id="145227"
-      shop-name="TEST"
-      total-amount="12345"
-      currency-code="PLN"
-      customer-language="en"
-      store-card="true"
-      payu-brand="false"
-      success-callback="test"
-      widget-mode="use"
-      customer-email="test@test.com"
-      sig="203ec8c4b9571ce6b4c03058f57264f04d06d00a86da19390d47ba1be4551578"
-  </script>
-
-{% endblock %}
index ecc2ef9..7c6a207 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 {% load active_schedule from club %}
 {% load chunks %}
 {% load i18n %}
 {% load active_schedule from club %}
 {% load chunks %}
diff --git a/src/club/templates/club/membership_form.html b/src/club/templates/club/membership_form.html
deleted file mode 100644 (file)
index a46cfe2..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-{% extends request.session.from_app|yesno:"base/app.html,base/base.html" %}
-{% load i18n %}
-{% load chunks %}
-{% load thumbnail %}
-{% load club %}
-
-{% block titleextra %}{% trans "Join us in freeing the books!" %}{% endblock %}
-{% block metadescription %}{% trans "„Wolne Lektury należy wspierać, bo są” - Filip Springer" %}{% endblock %}
-
-
-{% block body %}
-  <div class="white-box normal-text">
-
-    <h1>{% trans "Support Wolne Lektury" %}</h1>
-    <h2 style="margin-bottom:2em;">
-      {% if membership %}
-        {# Displays to members. #}
-        {% trans "Thank you for your support! Support us again!" %}
-      {% else %}
-        {# Displays to non-supporters. #}
-        {% trans "Thank you for wanting to free the books with us!" %}
-      {% endif %}</h2>
-
-      {% with schedule=request.user|active_schedule %}
-        {% if schedule %}
-          <p><a href="{{ schedule.get_absolute_url }}">{% trans "See your past support." %}</a></p>
-        {% endif %}
-      {% endwith %}
-
-      <div class='twocol'>
-
-      <form method="POST" action="" id="payment-form" class="wlform">
-        {% csrf_token %}
-
-        {% chunk 'club_form_top' %}
-
-       {% if supporters_target %}
-        {% club_monthly_since supporters_since as supporters %}
-        {% club_monthly_missing_since supporters_since supporters_target as missing_supporters %}
-       <p>
-         {% blocktrans %}Help us get 100 new Friends by the end of the school semester.{% endblocktrans %}
-         {% blocktrans count supporters=supporters %}
-           So far <b style="color: #0d7e85">{{ supporters }}</b> reader has already supported us with a regular donation,
-           {% plural %}
-           So far <b style="color: #0d7e85">{{ supporters }}</b> readers have already supported us with a regular donation,
-         {% endblocktrans %}
-         {% blocktrans count missing_supporters=missing_supporters %}
-           <b style="color: #0d7e85">{{ missing_supporters }}</b> is missing.
-            {% plural %}
-            <b style="color: #0d7e85">{{ missing_supporters }}</b> are missing.
-         {% endblocktrans %}
-        </p>
-        <div class="funding" style="background: none;"><div class="description"><div class="progress" style="text-align: center; background-size: {{ supporters }}% 1px;"><span class="piece progress-collected">&nbsp;{{ supporters }}</span><span class="piece progress-target">{{ missing_supporters }}&nbsp;</span><div style="clear: both"></div></div></div></div>
-       {% endif %}
-
-        {% include "club/payment_form.html" %}
-
-        {% chunk 'club_form_bottom' %}
-
-      </form>
-
-      <div class="club-form-info">
-        {% if ambassador %}
-       <div class="ambassador {% if ambassador.photo %}with-photo{% endif %}">
-            <div>
-              <em>
-                {{ ambassador.text }}
-              </em>
-              <div style="font-size: 1.2em">{{ ambassador.name }}</div>
-            </div>
-            {% if ambassador.photo %}
-              <img src="{% thumbnail ambassador.photo "100x100" as thumb %}{{ thumb.url }}{% empty %}{{ ambassador.photo.url }}{% endthumbnail %}">
-            {% endif %}
-          </div>
-        {% endif %}
-
-        {% include "club/payment_info.html" %}
-</div>
-</div>
-
-</div>
-
-{% endblock %}
diff --git a/src/club/templates/club/membership_form_app.html b/src/club/templates/club/membership_form_app.html
deleted file mode 100644 (file)
index 433b6fc..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-{% extends "base/app.html" %}
-{% load i18n %}
-
-
-{% block titleextra %}{% trans "Wolne Lektury need your help!" %}{% endblock %}
-
-
-{% block body %}
-  <div class="white-box normal-text">
-
-    <h1>{% if membership %}Odnów swoje wsparcie dla Wolnych Lektur{% else %}Wspieraj Wolne Lektury{% endif %}</h1>
-
-    <form method="POST" action="">
-      {% csrf_token %}
-
-      {{ form.as_p }}
-  <button type='submit'>Wspieraj</button>
-</form>
-
-</div>
-
-{% endblock %}
diff --git a/src/club/templates/club/payment/dummy-re.html b/src/club/templates/club/payment/dummy-re.html
deleted file mode 100644 (file)
index 8bc9f90..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dummy re
diff --git a/src/club/templates/club/payment/dummy.html b/src/club/templates/club/payment/dummy.html
deleted file mode 100644 (file)
index 421376d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dummy
diff --git a/src/club/templates/club/payment/paypal.html b/src/club/templates/club/payment/paypal.html
deleted file mode 100644 (file)
index 81c7504..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{% load static %}
-<img src="{% static 'club/paypal.png' %}">
-
diff --git a/src/club/templates/club/payment/payu-re.html b/src/club/templates/club/payment/payu-re.html
deleted file mode 100644 (file)
index c3e3ea5..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-{% load i18n %}
-{% load static %}
-<span style="padding-right: 5px; font-size: 12px">
-  {% trans "Safe payments" %}
-</span>
-<span class="button active" data-method="payu-re">
-  <img src="{% static 'club/payu/payu.png' %}" alt="PayU">
-  <img src="{% static 'club/visa-100.png' %}" alt="Visa" >
-  <img src="{% static 'club/mastercard.png' %}" alt="Mastercard">
-</span>
-<span class="button" data-method="paypal">
-  <img src="{% static 'club/paypal2.png' %}" alt="PayPal">
-</span>
diff --git a/src/club/templates/club/payment/payu.html b/src/club/templates/club/payment/payu.html
deleted file mode 100644 (file)
index d9849ef..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-{% load i18n %}
-{% load static %}
-<span style="vertical-align: bottom; padding-right: 5px; font-size: 12px;">
-  {% trans "Safe payments" %}
-</span>
-<img src="{% static 'club/payu/payu.png' %}">
-<img src="{% static 'club/payu/blik.png' %}">
-<img src="{% static 'club/visa-100.png' %}">
-<img src="{% static 'club/mastercard.png' %}">
-<span class="method">{# As in wire transfer of money. #}{% trans "transfer" %}</span>
diff --git a/src/club/templates/club/payment_form.html b/src/club/templates/club/payment_form.html
deleted file mode 100644 (file)
index a5b5c06..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-{% load i18n %}
-
-<ul class="errorlist">
-  {% for e in  form.non_field_errors %}
-    <li>{{ e }}</li>
-  {% endfor %}
-  {% for e in  form.plan.errors %}
-    <li>{{ e }}</li>
-  {% endfor %}
-  {% for e in  form.amount.errors %}
-    <li>{{ e }}</li>
-  {% endfor %}
-  {% for e in  form.method.errors %}
-    <li>{{ e }}</li>
-  {% endfor %}
-</ul>
-
-<h3>1. {% trans "Choose your type of support" %}</h3>
-
-{{ form.amount }}
-{{ form.monthly }}
-{{ form.method }}
-<div class="plan-select">
-  <span class="button plan-toggle" data-plan="plan-single" data-monthly="False">{% trans "one-time" %}</span>
-  <span class="button plan-toggle active" data-plan="plan-monthly" data-monthly="True">{% trans "monthly" %}</span>
-</div>
-
-<h3>2. {% trans "Choose the amount" %}</h3>
-
-<div class="plan" id="plan-single" style="display:none;" data-monthly="False" data-min-for-year="{{ club.min_for_year }}" data-amount="{{ club.default_single_amount }}">
-  {% for amount in club.singleamount_set.all %}
-    <span class="button kwota{% if amount.amount == club.default_single_amount %} active{% endif %}{% if amount.amount >= club.min_for_year %} yearly{% endif %}">{{ amount.amount }}</span>
-  {% endfor %}
-
-  <span class="inna">
-    <span class="button">{% trans "different amount" %}</span>
-    <input type="number" min="{{ club.min_amount }}">
-  </span>
-  <div class="methods">{% include 'club/payment/payu.html' %}</div>
-</div>
-
-
-<div class="plan" id="plan-monthly" data-monthly="True" data-amount="{{ club.default_monthly_amount }}">
-  {% for amount in club.monthlyamount_set.all %}
-    <span class="button kwota{% if amount.amount == club.default_monthly_amount %} active{% endif %}">{{ amount.amount }}</span>
-  {% endfor %}
-
-  <span class="inna">
-    <span class="button">{% trans "different amount" %}</span>
-    <input type="number" min="{{ club.min_amount }}">
-  </span>
-  <div class="methods">
-    {% include 'club/payment/payu-re.html' %}
-  </div>
-</div>
-
-<h3>3. {% trans "Provide contact details" %}</h3>
-
-<p>
-  <label class="required">{% trans "First and last name:" %}</label><br>
-  {{ form.first_name }}
-  <br><br>
-  {{ form.last_name }}
-</p>
-
-
-<p>
-  <label for="id_email" {% if form.email.field.required %}class="required"{% endif %}>{% trans "E-mail:" %}</label><br>
-  {{ form.email }}
-</p>
-
-<p>
-  <label for="id_phone" {% if form.phone.field.required %}class="required"{% endif %}>{% trans "Phone number:" %}</label><br>
-  {{ form.phone }}
-</p>
-
-<p>
-  <label for="id_postal"  {% if form.postal.field.required %}class="required"{% endif %}>{% trans "Postal address:" %}</label><br>
-  {{ form.postal }}<br>
-  {{ form.postal_code }} {{ form.postal_town }}<br>
-  {{ form.postal_country }}
-</p>
-
-{% for c, key, consent_field in form.consent %}
-  <p>
-    {{ consent_field }}
-    <label for="id_{{ key }}" {% if c.required %}class="required"{% endif %}>
-      {{ consent_field.label }}
-    </label>
-  </p>
-{% endfor %}
-
-
-<p>
-  {{ form.agree_newsletter }}
-  <label for="id_agree_newsletter">
-    {% trans "I'd like to subscribe the newsletter." %}
-  </label>
-</p>
-
-<p class="helptext">{% trans 'You can unsubscribe at any point. More in the <a target="_blank" href="https://nowoczesnapolska.org.pl/prywatnosc/">privacy policy</a>.' %}</p>
-
-<div class="helptext">{{ form.data_processing|safe }}</div>
-
-<div><button class="submit" type='submit'>{% trans "Donate" %}</button></div>
diff --git a/src/club/templates/club/payment_info.html b/src/club/templates/club/payment_info.html
deleted file mode 100644 (file)
index 7527f85..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-{% load chunks %}
-
-<div class="chunk-alt">
-  <div class="chunk chunk-monthly">
-    {% chunk 'club-form-info-monthly' %}
-  </div>
-  <div class="chunk chunk-single" style="display: none;">
-    {% chunk 'club-form-info-single' %}
-  </div>
-  <div class="chunk chunk-single-year" style="display: none;">
-    {% chunk 'club-form-info-single-year' %}
-  </div>
-</div>
index 84b6833..c86f111 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 
 
 {% load i18n %}
 
 
diff --git a/src/club/templates/club/thanks.html b/src/club/templates/club/thanks.html
deleted file mode 100644 (file)
index a527d00..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-{% extends request.session.from_app|yesno:"base/app.html,base/base.html" %}
-{% load chunks %}
-{% load i18n %}
-
-
-{% block titleextra %}{% trans "Wolne Lektury need your help!" %}{% endblock %}
-
-
-{% block body %}
-
-
-  <div class="white-box normal-text">
-
-    <h1>{% trans "Thank you" %}</h1>
-
-    {% chunk 'club_thanks' %}
-
-    {% if request.session.from_app %}
-      <a href="wolnelekturyapp://paypal_return">{% trans "Go back to the app" %}</a>
-  {% endif %}
-
-</div>
-
-{% endblock %}
diff --git a/src/club/templates/club/widgets/plan.html b/src/club/templates/club/widgets/plan.html
deleted file mode 100644 (file)
index fe0e4a8..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-
-<div style="display:flex">
-{% for _1, optgroup, _2 in widget.optgroups %}
-  {% for option in optgroup %}
-    <div style="display: flex-item;">
-    {% with plan=option.label %}
-      <big>{{ plan.min_amount }} zł</big><br>
-      {{ plan.get_interval_display }}
-
-      {% for pm in plan.payment_methods %}
-        <div>
-               <input id="id_{{ option.value }}_{{ pm.slug }}" type="radio" name="payment_method" value="{{ option.value }}_{{ pm.slug }}">
-               <label for="id_{{ option.value }}_{{ pm.slug }}">
-        {% include pm.template_name %}
-               </label>
-       </div>
-      {% endfor %}
-
-    {% endwith %}
-    </div>
-  {% endfor %}
-{% endfor %}
-</div>
-
-
index 32e1ffd..4345321 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.session.from_app|yesno:"base/app.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load chunks i18n %}
 
 
 {% load chunks i18n %}
 
 
@@ -9,7 +9,7 @@
   <div class="white-box normal-text">
     <h1>{% blocktrans with year=view.kwargs.year email=object.email %}Summary of donations in the year {{ year }} for the address {{ email }}.{% endblocktrans %}</h1>
 
   <div class="white-box normal-text">
     <h1>{% blocktrans with year=view.kwargs.year email=object.email %}Summary of donations in the year {{ year }} for the address {{ email }}.{% endblocktrans %}</h1>
 
-    <table class="table">
+    <table class="table" border="1">
       <thead>
         <tr>
           <th>{% trans "Date" %}</th>
       <thead>
         <tr>
           <th>{% trans "Date" %}</th>
index 3f8fa58..3b7b184 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.session.from_app|yesno:"base/app.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 
 
 {% load i18n %}
 
 
       {% endif %}
     </p>
 
       {% endif %}
     </p>
 
+    <p></p>
     <form id="theform" method='POST'>
       {% csrf_token %}
       {{ form }}
     </form>
 
     <form id="theform" method='POST'>
       {% csrf_token %}
       {{ form }}
     </form>
 
-
-
     <script>
      function paymentcallback(data) {
          $("#theform #id_token").val(data.value);
     <script>
      function paymentcallback(data) {
          $("#theform #id_token").val(data.value);
index 28cf959..9d7cd8a 100644 (file)
@@ -21,7 +21,6 @@ urlpatterns = [
 
     path('przylacz/<key>/', views.claim, name='club_claim'),
     path('anuluj/<key>/', views.cancel, name='club_cancel'),
 
     path('przylacz/<key>/', views.claim, name='club_claim'),
     path('anuluj/<key>/', views.cancel, name='club_cancel'),
-    path('testowa-platnosc/<key>/', views.DummyPaymentView.as_view(), name='club_dummy_payment'),
 
     path('platnosc/payu/cykl/<key>/', banner_exempt(views.PayURecPayment.as_view()), name='club_payu_rec_payment'),
     path('platnosc/payu/<key>/', banner_exempt(views.PayUPayment.as_view()), name='club_payu_payment'),
 
     path('platnosc/payu/cykl/<key>/', banner_exempt(views.PayURecPayment.as_view()), name='club_payu_rec_payment'),
     path('platnosc/payu/<key>/', banner_exempt(views.PayUPayment.as_view()), name='club_payu_payment'),
index e80fcf9..85faa85 100644 (file)
@@ -13,7 +13,7 @@ from django.views.generic import FormView, CreateView, TemplateView, DetailView,
 from django.views import View
 from .payu import POSS
 from .payu import views as payu_views
 from django.views import View
 from .payu import POSS
 from .payu import views as payu_views
-from .forms import ScheduleForm, PayUCardTokenForm
+from .forms import PayUCardTokenForm
 from . import forms
 from . import models
 from .helpers import get_active_schedule
 from . import forms
 from . import models
 from .helpers import get_active_schedule
@@ -60,24 +60,13 @@ class DonationStep2(UpdateView):
 
 
 class JoinView(CreateView):
 
 
 class JoinView(CreateView):
+    form_class = forms.DonationStep1Form
+    template_name = 'club/2022/donation_step1.html'
+
     @property
     def club(self):
         return models.Club.objects.first()
 
     @property
     def club(self):
         return models.Club.objects.first()
 
-    @property
-    def new_layout(self):
-        return self.request.EXPERIMENTS['layout'].value
-    
-    def get_template_names(self):
-        if self.new_layout:
-            return 'club/2022/donation_step1.html'
-        return 'club/membership_form.html'
-
-    def get_form_class(self):
-        if self.new_layout:
-            return forms.DonationStep1Form
-        return ScheduleForm
-    
     def is_app(self):
         return self.request.GET.get('app')
 
     def is_app(self):
         return self.request.GET.get('app')
 
@@ -102,6 +91,7 @@ class JoinView(CreateView):
         return c
 
     def get_initial(self):
         return c
 
     def get_initial(self):
+        # referer?
         if self.request.user.is_authenticated and self.request.user.email:
             return {
                 'email': self.request.user.email
         if self.request.user.is_authenticated and self.request.user.email:
             return {
                 'email': self.request.user.email
@@ -109,8 +99,7 @@ class JoinView(CreateView):
 
     def get_form_kwargs(self):
         kwargs = super().get_form_kwargs()
 
     def get_form_kwargs(self):
         kwargs = super().get_form_kwargs()
-        if not self.new_layout:
-            kwargs['referer'] = self.request.META.get('HTTP_REFERER', '')
+        #kwargs['referer'] = self.request.META.get('HTTP_REFERER', '')
         return kwargs
 
     def form_valid(self, form):
         return kwargs
 
     def form_valid(self, form):
@@ -121,9 +110,7 @@ class JoinView(CreateView):
         return retval
 
     def get_success_url(self):
         return retval
 
     def get_success_url(self):
-        if self.new_layout:
-            return reverse('donation_step2', args=[self.object.key])
-        return self.object.initiate_payment(self.request)
+        return reverse('donation_step2', args=[self.object.key])
 
 
 @method_decorator(never_cache, name='dispatch')
 
 
 @method_decorator(never_cache, name='dispatch')
@@ -134,9 +121,8 @@ class ScheduleView(DetailView):
     step = 3
     
     def get_template_names(self):
     step = 3
     
     def get_template_names(self):
-        if self.request.EXPERIMENTS['layout'].value:
-            if not self.object.payed_at:
-                return 'club/2022/donation_step3.html'
+        if not self.object.payed_at:
+            return 'club/2022/donation_step3.html'
         return 'club/schedule.html'
         
     def get_context_data(self, *args, **kwargs):
         return 'club/schedule.html'
         
     def get_context_data(self, *args, **kwargs):
@@ -164,21 +150,6 @@ def cancel(request, key):
     return HttpResponseRedirect(schedule.get_absolute_url())
 
 
     return HttpResponseRedirect(schedule.get_absolute_url())
 
 
-class DummyPaymentView(TemplateView):
-    template_name = 'club/dummy_payment.html'
-
-    def get_context_data(self, key):
-        return {
-            'schedule': models.Schedule.objects.get(key=key),
-        }
-
-    def post(self, request, key):
-        schedule = models.Schedule.objects.get(key=key)
-        schedule.create_payment()
-
-        return HttpResponseRedirect(schedule.get_absolute_url())
-
-
 class PayUPayment(DetailView):
     model = models.Schedule
     slug_field = slug_url_kwarg = 'key'
 class PayUPayment(DetailView):
     model = models.Schedule
     slug_field = slug_url_kwarg = 'key'
@@ -214,14 +185,10 @@ class PayUNotifyView(payu_views.NotifyView):
 
 class ScheduleThanksView(DetailView):
     model = models.Schedule
 
 class ScheduleThanksView(DetailView):
     model = models.Schedule
+    template_name = 'club/2022/donation_step4.html'
     slug_field = slug_url_kwarg = 'key'
     step = 4
 
     slug_field = slug_url_kwarg = 'key'
     step = 4
 
-    def get_template_names(self):
-        if self.request.EXPERIMENTS['layout'].value:
-            return 'club/2022/donation_step4.html'
-        return 'club/thanks.html'
-    
     def get_context_data(self, *args, **kwargs):
         ctx = super().get_context_data(*args, **kwargs)
         ctx['active_menu_item'] = 'club'
     def get_context_data(self, *args, **kwargs):
         ctx = super().get_context_data(*args, **kwargs)
         ctx['active_menu_item'] = 'club'
index 6c1da2e..84c111e 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n pagination_tags %}
 {% load set_get from set_get %}
 
 {% load i18n pagination_tags %}
 {% load set_get from set_get %}
 
index 77c29f3..762d13b 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base.html,base/base.html" %}
+{% extends "2022/base.html" %}
 {% load static i18n %}
 
 {% block breadcrumbs %}
 {% load static i18n %}
 
 {% block breadcrumbs %}
index 2763217..ce2b330 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 {% load fnp_share %}
 
 {% load i18n %}
 {% load fnp_share %}
 
index ca62ad4..a8f2af1 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 {% load fnp_share %}
 
 {% load i18n %}
 {% load fnp_share %}
 
diff --git a/src/funding/templates/funding/offer_detail.html b/src/funding/templates/funding/offer_detail.html
deleted file mode 100644 (file)
index 05e2d7b..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n static %}
-{% load pagination_tags %}
-{% load fnp_share %}
-{% load thumbnail %}
-{% load build_absolute_uri from fnp_common %}
-{% load fundings from funding_tags %}
-{% load chunks %}
-
-
-{% block titleextra %}{{ object }}{% endblock %}
-
-{% block ogimage %}{{ object.cover.url|build_absolute_uri:request }}{% endblock %}
-
-{% block metadescription %}Wesprzyj kolejną publikację Wolnych Lektur!{% endblock %}
-
-
-{% block body %}
-  <h1>{{ object }}</h1>
-
-  {{ object.detail_bar }}
-  <div class="white-box">
-    <div class="funding-details-intro">
-      {% if object.cover %}
-        <img src="{% thumbnail object.cover "139x193" as thumb %}{{ thumb.url }}{% empty %}{{ object.cover.url }}{% endthumbnail %}"
-             alt="Cover" class="funding-cover" />
-      {% endif %}
-      <div class="normal-text">
-        <h3>{% trans "Help free the book!" %}</h3>
-        {{ object.description|safe }}
-      </div>
-    </div>
-
-    {% if object.is_current %}
-      <div class="normal-text">
-        <h3>{% trans "Support the publication" %}</h3>
-        <form action="" method="post">
-          <table>
-            {# FIXME after upgrade to django 1.9 use field_order #}
-            {% for field in form %}
-              {% if field.name != 'agree_newsletter' %}
-                <tr>
-                  <th>{{ field.label }}</th>
-                  <td>
-                    {{ field.errors }}{{ field }}
-                    {% if field.help_text %}<br /><span class="helptext">{{ field.help_text }}</span>
-                    {% endif %}
-                  </td>
-                </tr>
-              {% endif %}
-            {% endfor %}
-            <tr>
-              <td></td>
-              <td>
-                <label>{{ form.agree_newsletter }} {{ form.agree_newsletter.label }}</label>
-                <br/><span class="helptext">{{ form.data_processing }}</span>
-              </td>
-            </tr>
-            <tr>
-              <td></td>
-              <td>
-                <button type="submit" style="border: none; background: none; cursor: pointer">
-                  <img alt="{% trans 'Donate!' %}" src="{% static 'img/payu.png' %}" />
-                </button>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-
-      {% chunk "funding_form_bottom" %}
-
-         {{ object.status }}
-        <a href='//nowoczesnapolska.org.pl/pomoz-nam/wesprzyj-nas/' target="_blank" style='float:right;border:1px solid #ddd;padding: 1em;margin:0 0 1em 1em;background:#eee;'><img src='//nowoczesnapolska.org.pl/wp-content/themes/koed/annoy/procent.png' alt='1%' style='float:left;margin-right: 1em;margin-top:.2em;'>Możesz też przekazać<br/>1% podatku na rozwój biblioteki. &rarr;</a>
-        {{ object.status_more }}
-        <p><a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>.</p>
-
-      {% url 'funding_current' object.slug as current %}
-      <p class="normal-text">{% trans "Tell your friends!" %}</p>
-      <p class="share">{% share current _("Support Wolne Lektury!") "big" %}</p>
-      <div style="clear:both;"></div>
-    {% endif %}
-
-    <p class="normal-text"><a href="{% url 'funding' %}">{% trans "See all fundraisers." %}</a></p>
-  </div>
-
-  <h2>{% trans "Supporters" %}:</h2>
-
-  <div class="white-box normal-text">
-    {% fundings object %}
-  </div>
-{% endblock %}
diff --git a/src/funding/templates/funding/offer_list.html b/src/funding/templates/funding/offer_list.html
deleted file mode 100644 (file)
index 3e04747..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load pagination_tags %}
-
-{% block titleextra %}{% trans "All fundraisers" %}{% endblock %}
-
-{% block bodyid %}funding-offer-list{% endblock %}
-
-{% block body %}
-  <h1>{% trans "All fundraisers" %}</h1>
-
-  {% autopaginate object_list 10 %}
-  {% if page_obj.number == 1 %}
-    <h2>{% trans "Current fundraiser:" %}</h2>
-  {% endif %}
-
-  {% for offer in object_list %}
-    {% with is_win=offer.is_win is_current=offer.is_current %}
-      {% if not is_current  and forloop.first and page_obj.number == 1 %}
-        <p class="normal-text">{% trans "No fundraiser is currently running." %}</p>
-        <h2>{% trans "Previous fundraisers:" %}</h2>
-      {% endif %}
-
-      {{ offer.list_bar }}
-
-      <div class="white-box normal-text">
-        {% if is_current %}
-          <h3>{% trans "Help free the book!" %}</h3>
-          {{ offer.description|safe }}
-        {% endif %}
-       {{ offer.status }}
-       {{ offer.status_more }}
-      </div>
-
-      {% if is_current and not forloop.last %}
-        <h2>{% trans "Previous fundraisers:" %}</h2>
-      {% endif %}
-    {% endwith %}
-  {% endfor %}
-  {% paginate %}
-{% endblock %}
index cd131f9..3d018b2 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 {% load fnp_share %}
 {% load polls_tags %}
 {% load i18n %}
 {% load fnp_share %}
 {% load polls_tags %}
index ed872e4..9b4e82e 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 
 {% block titleextra %}{% trans "Remaining funds" %}{% endblock %}
 {% load i18n %}
 
 {% block titleextra %}{% trans "Remaining funds" %}{% endblock %}
index 6df231d..35770ae 100644 (file)
@@ -71,12 +71,7 @@ class WLFundView(TemplateView):
 
 class OfferDetailView(FormView):
     form_class = FundingForm
 
 class OfferDetailView(FormView):
     form_class = FundingForm
-
-    def get_template_names(self):
-        if self.request.EXPERIMENTS['layout'].value:
-            return 'funding/2022/offer_detail.html'
-        else:
-            return "funding/offer_detail.html"
+    template_name = 'funding/2022/offer_detail.html'
 
     @csrf_exempt
     def dispatch(self, request, slug=None):
 
     @csrf_exempt
     def dispatch(self, request, slug=None):
@@ -126,11 +121,7 @@ class CurrentView(OfferDetailView):
 
 class OfferListView(ListView):
     queryset = Offer.public()
 
 class OfferListView(ListView):
     queryset = Offer.public()
-
-    def get_template_names(self):
-        if self.request.EXPERIMENTS['layout'].value:
-            return 'funding/2022/offer_list.html'
-        return 'funding/offer_list.html'
+    template_name = 'funding/2022/offer_list.html'
     
     def get_context_data(self, **kwargs):
         ctx = super(OfferListView, self).get_context_data(**kwargs)
     
     def get_context_data(self, **kwargs):
         ctx = super(OfferListView, self).get_context_data(**kwargs)
diff --git a/src/infopages/templates/infopages/infopage.html b/src/infopages/templates/infopages/infopage.html
deleted file mode 100644 (file)
index d9eab9a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-
-{% block titleextra %}{{ page.title }}{% endblock %}
-
-{% block metadescription %}{{ left_column|striptags|truncatewords:10 }}{% endblock %}
-
-{% block body %}
-  <h1>{{ page.title }}</h1>
-
-  {% autoescape off %}
-  <div class="left-column">
-    <div class="normal-text">
-      {{ left_column }}
-    </div>
-  </div>
-  <div class="right-column">
-    <div class="normal-text">
-      {{ right_column }}
-    </div>
-  </div>
-  {% endautoescape %}
-{% endblock %}
index 5c19e72..986d6a5 100644 (file)
@@ -10,8 +10,6 @@ from infopages.models import InfoPage
 def infopage(request, slug):
     page = get_object_or_404(InfoPage, slug=slug)
 
 def infopage(request, slug):
     page = get_object_or_404(InfoPage, slug=slug)
 
-    new_layout = request.EXPERIMENTS['layout']
-    
     rc = RequestContext(request)
     try:
         left_column = Template(page.left_column).render(rc)
     rc = RequestContext(request)
     try:
         left_column = Template(page.left_column).render(rc)
@@ -25,7 +23,7 @@ def infopage(request, slug):
 
     return render(
         request,
 
     return render(
         request,
-        'infopages/2022/infopage.html' if new_layout.value else 'infopages/infopage.html',
+        'infopages/2022/infopage.html',
         {
             'page': page,
             'left_column': left_column,
         {
             'page': page,
             'left_column': left_column,
index b1eebe2..242badb 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 
 {% block settings %}
   {% load title %}
 
 {% block settings %}
   {% load title %}
index 5cb99b1..768b88c 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 
 {% block settings %}
   {% load title %}
 
 {% block settings %}
   {% load title %}
index 96b7326..cd27b54 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 
 {% block settings %}
   {% load title %}
 
 {% block settings %}
   {% load title %}
index 01ca425..b4c935d 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 
 {% block settings %}
   {% load title %}
 
 {% block settings %}
   {% load title %}
diff --git a/src/lesmianator/templates/lesmianator/lesmianator.html b/src/lesmianator/templates/lesmianator/lesmianator.html
deleted file mode 100644 (file)
index a6e305f..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load catalogue_tags %}
-
-{% block titleextra %}Leśmianator{% endblock %}
-
-{% block metadescription %}Stwórz własny wierszmiks z utworów znajdujących się na Wolnych Lekturach.{% endblock %}
-
-{% block bodyid %}lesmianator{% endblock %}
-
-{% block body %}
-  <h1>Leśmianator</h1>
-
-  <div class="left-column">
-    <div class="normal-text">
-      <p>
-        Leśmianator tworzy wierszmiksy – dzięki niemu
-        <a href="{% url 'new_poem' %}">napiszesz wiersz jednym kliknięciem</a>.
-        W nowej odsłonie nowe możliwości zabawy – teraz możesz zdecydować, co wrzucasz do miksera,
-        a swoimi dziełami podzielić się z&nbsp;przyjaciółmi!
-      </p>
-      <p>
-        Przygotowaliśmy kilka propozycji na start – możesz wybrać jedną z nich,
-        albo ułożyć sobie własną, niepowtarzalną mieszankę.
-      </p>
-      <ul>
-        <li><a href="{% url 'poem_from_book' 'liryki-lozanskie' %}">Adam Mickiewicz, Liryki lozańskie</a></li>
-        <li><a href="{% url 'poem_from_book' 'sonety-krymskie' %}">Adam Mickiewicz, Sonety krymskie</a></li>
-        <li><a href="{% url 'poem_from_book' 'hymny' %}">Jan Kasprowicz, Hymny</a></li>
-        <li><a href="{% url 'poem_from_book' 'bogurodzica' %}">Bogurodzica</a></li>
-        {% for s in shelves %}
-          <li><a href="{% url 'poem_from_set' s.slug %}">{{ s.name }}</a></li>
-        {% endfor %}
-      </ul>
-    </div>
-  </div>
-
-  <div class="right-column">
-    <div class="normal-text">
-      <h3>Miksuj utwory</h3>
-      <p>
-        Możesz <a href="{% url 'new_poem' %}">zmiksować całą lirykę</a> w naszej bibliotece
-        albo tylko jeden konkretny utwór. Jak? Wejdź na
-        <a href="{% url 'book_detail' 'do-m' %}">stronę utworu</a>,
-        kliknij w link „miksuj ten utwór” – i gotowe!
-      </p>
-
-      <h3>Miksuj półki</h3>
-      <p>
-        Załóż konto, poukładaj swoje ulubione książki na półkach i miksuj
-        w dowolnych konfiguracjach. Nic prostszego, niż zmieszać
-        <a href="{% url 'tagged_object_list' 'autor/boleslaw-lesmian' %}">Leśmiana</a> z
-        <a href="{% url 'tagged_object_list' 'autor/kazimierz-przerwa-tetmajer' %}">Tetmajerem</a>,
-        a <a href="{% url 'tagged_object_list' 'autor/stefan-zeromski' %}">Żeromskiego</a> z
-        <a href="{% url 'tagged_object_list' 'autor/henryk-sienkiewicz' %}">Sienkiewiczem</a>
-        – wystarczy wrzucić ich utwory na półkę i klikną w link „miksuj utwory z tej półki”.
-      </p>
-
-      <h3>Dziel się z innymi</h3>
-      <p>
-        Wyszedł Ci wyjątkowo udany wierszmiks? Znajdziesz pod nim link, przy pomocy
-        którego możesz się nim podzielić z przyjaciółmi.
-      </p>
-
-      <p>Miłej zabawy!</p>
-    </div>
-  </div>
-{% endblock %}
index b4cbf69..b81f57f 100644 (file)
@@ -16,7 +16,7 @@ def main_page(request):
 
     return render(
         request,
 
     return render(
         request,
-        'lesmianator/2022/lesmianator.html' if request.EXPERIMENTS['layout'].value else 'lesmianator/lesmianator.html',
+        'lesmianator/2022/lesmianator.html',
         {"last": last, "shelves": shelves})
 
 @cache.never_cache
         {"last": last, "shelves": shelves})
 
 @cache.never_cache
index 42b30f7..2f21031 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 
 {% block settings %}
 {% load i18n %}
 
 {% block settings %}
index 8552314..7b340be 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}\r
+{% extends "2022/base_simple.html" %}\r
 {% load i18n %}\r
 \r
 {% block settings %}\r
 {% load i18n %}\r
 \r
 {% block settings %}\r
index 051a82a..eb2f5d2 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}\r
+{% extends "2022/base_simple.html" %}\r
 {% load i18n %}\r
 \r
 {% block settings %}\r
 {% load i18n %}\r
 \r
 {% block settings %}\r
index f1e606d..ada00b3 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 
 {% block body %}
 
 
 {% block body %}
 
index 789042d..a32d25a 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 
 {% block body %}
 
 
 {% block body %}
 
diff --git a/src/newsletter/templates/newsletter/confirm_subscription.html b/src/newsletter/templates/newsletter/confirm_subscription.html
deleted file mode 100644 (file)
index 401789e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-
-{% block body %}
-  <h1>{{ page_title }}</h1>
-  <p>{% trans "Your subscription to Wolne Lektury newsletter is confirmed. Thank you!" %}</p>
-{% endblock %}
\ No newline at end of file
diff --git a/src/newsletter/templates/newsletter/subscribe_form.html b/src/newsletter/templates/newsletter/subscribe_form.html
deleted file mode 100644 (file)
index 6d9f3bc..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load honeypot %}
-{% load ajaxable_tags %}
-
-{% block body %}
-  <h1>{{ page_title }}</h1>
-  <form id="subscribe-form" action="" method="post" accept-charset="utf-8" class="cuteform">
-    {% csrf_token %}
-    {% render_honeypot_field %}
-    <ol>
-      <li>{{ form.email|pretty_field }}</li>
-      <li><span class="helptext">{{ form.data_processing }}</span></li>
-      <li><input type="submit" value="{% trans "Subscribe" %}"/></li>
-    </ol>
-  </form>
-{% endblock %}
diff --git a/src/newsletter/templates/newsletter/subscribed.html b/src/newsletter/templates/newsletter/subscribed.html
deleted file mode 100644 (file)
index a053f62..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-
-{% block body %}
-  <h1>{{ page_title }}</h1>
-  <p>
-    {% trans "You have subscribed to Wolne Lektury newsletter." %}
-  </p>
-{% endblock %}
\ No newline at end of file
index 3c63553..cfa394b 100644 (file)
@@ -11,7 +11,6 @@ from newsletter.forms import SubscribeForm, Newsletter
 
 def subscribe_form(request, slug=''):
     newsletter = get_object_or_404(Newsletter, slug=slug)
 
 def subscribe_form(request, slug=''):
     newsletter = get_object_or_404(Newsletter, slug=slug)
-    new_layout = request.EXPERIMENTS['layout'].value
     if request.POST:
         form = SubscribeForm(newsletter, request.POST)
         if form.is_valid():
     if request.POST:
         form = SubscribeForm(newsletter, request.POST)
         if form.is_valid():
@@ -20,10 +19,7 @@ def subscribe_form(request, slug=''):
     else:
         form = SubscribeForm(newsletter)
 
     else:
         form = SubscribeForm(newsletter)
 
-    if new_layout:
-        template_name = 'newsletter/2022/subscribe_form.html'
-    else:
-        template_name = 'newsletter/subscribe_form.html'
+    template_name = 'newsletter/2022/subscribe_form.html'
     return render(request, template_name, {
         'page_title': newsletter.page_title,
         'form': form,
     return render(request, template_name, {
         'page_title': newsletter.page_title,
         'form': form,
@@ -31,11 +27,7 @@ def subscribe_form(request, slug=''):
 
 
 def subscribed(request):
 
 
 def subscribed(request):
-    new_layout = request.EXPERIMENTS['layout'].value
-    if new_layout:
-        template_name = 'newsletter/2022/subscribed.html'
-    else:
-        template_name = 'newsletter/subscribed.html'
+    template_name = 'newsletter/2022/subscribed.html'
     return render(request, template_name, {
         'page_title': _('Subscribed'),
     })
     return render(request, template_name, {
         'page_title': _('Subscribed'),
     })
diff --git a/src/paypal/forms.py b/src/paypal/forms.py
deleted file mode 100644 (file)
index cadea3f..0000000
+++ /dev/null
@@ -1,9 +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 forms
-from django.utils.translation import gettext_lazy as _
-
-
-class PaypalSubscriptionForm(forms.Form):
-    amount = forms.IntegerField(min_value=5, max_value=30000, initial=20, label=_('amount in PLN'))
index 9236051..eb73f33 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 
 {% block body %}
 {% load i18n %}
 
 {% block body %}
diff --git a/src/paypal/templates/paypal/error.html b/src/paypal/templates/paypal/error.html
deleted file mode 100644 (file)
index 6214e90..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{% load i18n %}
-<h1>{% trans "PayPal Error" %}: {{ error.message }}</h1>
-{% for detail in error.details %}
-  <p>{{ detail.field }}: {{ detail.issue }}</p>
-{% endfor %}
-<p><a href="{{ error.information_link }}">{% trans "Learn more" %}</a></p>
\ No newline at end of file
diff --git a/src/paypal/templates/paypal/error_page.html b/src/paypal/templates/paypal/error_page.html
deleted file mode 100644 (file)
index 499ae1d..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-{% extends "base/base.html" %}
-
-{% block body %}
-  {% include "paypal/error.html" %}
-{% endblock %}
\ No newline at end of file
diff --git a/src/paypal/templates/paypal/form.html b/src/paypal/templates/paypal/form.html
deleted file mode 100644 (file)
index 92a755a..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load chunks %}
-{% load static from static %}
-
-{% block title %}{% trans "Wolne Lektury Friend Club" %}{% endblock %}
-
-{% block body %}
-  <div class="mobile-margins">
-  <h1>{% trans "Wolne Lektury Friend Club" %}</h1>
-  <p>Poniżej możesz ustawić comiesięczną płatność <strong>(co najmniej 5 zł)</strong>, aby dołączyć do Przyjaciół Wolnych Lektur.</p>
-  {# https://www.facebook.com/sharer/sharer.php?u=https%3A//wolnelektury.pl{% url 'paypal_form' %} #}
-  {% if user.is_authenticated %}
-    <form method="post">
-      {% csrf_token %}
-      {{ form.amount.label_tag }}{{ form.amount }}
-      {# paypal submit button #}
-      <input type="image" src="{% static 'img/btn_subscribe_LG_pl.gif' %}" alt="{% trans "Subscribe with PayPal" %}" style="margin-left: 2em; vertical-align: bottom;">
-    </form>
-  {% else %}
-    {% trans "You must be logged in to subscribe." %}
-  {% endif %}
-  {% chunk "klub_info" %}
-  </div>
-{% endblock %}
diff --git a/src/paypal/templates/paypal/return.html b/src/paypal/templates/paypal/return.html
deleted file mode 100644 (file)
index 7c6d576..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-
-{% block body %}
-  {% if resource.error %}
-    {% include "paypal/error.html" with error=resource.error %}
-  {% else %}
-    <p>{% trans "Dziękujemy, że jesteś z nami i pomagasz nam rozwijać Wolne Lektury!" %}</p>
-    <p>{% trans "Pamiętaj, że zawsze możesz się z nami skontaktować:" %} <a href="mailto:wolnelektury@nowoczesnapolska.org.pl">wolnelektury@nowoczesnapolska.org.pl</a></p>
-
-    <p>{% trans "Do przeczytania!" %}<br>{% trans "Zespół Wolnych Lektur" %}</p>
-  {% endif %}
-{% endblock %}
\ No newline at end of file
index b5640c4..7d7eea5 100644 (file)
@@ -10,28 +10,10 @@ from django.shortcuts import get_object_or_404, render, redirect
 
 from api.utils import HttpResponseAppRedirect
 from club.models import Schedule
 
 from api.utils import HttpResponseAppRedirect
 from club.models import Schedule
-from paypal.forms import PaypalSubscriptionForm
-from paypal.rest import execute_agreement, check_agreement, agreement_approval_url, PaypalError
+from paypal.rest import execute_agreement, check_agreement, agreement_approval_url
 from paypal.models import BillingAgreement, BillingPlan
 
 
 from paypal.models import BillingAgreement, BillingPlan
 
 
-def paypal_form(request, app=False):
-    if request.POST:
-        if not request.user.is_authenticated:
-            return HttpResponseForbidden()
-        form = PaypalSubscriptionForm(data=request.POST)
-        if form.is_valid():
-            amount = form.cleaned_data['amount']
-            try:
-                approval_url = agreement_approval_url(amount, app=app)
-            except PaypalError as e:
-                return render(request, 'paypal/error_page.html', {'error': str(e)})
-            return HttpResponseRedirect(approval_url)
-    else:
-        form = PaypalSubscriptionForm()
-    return render(request, 'paypal/form.html', {'form': form})
-
-
 def paypal_init(request, key):
     schedule = get_object_or_404(Schedule, key=key)
     schedule.method = 'paypal'
 def paypal_init(request, key):
     schedule = get_object_or_404(Schedule, key=key)
     schedule.method = 'paypal'
diff --git a/src/pdcounter/templates/pdcounter/author_detail.html b/src/pdcounter/templates/pdcounter/author_detail.html
deleted file mode 100644 (file)
index 2c346ba..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load time_tags %}
-
-{% block titleextra %}{{ author.name }}{% endblock %}
-
-{% block metadescription %}{% trans "Public domain counter" %}: {{author.name}}.{% endblock %}
-
-{% block bodyid %}author-detail{% endblock %}
-
-{% block body %}
-  <div class="left-column">
-    <h1>{{ author.name }}</h1>
-    <div class="normal-text white-box">
-      {% if author.has_description %}
-        <div id="description">
-          <div id='description-long'>{{ author.description|safe }}</div>
-          <div id='description-short'>{{ author.description|safe|truncatewords_html:30 }}</div>
-        </div>
-        <div class="clearboth"></div>
-        <div id="toggle-description"><p></p></div>
-      {% endif %}
-      {% if author.wiki_link %}
-        <p>
-          <a href="{{ author.wiki_link }}">
-            {% trans "Read article about this author on Wikipedia" %}
-          </a>
-        </p>
-      {% endif %}
-
-      {% if author.alive %}
-        <p>
-          {% trans "This author's works are copyrighted." %}
-          {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this author's works." %}
-        </p>
-      {% else %}
-        {% if author.in_pd %}
-          <p>{% trans "This author's works are in public domain, but they were not yet published on Internet library of Wolne Lektury." %}</p>
-        {% else %}
-          <div>
-            <p>
-              {% trans "This author's works will become part of public domain and will be allowed to be published without restrictions in" %}
-            </p>
-            <div class='countdown' data-until='{{ pd_counter|date_to_utc|utc_for_js }}'></div>
-            <p>
-              {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this author's works." %}
-            </p>
-          </div>
-        {% endif %}
-      {% endif %}
-      {% include "info/join_us.html" %}
-    </div>
-  </div>
-
-  <div class="right-column block-form">
-    {% include "publishing_suggest.html" %}
-  </div>
-{% endblock %}
diff --git a/src/pdcounter/templates/pdcounter/book_stub_detail.html b/src/pdcounter/templates/pdcounter/book_stub_detail.html
deleted file mode 100644 (file)
index db1a299..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load time_tags %}
-
-{% block titleextra %}{{ book.title }}{% endblock %}
-
-{% block metadescription %}{% trans "Public domain counter" %}: {{ book.title }}.{% endblock %}
-
-{% block bodyid %}book-stub-detail{% endblock %}
-
-{% block body %}
-  <div class="left-column">
-    <h1>{{ book.author }}, {{ book.title }}</h1>
-    <div class="normal-text white-box">
-      {% if book.in_pd %}
-        <p>{% trans "This work is in public domain and will be published on Internet library of Wolne Lektury soon." %}</p>
-      {% else %}
-        {% if book.pd %}
-          <p>
-            {% trans "This work will become part of public domain and will be allowed to be published without restrictions in" %}
-          </p>
-          <div class='countdown' data-until='{{ pd_counter|date_to_utc|utc_for_js }}'></div>
-          <p>
-            {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this work." %}
-          </p>
-        {% else %}
-          <p>
-            {% trans "This work is copyrighted." %}
-            {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this work." %}
-          </p>
-        {% endif %}
-      {% endif %}
-      {% include "info/join_us.html" %}
-    </div>
-  </div>
-
-  <div class="right-column block-form">
-    {% include "publishing_suggest.html" %}
-  </div>
-{% endblock %}
diff --git a/src/pdcounter/templates/pdcounter/pd_author_box.html b/src/pdcounter/templates/pdcounter/pd_author_box.html
deleted file mode 100644 (file)
index 8a71fad..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{% spaceless %}
-  {% load i18n %}
-  {% load catalogue_tags %}
-
-  <div class="white-box normal-text">
-    <h2><a href="{{ author.get_absolute_url }}">{{ author.name }}</a></h2>
-    {% if author.alive %}
-      <p>
-        {% trans "This author's works are copyrighted." %}
-        {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this author's works." %}
-      </p>
-    {% else %}
-      {% if author.in_pd %}
-        <p>{% trans "This author's works are in public domain, but they were not yet published on Internet library of Wolne Lektury." %}</p>
-      {% else %}
-        <div>
-          <p>
-            {% trans "This author's works will become part of public domain and will be allowed to be published without restrictions in the year" %} {{ author.goes_to_pd }}.
-          </p>
-          <p>
-            {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this author's works." %}
-          </p>
-        </div>
-      {% endif %}
-    {% endif %}
-  </div>
-{% endspaceless %}
index 753c9e4..e66254b 100644 (file)
@@ -18,10 +18,7 @@ def book_stub_detail(request, slug):
 
     form = PublishingSuggestForm(initial={"books": "%s — %s, \n" % (book.author, book.title)})
 
 
     form = PublishingSuggestForm(initial={"books": "%s — %s, \n" % (book.author, book.title)})
 
-    if request.EXPERIMENTS['layout'].value:
-        template_name = 'pdcounter/2022/book_detail.html'
-    else:
-        template_name = 'pdcounter/book_stub_detail.html'
+    template_name = 'pdcounter/2022/book_detail.html'
 
     return render(request, template_name, {
         'book': book,
 
     return render(request, template_name, {
         'book': book,
@@ -40,10 +37,7 @@ def author_detail(request, slug):
 
     form = PublishingSuggestForm(initial={"books": author.name + ", \n"})
 
 
     form = PublishingSuggestForm(initial={"books": author.name + ", \n"})
 
-    if request.EXPERIMENTS['layout'].value:
-        template_name = 'pdcounter/2022/author_detail.html'
-    else:
-        template_name = 'pdcounter/author_detail.html'
+    template_name = 'pdcounter/2022/author_detail.html'
 
     return render(request, template_name, {
         'author': author,
 
     return render(request, template_name, {
         'author': author,
index 2dadd0c..b2f1f9e 100644 (file)
@@ -57,19 +57,6 @@ class PictureArea(models.Model):
     def get_area_json(self):
         return json.loads(self.area)
 
     def get_area_json(self):
         return json.loads(self.area)
 
-    @cached_render('picture/picturearea_short.html')
-    def midi_box(self):
-        themes = self.tags.filter(category='theme')
-        things = self.tags.filter(category='thing')
-        return {
-            'area': self,
-            'theme': themes[0] if themes else None,
-            'thing': things[0] if things else None,
-        }
-
-    def clear_cache(self):
-        clear_cached_renders(self.midi_box)
-
 
 class Picture(models.Model):
     """
 
 class Picture(models.Model):
     """
@@ -363,16 +350,9 @@ class Picture(models.Model):
             'picture': self,
         }
 
             'picture': self,
         }
 
-    @cached_render('picture/picture_short.html')
-    def midi_box(self):
-        return {
-            'picture': self,
-        }
-
     def related_themes(self):
         return catalogue.models.Tag.objects.usage_for_queryset(
             self.areas.all(), counts=True).filter(category__in=('theme', 'thing'))
 
     def clear_cache(self):
         clear_cached_renders(self.mini_box)
     def related_themes(self):
         return catalogue.models.Tag.objects.usage_for_queryset(
             self.areas.all(), counts=True).filter(category__in=('theme', 'thing'))
 
     def clear_cache(self):
         clear_cached_renders(self.mini_box)
-        clear_cached_renders(self.midi_box)
diff --git a/src/picture/templates/picture/collection.html b/src/picture/templates/picture/collection.html
deleted file mode 100644 (file)
index 3c48fa1..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-{% extends "picture/picture_list_thumb.html" %}
-{% load i18n %}
-
-{% block titleextra %}{{ context.collection.title }}{% endblock %}
-
-{% block book_list_header %}{{ context.collection.title }}{% endblock %}
-
-{% block book_list_info %}
-  {{ context.collection.description|safe }}
-{% endblock %}
diff --git a/src/picture/templates/picture/picture_detail.html b/src/picture/templates/picture/picture_detail.html
deleted file mode 100644 (file)
index 6505c48..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load picture_tags catalogue_tags pagination_tags %}
-{% load thumbnail %}
-{% load build_absolute_uri from fnp_common %}
-
-
-{% block ogimage %}{% thumbnail picture.image_file "535" upscale="false" as thumb %}{{ thumb.url|build_absolute_uri:request }}{% endthumbnail %}{% endblock %}
-
-
-{% block titleextra %}{{ picture.title }}{% endblock %}
-
-{% block bodyid %}picture-detail{% endblock %}
-
-{% block body %}
-  {% picture_wide picture %}
-  {% spaceless %}
-    <section class="see-also">
-      <h1>{% trans "See also" %}:</h1>
-      {% related_books picture %}
-    </section>
-  {% endspaceless %}
-{% endblock %}
diff --git a/src/picture/templates/picture/picture_list_thumb.html b/src/picture/templates/picture/picture_list_thumb.html
deleted file mode 100644 (file)
index 9fc4eb9..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load catalogue_tags %}
-{% load static %}
-{% load chunk from chunks %}
-
-{% block bodyid %}picture-list{% endblock %}
-
-{% block titleextra %}{% trans "Listing of all works" context "gallery" %}{% endblock %}
-
-
-{% block body %}
-  <h1>{% block book_list_header %}{% trans "Listing of all works" context "gallery" %}{% endblock %}</h1>
-
-  <div class="left-column">
-    <div class="normal-text">
-      {% block book_list_info %}
-        {% chunk 'picture-list' %}
-      {% endblock %}
-    </div>
-  </div>
-
-  <div class='clearboth'></div>
-
-  {% work_list picture_list %}
-{% endblock %}
diff --git a/src/picture/templates/picture/picture_searched.html b/src/picture/templates/picture/picture_searched.html
deleted file mode 100644 (file)
index fb278be..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends "picture/picture_short.html" %}
-{% load picture_tags %}
-
-{% block right-column %}
-  <div class="picture-right-column">
-    {% for hit in result.hits %}
-      <div class="area-hit">
-        <p>{{ hit.themes|join:", " }}</p>
-        {% if hit.area %}
-          <a href="{% url 'picture_viewer' hit.area.picture.slug %}">
-            <img src="{% area_thumbnail_url hit.area "100x100" %}"/>
-          </a>
-        {% endif %}
-      </div>
-    {% endfor %}
-  </div>
-{% endblock %}
diff --git a/src/picture/templates/picture/picture_wide.html b/src/picture/templates/picture/picture_wide.html
deleted file mode 100644 (file)
index 884b46c..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-{% extends "picture/picture_short.html" %}
-{% load i18n %}
-{% load picture_tags thumbnail %}
-
-
-{% block box-class %}book-wide-box{% endblock %}
-
-{% block picture-view %}
-  <a href="{{ main_link }}">
-    {% thumbnail picture.image_file "535" upscale=0 as thumb %}
-      <img class="cover" src="{{thumb.url}}"/>
-    {% endthumbnail %}
-  </a>
-{% endblock %}
-
-
-{% block extra_categories %}
-  {% with extra_info=picture.get_extra_info_json %}
-  {% if extra_info.styles %}
-    <span class="category">
-      <span class="mono"> {% trans "Style" %}:</span>&nbsp;<span class="book-box-tag">
-        {% for tag in extra_info.styles %}
-          <a>{{ tag }}</a>
-          {% if not forloop.last %}<span>, </span>{% endif %}
-        {% endfor %}
-      </span>
-    </span>
-  {% endif %}
-
-  {% if extra_info.medium %}
-    <span class="category">
-      <span class="mono"> {% trans "Medium" %}:</span>&nbsp;<span class="book-box-tag">
-        <a>{{ extra_info.medium }}</a>
-      </span>
-    </span>
-  {% endif %}
-
-  {% if extra_info.original_dimensions %}
-    <span class="category">
-      <span class="mono"> {% trans "Dimensions" %}:</span>&nbsp;<span class="book-box-tag">
-        <a>{{ extra_info.original_dimensions }}</a>
-      </span>
-    </span>
-  {% endif %}
-
-  <span class="category">
-    <span class="mono"> {% trans "Date" %}:</span>&nbsp;<span class="book-box-tag">
-      <a>{{ extra_info.created_at }}</a>
-    </span>
-  </span>
-  {% endwith %}
-{% endblock %}
-
-
-{% block book-box-extra-info %}
-  {% if themes or things%}
-    <div class="hidden-box-wrapper" id="theme-list-wrapper">
-      <p>
-        <a class="hidden-box-trigger theme-list-link" href="#">{% trans "Motifs, themes and objects" %}</a>
-      </p>
-      <div class="hidden-box">
-        {% if themes %}
-          <p>{% trans "Motifs and themes" %}</p>
-          <ul>
-            {% for theme in themes %}
-              <li><a href="{% url 'picture_viewer' picture.slug %}#theme-{{theme.slug}}">{{ theme }}</a></li>
-            {% endfor %}
-          </ul>
-        {% endif %}
-        {% if things %}
-          <p>{% trans "Objects" %}</p>
-          <ul>
-            {% for thing in things %}
-              <li><a href="{% url 'picture_viewer' picture.slug %}#object-{{thing.slug}}">{{ thing }}</a></li>
-            {% endfor %}
-          </ul>
-        {% endif %}
-      </div>
-    </div>
-  {% else %}
-    <p>&nbsp;</p>
-  {% endif %}
-{% endblock %}
-
-
-{% block right-column %}
-  {% with extra_info=picture.get_extra_info_json %}
-  <div class="right-column">
-    <div class="other-tools">
-      <h2 class="mono">{% trans "See" %}</h2>
-      <ul class="plain">
-        {% if extra_info.source_url %}
-          <li><a href="{{ extra_info.source_url }}">{% trans "Source" %}</a> {% trans "of the picture" %}</li>
-        {% endif %}
-        <li><a href="{{ picture.xml_file.url }}">{% trans "Source XML file" %}</a></li>
-        {% if extra_info.about and not hide_about %}
-          <li>{% trans "Picture on" %} <a href="{{ extra_info.about }}">{% trans "Editor's Platform" %}</a></li>
-        {% endif %}
-        {% if picture.wiki_link %}
-          <li><a href="{{ picture.wiki_link }}">{% trans "Picture description on Wikipedia" %}</a></li>
-        {% endif %}
-      </ul>
-    </div>
-  </div>
-  {% endwith %}
-{% endblock %}
diff --git a/src/picture/templates/picture/picturearea_short.html b/src/picture/templates/picture/picturearea_short.html
deleted file mode 100644 (file)
index 59aa736..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{% load i18n %}
-{% load picture_tags %}
-{% load catalogue_tags %}
-
-<div class="area">
-  <div class="area-thumbnail">
-    <a href="{% url 'picture_viewer' area.picture.slug %}{% if theme %}#theme-{{theme.slug}}{% else %}#object-{{thing.slug}}{% endif %}">
-      <img src='{% area_thumbnail_url area "100x100" %}'/>
-    </a>
-  </div>
-  {% with area.picture as picture %}
-    <div class="area-description">
-      <div class="mono source">
-        {% book_title_html picture %}
-      </div>
-    </div>
-    <div style="clear:both"></div>
-  {% endwith %}
-</div>
index 43f2775..28660b1 100644 (file)
@@ -17,17 +17,6 @@ register = template.Library()
 cropper = CustomCroppingEngine()
 
 
 cropper = CustomCroppingEngine()
 
 
-@register.inclusion_tag('picture/picture_wide.html', takes_context=True)
-def picture_wide(context, picture):
-    context.update({
-        'picture': picture,
-        'main_link': reverse('picture_viewer', args=[picture.slug]),
-        'request': context.get('request'),
-        'tags': split_tags(picture.tags),
-        })
-    return context
-
-
 @register.simple_tag()
 def area_thumbnail_url(area, geometry):
     def to_square(coords):
 @register.simple_tag()
 def area_thumbnail_url(area, geometry):
     def to_square(coords):
index 6bf513d..35f0f3d 100644 (file)
@@ -16,27 +16,24 @@ from catalogue.helpers import get_top_level_related_tags
 def picture_list_thumb(request):
     pictures = Picture.objects.all()
         
 def picture_list_thumb(request):
     pictures = Picture.objects.all()
         
-    if request.EXPERIMENTS['layout'].value:
-        related_tags = Tag.objects.usage_for_model(Picture, counts=True)
-        related_tags = sorted(related_tags, key=lambda t: -t.count)
-        suggestion_categories = Counter()
-        suggestions = []
-        for t in related_tags:
-            if suggestion_categories[t.category] < 3:
-                suggestion_categories[t.category] += 1
-                suggestions.append(t)
-                if sum(suggestion_categories.values()) == 10:
-                    break
-        template_name = 'catalogue/2022/author_detail.html'
-        return render(request, template_name, {
-            'object_list': pictures,
-            'title': 'Galeria',
-            'tags': [],
-            'suggest': suggestions,
-            'list_type': 'gallery',
-        })
-    else:
-        return render(request, template_name, {'picture_list': list(pictures)})
+    related_tags = Tag.objects.usage_for_model(Picture, counts=True)
+    related_tags = sorted(related_tags, key=lambda t: -t.count)
+    suggestion_categories = Counter()
+    suggestions = []
+    for t in related_tags:
+        if suggestion_categories[t.category] < 3:
+            suggestion_categories[t.category] += 1
+            suggestions.append(t)
+            if sum(suggestion_categories.values()) == 10:
+                break
+    template_name = 'catalogue/2022/author_detail.html'
+    return render(request, template_name, {
+        'object_list': pictures,
+        'title': 'Galeria',
+        'tags': [],
+        'suggest': suggestions,
+        'list_type': 'gallery',
+    })
 
 
 def picture_detail(request, slug):
 
 
 def picture_detail(request, slug):
@@ -44,10 +41,7 @@ def picture_detail(request, slug):
 
     theme_things = split_tags(picture.related_themes())
 
 
     theme_things = split_tags(picture.related_themes())
 
-    if request.EXPERIMENTS['layout'].value:
-        template_name = 'picture/2022/picture_detail.html'
-    else:
-        template_name = 'picture/picture_detail.html'
+    template_name = 'picture/2022/picture_detail.html'
     
     return render(request, template_name, {
         'picture': picture,
     
     return render(request, template_name, {
         'picture': picture,
index c87ea4f..61d651e 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 {% load polls_tags %}
 
 {% load i18n %}
 {% load polls_tags %}
 
index 09e6055..680a776 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 
 {% block titleextra %}{% trans "Notifications" %}{% endblock %}
 {% load i18n %}
 
 {% block titleextra %}{% trans "Notifications" %}{% endblock %}
index 3cf938a..53eb29b 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 
 {% block titleextra %}{% trans "Notifications" %}{% endblock %}
 {% load i18n %}
 
 {% block titleextra %}{% trans "Notifications" %}{% endblock %}
diff --git a/src/search/context_processors.py b/src/search/context_processors.py
deleted file mode 100644 (file)
index d5760d1..0000000
+++ /dev/null
@@ -1,9 +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.urls import reverse
-from search.forms import SearchForm
-
-
-def search_form(request):
-    return {'search_form': SearchForm(reverse('search_hint') + '?max=10', request.GET)}
index 18a5c15..48b25c6 100644 (file)
@@ -1,70 +1,7 @@
 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
 #
 # 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 forms
-from django.forms.utils import flatatt
 from django.forms.widgets import RadioSelect
 from django.forms.widgets import RadioSelect
-from django.utils.encoding import smart_str
-from django.utils.safestring import mark_safe
-from json import dumps
-
-
-class JQueryAutoCompleteWidget(forms.TextInput):
-    def __init__(self, options, *args, **kwargs):
-        self.options = dumps(options)
-        super(JQueryAutoCompleteWidget, self).__init__(*args, **kwargs)
-
-    def render_js(self, field_id, options):
-        return '$(\'#%s\').autocomplete(%s).result(autocomplete_result_handler);' % (field_id, options)
-
-    def render(self, name, value=None, attrs=None, renderer=None):
-        final_attrs = self.build_attrs(self.attrs, attrs)
-        final_attrs["name"] = name
-        if value:
-            final_attrs['value'] = smart_str(value)
-
-        if 'id' not in self.attrs:
-            final_attrs['id'] = 'id_%s' % name
-
-        html = '''<input type="text" %(attrs)s/>
-            <script type="text/javascript">//<!--
-            %(js)s//--></script>
-            ''' % {
-                'attrs': flatatt(final_attrs),
-                'js': self.render_js(final_attrs['id'], self.options),
-            }
-
-        return mark_safe(html)
-
-
-class JQueryAutoCompleteSearchWidget(JQueryAutoCompleteWidget):
-    def __init__(self, *args, **kwargs):
-        super(JQueryAutoCompleteSearchWidget, self).__init__(*args, **kwargs)
-
-    def render_js(self, field_id, options):
-        return ""
-
-
-class JQueryAutoCompleteField(forms.CharField):
-    def __init__(self, source, options=None, *args, **kwargs):
-        if options is None:
-            options = {}
-        if 'widget' not in kwargs:
-            options['source'] = source
-            kwargs['widget'] = JQueryAutoCompleteWidget(options)
-
-        super(JQueryAutoCompleteField, self).__init__(*args, **kwargs)
-
-
-class JQueryAutoCompleteSearchField(forms.CharField):
-    def __init__(self, options=None, *args, **kwargs):
-        if options is None:
-            options = {}
-        if 'widget' not in kwargs:
-            kwargs['widget'] = JQueryAutoCompleteSearchWidget(options)
-
-        super(JQueryAutoCompleteSearchField, self).__init__(*args, **kwargs)
-
 
 
 class InlineRadioWidget(RadioSelect):
 
 
 class InlineRadioWidget(RadioSelect):
index 3f6c99b..dee9c77 100644 (file)
@@ -10,24 +10,10 @@ from catalogue.constants import LANGUAGES_3TO2
 import catalogue.models
 import pdcounter.models
 import picture.models
 import catalogue.models
 import pdcounter.models
 import picture.models
-from .fields import JQueryAutoCompleteSearchField, InlineRadioWidget
+from .fields import InlineRadioWidget
 from .utils import UnaccentSearchQuery, UnaccentSearchVector
 
 
 from .utils import UnaccentSearchQuery, UnaccentSearchVector
 
 
-class SearchForm(forms.Form):
-    q = JQueryAutoCompleteSearchField(label=_('Search'))
-    # {'minChars': 2, 'selectFirst': True, 'cacheLength': 50, 'matchContains': "word"})
-
-    def __init__(self, source, *args, **kwargs):
-        kwargs['auto_id'] = False
-        super(SearchForm, self).__init__(*args, **kwargs)
-        self.fields['q'].widget.attrs['id'] = 'search'
-        self.fields['q'].widget.attrs['autocomplete'] = 'off'
-        self.fields['q'].widget.attrs['data-source'] = source
-        if 'q' not in self.data:
-            self.fields['q'].widget.attrs['placeholder'] = _('title, author, epoch, kind, genre, phrase')
-
-
 class SearchFilters(forms.Form):
     q = forms.CharField(
         required=False, widget=forms.HiddenInput(),
 class SearchFilters(forms.Form):
     q = forms.CharField(
         required=False, widget=forms.HiddenInput(),
diff --git a/src/search/templates/newsearch/search.html b/src/search/templates/newsearch/search.html
deleted file mode 100644 (file)
index 881e851..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load catalogue_tags %}
-
-{% block title %}Search{% endblock %}
-
-{% block metadescription %}{% endblock %}
-
-{% block bodyid %}newsearch{% endblock %}
-
-{% block body %}
-  <h1>Search</h1>
-  <form action="{% url 'search' %}" method="get" accept-charset="utf-8" id="search-form-x">
-    <p>
-      <input type="text" name="q" value="{{request.GET.q}}" style="width:250px; font-size: 1.2em;"/>
-      <input type="submit" value="{% trans "Search" %}" />
-      <br />
-      <input type="checkbox" value="true" name="fuzzy" {% if fuzzy %}checked{% endif %}/> fuzzy.
-    </p>
-  </form>
-  {% if did_you_mean %}
-    Czy miałeś na mysli <a href="?q={{did_you_mean|urlencode}}">{{did_you_mean}}</a>?
-  {% endif %}
-
-  <div id="results">
-    <ol>
-      {% for result in results %}
-        <li>
-          <p>
-            <a href="{{result.book.get_absolute_url}}">{{result.book.pretty_title}}</a>
-            (id: {{result.book_id}}, score: {{result.score}})
-          </p>
-          <ul>
-            {% for snip in hit.snippets %}
-              <li>
-                {{snip|safe}}<br/>
-              </li>
-            {% endfor %}
-
-            {% for part in result.parts %}
-              {% if part.header %}
-                <li>W {{part.header}} nr {{part.position}}</li>
-              {% else %}
-                {% if part.fragment %}
-                  <li>
-                    <div style="">Tagi/Motywy: {% for tag in part.fragment.tags %}{{tag.name}} {% endfor %}</div>
-                    {{part.fragment.short_html|safe}}
-                  </li>
-                {% endif %}
-              {% endif %}
-            {% endfor %}
-          </ul>
-        </li>
-      {% empty %}
-        <p>No results.</p>
-      {% endfor %}
-    </ol>
-  </div>
-{% endblock %}
diff --git a/src/search/templatetags/__init__.py b/src/search/templatetags/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/search/templatetags/search_tags.py b/src/search/templatetags/search_tags.py
deleted file mode 100644 (file)
index 8d0b74b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
-#
-import re
-from django import template
-
-register = template.Library()
-
-
-@register.inclusion_tag('catalogue/book_searched.html', takes_context=True)
-def book_searched(context, result):
-    # We don't need hits which lead to sections but do not have
-    # snippets.
-    hits = [(idx, h)
-            for (idx, h) in enumerate(result.hits)
-            if result.snippets[idx] is not None or ('fragment' in h and h['themes_hit'])]
-
-    for (idx, hit) in hits:
-        # currently we generate one snipper per hit though.
-        if len(result.snippets) <= idx:
-            break
-        if result.snippets[idx] is None:
-            continue
-        snip = result.snippets[idx]
-        # fix some formattting
-        snip = re.sub(r"[ \t\n]*\n[ \t\n]*", "\n", snip)
-        snip = re.sub(r"(^[ \t\n]+|[ \t\n]+$)", "", snip)
-
-        snip = snip.replace("\n", "<br />").replace('---', '&mdash;')
-        hit['snippet'] = snip
-
-    return {
-        'request': context['request'],
-        'book': result.book,
-        'hits':  list(zip(*hits))[1] if hits else []
-    }
diff --git a/src/search/templatetags/set_get_parameter.py b/src/search/templatetags/set_get_parameter.py
deleted file mode 100644 (file)
index 36e2245..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
-#
-from re import split
-
-from django import template
-
-register = template.Library()
-
-
-"""
-In template:
-    {% set_get_paramater param1='const_value',param2=,param3=variable %}
-results with changes to query string:
-    param1 is set to `const_value' string
-    param2 is unset, if exists,
-    param3 is set to the value of variable in context
-
-Using 'django.core.context_processors.request' is required.
-
-"""
-
-
-class SetGetParameter(template.Node):
-    def __init__(self, values):
-        self.values = values
-        
-    def render(self, context):
-        request = template.Variable('request').resolve(context)
-        params = request.GET.copy()
-        for key, value in self.values.items():
-            if value == '':
-                if key in params:
-                    del(params[key])
-            else:
-                params[key] = template.Variable(value).resolve(context)
-        return '?%s' %  params.urlencode()
-
-
-@register.tag
-def set_get_parameter(parser, token):
-    parts = split(r'\s+', token.contents, 2)
-
-    values = {}
-    for pair in parts[1].split(','):
-        s = pair.split('=')
-        values[s[0]] = s[1]
-
-    return SetGetParameter(values)
index f7953c3..d6edd51 100644 (file)
@@ -132,6 +132,14 @@ def hint(request, mozhint=False, param='term'):
             [
                 item['label']
                 for item in data
             [
                 item['label']
                 for item in data
+            ],
+            [
+                item.get('author', '')
+                for item in data
+            ],
+            [
+                item['url']
+                for item in data
             ]
         ]
 
             ]
         ]
 
diff --git a/src/social/templates/social/carousel.html b/src/social/templates/social/carousel.html
deleted file mode 100644 (file)
index 4a1f88c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-{% spaceless %}
-
-<div class="carousel carousel-{{ carousel.placement }}"
-     data-cycle-slides="section"
-     data-cycle-pause-on-hover="true"
-     >
-
-  {% if banners|length > 1 %}
-    <div class="cycle-prev"></div>
-    <div class="cycle-next"></div>
-    <div class="cycle-pager"></div>
-  {% endif %}
-
-  {% for banner in banners %}
-    {% if banner %}
-      {{ banner.main_box }}
-    {% endif %}
-  {% endfor %}
-</div>
-
-{% endspaceless %}
diff --git a/src/social/templates/social/cite_info.html b/src/social/templates/social/cite_info.html
deleted file mode 100644 (file)
index 1f75c18..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-{% spaceless %}
-  {% if cite.image %}
-    {% if cite.image_link %}<a href="{{ cite.image_link }}">{% endif %}
-    {% if cite.image_title %}
-      {{ cite.image_title }}{% else %}
-      untitled{% endif %}{% if cite.image_link %}</a>{% endif %}{% if cite.image_author %},
-      {{ cite.image_author }}{% endif %}{% if cite.image_license %},
-      {% if cite.image_license_link %}<a href="{{ cite.image_license_link }}">{% endif %}
-      {{ cite.image_license }}
-      {% if cite.image_license_link %}</a>{% endif %}
-    {% endif %}
-  {% else %}
-    <a href="http://www.flickr.com/photos/lou/430980641/">books about architecture</a>,
-    saikofish@Flickr,
-    <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">CC BY NC SA</a>.
-  {% endif %}
-{% endspaceless %}
diff --git a/src/social/templates/social/my_shelf.html b/src/social/templates/social/my_shelf.html
deleted file mode 100644 (file)
index 1405512..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends "base/base.html" %}
-{% load i18n %}
-{% load catalogue_tags %}
-
-{% block titleextra %}{% trans "My shelf" %}{% endblock %}
-
-{% block logout %}/{% endblock %}
-
-{% block body %}
-  <h1>{% trans "My shelf" %}</h1>
-
-  {% work_list books %}
-
-  {% if not books %}
-    {% trans "Add works to your shelf by clicking on the star on the page of the work. The work will then show up on My shelf page." %}
-  {% endif %}
-{% endblock %}
diff --git a/src/social/templates/social/sets_form.html b/src/social/templates/social/sets_form.html
deleted file mode 100644 (file)
index a003f67..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{% load i18n %}
-<h1>{{ title }}</h1>
-
-<form action="{% url 'social_unlike_book' view_kwargs.slug %}" method="post" accept-charset="utf-8"
-      class="cuteform{% if placeholdize %} hidelabels{% endif %}">
-  {% csrf_token %}
-  <input type="submit" value="{% trans "Remove from my shelf" %}"/>
-</form>
-
-<form action="{{ request.get_full_path }}" method="post" accept-charset="utf-8"
-      class="cuteform{% if placeholdize %} hidelabels{% endif %}">
-  {% csrf_token %}
-  <ol>
-    <div id="id___all__"></div>
-    {{ form.as_ul }}
-    <li><input type="submit" value="{{ submit }}"/></li>
-  </ol>
-</form>
index 4dda18d..81a69e0 100644 (file)
@@ -51,40 +51,6 @@ def book_shelf_tags(context, book_id):
     return lazy(get_value, str)()
 
 
     return lazy(get_value, str)()
 
 
-@register.inclusion_tag('social/carousel.html', takes_context=True)
-def carousel(context, placement):
-    carousel = Carousel.get(placement)
-    banners = [
-            item.get_banner()
-            for item in carousel.carouselitem_set.all().select_related('banner')
-            ]
-
-    request = context['request']
-    if 'banner' in request.GET:
-        try:
-            banner_id = int(request.GET['banner'])
-        except (TypeError, ValueError):
-            pass
-        else:
-            try:
-                index = [b.pk for b in banners].index(banner_id)
-            except ValueError:
-                if request.user.is_staff:
-                    # Staff is allowed to preview any banner.
-                    try:
-                        banners.insert(0, Cite.objects.get(pk=banner_id))
-                    except Cite.DoesNotExist:
-                        pass
-            else:
-                # Put selected banner to front.
-                banners = [banners[index]] + banners[:index] + banners[index+1:]
-
-    return {
-        'carousel': carousel,
-        'banners': banners,
-    }
-
-
 @register.inclusion_tag('social/carousel_2022.html', takes_context=True)
 def carousel_2022(context, placement):
     banners = Carousel.get(placement).carouselitem_set.all()#first().get_banner()
 @register.inclusion_tag('social/carousel_2022.html', takes_context=True)
 def carousel_2022(context, placement):
     banners = Carousel.get(placement).carouselitem_set.all()#first().get_banner()
index dc34fb6..543bbf3 100644 (file)
@@ -12,7 +12,6 @@ urlpatterns = [
     path('usun-tag/', views.RemoveSetView.as_view(), name='social_remove_set_tag'),
     path('moje-tagi/', views.my_tags, name='social_my_tags'),
     path('lektura/<slug:slug>/nie_lubie/', views.unlike_book, name='social_unlike_book'),
     path('usun-tag/', views.RemoveSetView.as_view(), name='social_remove_set_tag'),
     path('moje-tagi/', views.my_tags, name='social_my_tags'),
     path('lektura/<slug:slug>/nie_lubie/', views.unlike_book, name='social_unlike_book'),
-    path('lektura/<slug:slug>/polki/', never_cache(views.ObjectSetsFormView()), name='social_book_sets'),
     path('polka/', views.my_shelf, name='social_my_shelf'),
     path('ulubione/', views.my_liked),
 ]
     path('polka/', views.my_shelf, name='social_my_shelf'),
     path('ulubione/', views.my_liked),
 ]
index cff7c8e..9087d7b 100644 (file)
@@ -8,8 +8,6 @@ from django.views.decorators.cache import never_cache
 from django.views.decorators.http import require_POST
 from django.views.generic.edit import FormView
 
 from django.views.decorators.http import require_POST
 from django.views.generic.edit import FormView
 
-from ajaxable.utils import AjaxableFormView
-
 from catalogue.models import Book, Tag
 import catalogue.models.tag
 from social import forms
 from catalogue.models import Book, Tag
 import catalogue.models.tag
 from social import forms
@@ -68,11 +66,7 @@ def unlike_book(request, slug):
 
 @login_required
 def my_shelf(request):
 
 @login_required
 def my_shelf(request):
-    if request.EXPERIMENTS['layout'].value:
-        template_name = 'social/2022/my_shelf.html'
-    else:
-        template_name = 'social/my_shelf.html'
-
+    template_name = 'social/2022/my_shelf.html'
     tags = list(request.user.tag_set.all())
     suggest = [t for t in tags if t.name]
     print(suggest)
     tags = list(request.user.tag_set.all())
     suggest = [t for t in tags if t.name]
     print(suggest)
@@ -131,20 +125,3 @@ def my_tags(request):
             t.name for t in tags
         ], safe=False
     )
             t.name for t in tags
         ], safe=False
     )
-
-
-class ObjectSetsFormView(AjaxableFormView):
-    form_class = forms.ObjectSetsForm
-    placeholdize = True
-    template = 'social/sets_form.html'
-    ajax_redirect = True
-    POST_login = True
-
-    def get_object(self, request, slug):
-        return get_object_or_404(Book, slug=slug)
-
-    def context_description(self, request, obj):
-        return obj.pretty_title()
-
-    def form_args(self, request, obj):
-        return (obj, request.user), {}
index ed6867e..1b365b1 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 
 {% block settings %}
   {% load title %}
 
 {% block settings %}
   {% load title %}
index 43ad403..2ccabde 100644 (file)
@@ -1,17 +1,7 @@
 {% extends "ajaxable/form.html" %}
 {% load i18n %}
 {% extends "ajaxable/form.html" %}
 {% load i18n %}
-{% load ajaxable_tags %}
 
 
-{% block form_fields %}
-{{ form.contact|pretty_field }}
-  <li>{% trans "I'd like to find in WolneLektury.pl these…" %}</li>
-  {{ form.books|pretty_field }}
-  {{ form.ebook|pretty_checkbox }}
-  {{ form.audiobook|pretty_checkbox }}
-  {{ form.agree_newsletter|pretty_checkbox }}
-  <li><span class="helptext">{{ form.data_processing }}</span></li>
-{% endblock %}
 
 {% block extra %}
   <p>{% trans "Remember that we can only publish books in public domain, ie. 70 years after the death of the author!" %}</p>
 
 {% block extra %}
   <p>{% trans "Remember that we can only publish books in public domain, ie. 70 years after the death of the author!" %}</p>
-{% endblock %}
\ No newline at end of file
+{% endblock %}
index ddf0bf8..4bdf2b6 100644 (file)
@@ -1,9 +1 @@
 {% extends "ajaxable/form.html" %}
 {% extends "ajaxable/form.html" %}
-{% load ajaxable_tags %}
-
-{% block form_fields %}
-  {{ form.contact|pretty_field }}
-  {{ form.description|pretty_field }}
-  {{ form.agree_newsletter|pretty_checkbox }}
-  <li><span class="helptext">{{ form.data_processing }}</span></li>
-{% endblock %}
\ No newline at end of file
index d482499..b150b99 100644 (file)
@@ -6,7 +6,7 @@ AUTHENTICATION_BACKENDS = [
     # 'allauth.account.auth_backends.AuthenticationBackend',
 ]
 ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 2
     # 'allauth.account.auth_backends.AuthenticationBackend',
 ]
 ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 2
-LOGIN_URL = '/uzytkownik/zaloguj-utworz/'
+LOGIN_URL = '/uzytkownik/login/'
 
 LOGIN_REDIRECT_URL = '/'
 
 
 LOGIN_REDIRECT_URL = '/'
 
index 29c882b..95d2b1a 100644 (file)
@@ -50,7 +50,6 @@ TEMPLATES = [{
             'django.template.context_processors.media',
             'django.template.context_processors.request',
             'wolnelektury.context_processors.extra_settings',
             'django.template.context_processors.media',
             'django.template.context_processors.request',
             'wolnelektury.context_processors.extra_settings',
-            'search.context_processors.search_form',
         ),
     },
 }]
         ),
     },
 }]
index 696a5fb..d231b40 100644 (file)
         window.location.reload(true);
     });
 
         window.location.reload(true);
     });
 
+    $('.c-lang').on('click', function() {
+        !$(this).toggleClass('is-open');
+    });
+
+
+
+
+
+    $(".c-media__settings > i").on('click', function() {
+        $(".c-media__settings").toggleClass('active');
+    });
 
 })();
 
 })();
index 7ca9114..ef5d7bc 100644 (file)
@@ -1,11 +1,18 @@
 .c-lang {
   position: absolute;
 .c-lang {
   position: absolute;
-  top: 23px;
-  margin-right: 217px;
+  top: 11px;
+
+  width: 150px;
+  right: 50px + 16px;
   opacity: 0;
   pointer-events: none;
   transition: opacity 350ms $ease-out;
   z-index: $master-layer + 1;
   opacity: 0;
   pointer-events: none;
   transition: opacity 350ms $ease-out;
   z-index: $master-layer + 1;
+  display: none;
+
+  @include rwd($break-menu) {
+      display: block;
+  }
 
   &.is-open {
     .c-lang__button {
 
   &.is-open {
     .c-lang__button {
   opacity: 0;
   transition: all 350ms $ease-out;
   pointer-events: none;
   opacity: 0;
   transition: all 350ms $ease-out;
   pointer-events: none;
-  a {
+  display: flex;
+  flex-direction: column;
+
+  button {
     display: block;
     padding: 9px 20px;
     color: #474747;
     display: block;
     padding: 9px 20px;
     color: #474747;
+    background-color: transparent;
+    border: 0;
+    cursor: pointer;
+    font-family: "Source Sans Pro";
+    font-size: 16px;
+    line-height: 18.4px;
+    text-align: left;
 
     &:hover {
       background-color: #EDAA00;
 
     &:hover {
       background-color: #EDAA00;
@@ -62,4 +79,4 @@
       background-color: #EDAA00;
     }
   }
       background-color: #EDAA00;
     }
   }
-}
\ No newline at end of file
+}
index e52708b..ebeb7aa 100644 (file)
@@ -54,6 +54,7 @@
   display: flex;
   align-items: center;
   justify-content: space-between;
   display: flex;
   align-items: center;
   justify-content: space-between;
+  position: relative;
 
   .icons {}
   .content {
 
   .icons {}
   .content {
     font-size: 12px;
     line-height: 140%;
   }
     font-size: 12px;
     line-height: 140%;
   }
+
+  .c-media__settings {
+      position: absolute;
+      left: 0;
+      right: 0;
+      top: 0;
+      z-index: 5;
+      min-height: 30px;
+      overflow: hidden;
+      
+      .icon {
+          position: absolute;
+          transition: .5s rotate;
+          bottom: 0;
+          right: 0;
+          line-height: 30px;
+          width: 40px;
+          text-align: center;
+          margin: 0;
+      }
+      > div {
+          height: 0;
+          transition: .5s height;
+          overflow: hidden;
+          background: #F2F2F2;
+          border-bottom: 5px solid #D5ECED;
+          margin-top: -5px;
+          > div {
+              padding: 30px;
+          }
+      }
+      &.active {
+          .icon {
+              rotate: 180deg;
+              
+          }
+          > div {
+              height: 150px;
+          }
+      }
+  }
 }
 
 .c-media__popup {
 }
 
 .c-media__popup {
index 9333766..c4d4f7a 100644 (file)
@@ -22,6 +22,7 @@ body {
   }
   
   .l-container {
   }
   
   .l-container {
+      position: relative;
     display: flex;
     align-items: center;
     justify-content: space-between;
     display: flex;
     align-items: center;
     justify-content: space-between;
@@ -262,6 +263,10 @@ body {
                   font-size: 30px;
               }
           }
                   font-size: 30px;
               }
           }
+          .c-lang {
+              display: block;
+              left: 16px;
+          }
       }
   }
 }
       }
   }
 }
@@ -365,6 +370,9 @@ body {
     display: flex;
     flex-direction: column;
     justify-content: space-between;
     display: flex;
     flex-direction: column;
     justify-content: space-between;
+    @include rwd($break-menu) {
+        width: 60%;
+    }
     
   p {
     color: $color-white;
     
   p {
     color: $color-white;
index 06b57d8..372c941 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 
 {% block settings %}
 {% load i18n %}
 
 {% block settings %}
index e9980c9..5f9693d 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,site_base.html" %}
+{% extends "2022/base_simple.html" %}
 
 {% block body %}
   <div class="white-box normal-text">
 
 {% block body %}
   <div class="white-box normal-text">
diff --git a/src/wolnelektury/templates/auth/login.html b/src/wolnelektury/templates/auth/login.html
deleted file mode 100644 (file)
index c32df0f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{% load i18n %}
-
-<h1>{{ title }}</h1>
-
-<form action="{{ request.get_full_path }}" method="post" accept-charset="utf-8"
-      class="cuteform{% if placeholdize %} hidelabels{% endif %}">
-  {% csrf_token %}
-  <ol>
-    <div id="id_{% if form_prefix %}{{ form_prefix }}-{% endif %}__all__"></div>
-    {{ form.as_ul }}
-    <li><a href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a></li>
-    <li><input type="submit" value="{{ submit }}"/></li>
-  </ol>
-</form>
-
-{% if USE_OPENID %}
-<h1>{% trans "Sign in using:" %}</h1>
-
-<ul class="socialaccount_providers">
-  {% include "socialaccount/snippets/provider_list.html" %}
-</ul>
-
-{% include "socialaccount/snippets/login_extra.html" %}
-{% endif %}
-
-{% block extra %}
-{% endblock %}
diff --git a/src/wolnelektury/templates/auth/login_register.html b/src/wolnelektury/templates/auth/login_register.html
deleted file mode 100644 (file)
index 50e2ea0..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{% extends "auth/login.html" %}
-{% load i18n %}
-{% load honeypot %}
-
-{% block extra %}
-  {{ block.super }}
-
-  {% include "auth/register_form.html" with form=register_form title=_("or register") action_url='register' action_query=request.GET.urlencode honeypot=True submit=register_submit %}
-{% endblock %}
diff --git a/src/wolnelektury/templates/auth/register.html b/src/wolnelektury/templates/auth/register.html
deleted file mode 100644 (file)
index 6849438..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{% load i18n %}
-
-
-{% include "auth/register_form.html" %}
-
-{% if USE_OPENID %}
-  <div class="form-extra">
-    <h1>{% trans "Sign in using:" %}</h1>
-
-    <ul class="socialaccount_providers">
-      {% include "socialaccount/snippets/provider_list.html" %}
-    </ul>
-
-    {% include "socialaccount/snippets/login_extra.html" %}
-  </div>
-{% endif %}
diff --git a/src/wolnelektury/templates/auth/register_form.html b/src/wolnelektury/templates/auth/register_form.html
deleted file mode 100644 (file)
index 9f72af7..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-{% extends "ajaxable/form.html" %}
-{% load ajaxable_tags %}
-
-
-{% block form_fields %}
-  {{ form.username|pretty_field }}
-  {{ form.email|pretty_field }}
-  {{ form.password1|pretty_field }}
-  {{ form.password2|pretty_field }}
-  {{ form.agree_newsletter|pretty_checkbox }}
-  <li><span class="helptext">{{ form.data_processing }}</span></li>
-{% endblock %}
\ No newline at end of file
diff --git a/src/wolnelektury/templates/bajki.html b/src/wolnelektury/templates/bajki.html
deleted file mode 100644 (file)
index 7d65c0a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{% extends 'podcast.html' %}
-
-{% block artist_label %}Opowiada{% endblock %}
\ No newline at end of file
diff --git a/src/wolnelektury/templates/base/app.html b/src/wolnelektury/templates/base/app.html
deleted file mode 100644 (file)
index e10b689..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-<!DOCTYPE html>
-{% spaceless %}
-  <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
-    {% load pipeline i18n %}
-    {% load static %}
-    {% load piwik_tags %}
-    {% get_current_language as LANGUAGE_CODE %}
-    <head>
-      <meta charset="utf-8">
-      <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-      <meta name="application-name" content="Wolne Lektury" />
-      <meta property="og:site_name" content="Wolne Lektury" />
-      <meta property="og:title" content="{% block ogtitle %}{{ page_title }}{% endblock %}" />
-      <meta property="og:type" content="{% block ogtype %}website{% endblock %}" />
-      <meta property="og:image" content="{% block ogimage %}{{ FULL_STATIC_URL }}img/wiatrak.jpg{% endblock %}" />
-      <meta name="description" content="{% block metadescription %}Darmowe, opracowane, pełne teksty lektur, e-booki, audiobooki i pliki DAISY na wolnej licencji.{% endblock %}" />
-      {% block ogextra %}{% endblock %}
-
-      <title>
-        {% block title %}{% block titleextra %}{{ page_title }}{% endblock %} :: {% trans "Wolne Lektury" %}{% endblock %}
-      </title>
-      <link rel="icon" href="{% static 'img/favicon.png' %}" type="image/png"/>
-      <link rel="search" type="application/opensearchdescription+xml" title="Wolne Lektury"
-            href="{% static 'opensearch.xml' %}"/>
-      <link rel="manifest" href="/manifest.json">
-      {% stylesheet "main" %}
-      {% block extrahead %}{% endblock %}
-    </head>
-    <body id="{% block bodyid %}base{% endblock %}">
-
-      {% block bodycontent %}
-
-        <div id="whole-header">
-          <div id="header-wrapper">
-            <header id="main">
-              <a href="https://wolnelektury.pl" id="logo">
-                <img src="{% static 'img/logo-neon.png' %}" alt="Wolne Lektury"/>
-              </a>
-
-              <div id="lang-menu" class="hoverget">
-                <span id='lang-button' class='hoverclick'>
-                 <img src="{% static "img/contrib/language/language.svg" %}" alt="{% trans "Language" %}">
-                  <span class="label"> {% trans "Language" %}</span>
-                </span>
-                <div id="lang-menu-items">
-                  {% for lang in LANGUAGES %}
-                    <form action="{% url 'set_language' %}" method="post">
-                      {% csrf_token %}
-                      <input type="hidden" name="language" value="{{ lang.0 }}"/>
-                      <button type="submit" lang="{{ lang.0 }}"
-                              class="{% if lang.0 == LANGUAGE_CODE %}active{% endif %}">{{ lang.1 }}</button>
-                    </form>
-                  {% endfor %}
-                </div>
-              </div>
-
-              <nav id="menu">
-                <ul id="user-info">
-                  {% if request.user.is_authenticated %}
-                    <li>
-                      <a href="{% url 'user_settings' %}">
-                        <strong>{{ request.user.username }}</strong>
-                      </a>
-                    </li>
-                    <li>
-                      <a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
-                    </li>
-                  {% endif %}
-                </ul>
-
-              </nav>
-            </header>
-          </div>
-        </div>
-
-        <div id="main-content">
-          {% block body %}
-          {% endblock %}
-          <div class="clearboth"></div>
-        </div>
-
-      {% endblock bodycontent %}
-
-      <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js" integrity="sha512-BkBgWiL0N/EFIbLZYGTgbksKG5bS6PtwnWvVk3gccv+KhtK/4wkLxCRGh+kelKiXx7Ey4jfTabLg3AEIPC7ENA==" crossorigin="anonymous"></script>
-      <script type="text/javascript">
-        var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
-        var STATIC_URL = "{{ STATIC_URL }}";
-      </script>
-      {% javascript "base" %}
-
-      {% tracking_code %}
-
-      {% block extrabody %}{% endblock %}
-
-      <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
-    </body>
-  </html>
-{% endspaceless %}
diff --git a/src/wolnelektury/templates/base/base.html b/src/wolnelektury/templates/base/base.html
deleted file mode 100644 (file)
index 600ec92..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-{% extends "base/superbase.html" %}
-
-
-{% block ogtitle %}{% block titleextra %}{{ page_title }}{% endblock %}{% endblock %}
diff --git a/src/wolnelektury/templates/base/superbase.html b/src/wolnelektury/templates/base/superbase.html
deleted file mode 100644 (file)
index 176b3c3..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-<!DOCTYPE html>
-{% spaceless %}
-  <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#" class="{% if VARIANT %}{{ VARIANT }}{% endif %}">
-    {% load pipeline i18n %}
-    {% load static %}
-    {% load catalogue_tags funding_tags reporting_stats %}
-    {% load piwik_tags %}
-    {% load cache %}
-    {% load chunk from chunks %}
-    {% load sponsor_page from sponsors %}
-    {% load annoy_banner from annoy %}
-    {% get_current_language as LANGUAGE_CODE %}
-    <head>
-      <meta charset="utf-8">
-      <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-      <meta name="application-name" content="Wolne Lektury" />
-      <meta property="og:site_name" content="Wolne Lektury" />
-      <meta property="og:title" content="{% block ogtitle %}{{ page_title }}{% endblock %}" />
-      <meta property="og:type" content="{% block ogtype %}website{% endblock %}" />
-      <meta property="og:image" content="{% block ogimage %}{{ FULL_STATIC_URL }}img/wiatrak.jpg{% endblock %}" />
-      <meta name="description" content="{% block metadescription %}Darmowe, opracowane, pełne teksty lektur, e-booki, audiobooki i pliki DAISY na wolnej licencji.{% endblock %}" />
-      {% block ogextra %}{% endblock %}
-
-      <title>
-        {% block title %}{% block titleextra %}{{ page_title }}{% endblock %} :: {% trans "Wolne Lektury" %}{% endblock %}
-      </title>
-      <link rel="icon" href="{% static 'img/favicon.png' %}" type="image/png"/>
-      <link rel="search" type="application/opensearchdescription+xml" title="Wolne Lektury"
-            href="{% static 'opensearch.xml' %}"/>
-      <link rel="manifest" href="/manifest.json">
-      {% stylesheet "main" %}
-      {% block extrahead %}{% endblock %}
-      {% tracking_code %}
-    </head>
-    <body id="{% block bodyid %}base{% endblock %}">
-      <ul id="skiplinks">
-        <li><a href="#main-content">{% trans "Go to content" %}</a></li>
-        <li><a id="skiplink-search" href="#search"">{% trans "Go to search" %}</a></li>
-        <li><a href="{% block footerlink %}#footer-wrapper{% endblock %}">{% trans "Go to page footer" %}</a></li>
-      </ul>
-
-      {% block bodycontent %}
-
-        {% block annoy %}
-          {% annoy_banner 'blackout' %}
-          {% annoy_banner 'top' %}
-          {% if not funding_no_show_current %}
-            {% cache 120 funding_top_bar LANGUAGE_CODE %}
-              {% funding_top_bar %}
-            {% endcache %}
-          {% endif %}
-        {% endblock %}
-
-        <div id="whole-header">
-          <div id="header-wrapper">
-            <header id="main">
-              <a href="/" id="logo">
-                <img src="{% static 'img/logo-neon.png' %}" alt="Wolne Lektury"/>
-              </a>
-
-              <p id="tagline">
-                {% url 'book_list' as b %}
-                {% url 'infopage' 'prawa' as r %}
-                {% count_books book_count %}
-                {% blocktrans count book_count as c %}
-                  <a href='{{ b }}'>{{ c }}</a> free reading you have <a href='{{ r }}'>right to</a>
-                {% plural %}
-                  <a href='{{ b }}'>{{ c }}</a> free readings you have <a href='{{ r }}'>right to</a>
-                {% endblocktrans %}
-              </p>
-
-              <div id="lang-menu" class="hoverget">
-                <span id='lang-button' class='hoverclick' tabindex="0">
-                  <img src="{% static "img/contrib/language/language.svg" %}" alt="">
-                  <span class="label"> {% trans "Language" %}</span>
-                </span>
-                <div id="lang-menu-items">
-                  {% for lang in LANGUAGES %}
-                    <form action="{% url 'set_language' %}" method="post">
-                      {% csrf_token %}
-                      <input type="hidden" name="language" value="{{ lang.0 }}"/>
-                      <button type="submit" lang="{{ lang.0 }}" tabindex="121"
-                              class="{% if lang.0 == LANGUAGE_CODE %}active{% endif %}">{{ lang.1 }}</button>
-                    </form>
-                  {% endfor %}
-                </div>
-              </div>
-
-              <a id="show-menu"></a>
-              <nav id="menu">
-                <ul id="user-info">
-                  {% if request.user.is_authenticated %}
-                    <li>
-                      <a href="{% url 'user_settings' %}">
-                        <strong>{{ request.user.username }}</strong>
-                      </a>
-                    </li>
-                    <li>
-                      <a href="{% url 'social_my_shelf' %}" id="user-shelves-link">{% trans "My shelf" %}</a>
-                    </li>
-                    {% if request.user.is_staff %}
-                      <li><a href="{% url 'admin:index' %}">{% trans "Administration" %}</a></li>
-                    {% endif %}
-                    <li>
-                      <a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
-                    </li>
-                  {% else %}
-                    <li>
-                      <a href="{% url 'login' %}?next={{ request.path }}" id="login">{% trans "Sign in" %}</a>
-                      / <a href="{% url 'register' %}?next={{ request.path }}" id="register">{% trans "Register" %}</a>
-                    </li>
-                  {% endif %}
-                </ul>
-
-                <ul id="main-menu-side">
-                  {% include "main_menu.html" %}
-                </ul>
-              </nav>
-              <form id="search-area" action="{% url 'wlsearch' %}">
-                <div id="search-field">
-                  <label for="search">{{ search_form.q.label }}</label>
-                  {{ search_form.q }}
-                </div>
-                <button type='submit'>{% trans "Search" %}</button>
-              </form>
-
-              <ul id="main-menu">
-                {% include "main_menu.html" %}
-              </ul>
-
-
-
-            </header>
-          </div>
-        </div>
-
-        <div id="main-content">
-          {% comment %}
-          <div id="banners">
-            <a href="https://nowoczesnapolska.org.pl/pomoz-nam/wesprzyj-nas/">
-              <img src="{% static 'img/banners/960x150_wolneLektury.jpg' %}"
-                   alt="Wesprzyj działalność Nowoczesnej Polski"/>
-            </a>
-          </div>
-          {% endcomment %}
-          {% block body %}
-          {% endblock %}
-          <div class="clearboth"></div>
-        </div>
-
-        <div id="footer-wrapper">
-          <footer id="main">
-            {% chunk 'footer' %}
-            {% block add_footer %}{% endblock %}
-            {% sponsor_page 'footer' %}
-          </footer>
-        </div>
-
-        {# template #}
-        <div id="ajaxable-window" class='dialog-window'>
-          <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
-          <div class="target">
-            <p><img src="{% static "img/indicator.gif" %}" alt="*"/> {% trans "Loading" %}</p>
-          </div>
-        </div>
-      {% endblock bodycontent %}
-
-      <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js" integrity="sha512-BkBgWiL0N/EFIbLZYGTgbksKG5bS6PtwnWvVk3gccv+KhtK/4wkLxCRGh+kelKiXx7Ey4jfTabLg3AEIPC7ENA==" crossorigin="anonymous"></script>
-      <script type="text/javascript">
-        var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
-        var STATIC_URL = "{{ STATIC_URL }}";
-      </script>
-      {% javascript "base" %}
-
-      {% block extrabody %}{% endblock %}
-
-      <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
-    </body>
-  </html>
-{% endspaceless %}
index 1a8007f..ee4cc1f 100644 (file)
@@ -1,4 +1,4 @@
-{% extends form.base_template|default:request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends form.base_template|default:"2022/base_simple.html" %}
 {% load forms_builder_tags %}
 {% load title %}
 {% load i18n %}
 {% load forms_builder_tags %}
 {% load title %}
 {% load i18n %}
index cef827f..89bed2f 100644 (file)
   </div>
 
   {% if form_published %}
   </div>
 
   {% if form_published %}
-  {% if request.EXPERIMENTS.layout.value %}
     {{ form_for_form.as_p }}
     {% if form_for_form.fields %}
       <button>{{ form.button_text }}</button>
     {% endif %}
     {{ form_for_form.as_p }}
     {% if form_for_form.fields %}
       <button>{{ form.button_text }}</button>
     {% endif %}
-  {% else %}
-    <table>
-      {{ form_for_form.as_table }}
-      {% if form_for_form.fields %}
-        <tr><td></td><td><button>{{ form.button_text }}</button></td></tr>
-      {% endif %}
-    </table>
-  {% endif %}
   {% else %}
   <p class="l-change-pop show">FORMULARZ ZAMKNIĘTY</p>
   {% endif %}
   {% else %}
   <p class="l-change-pop show">FORMULARZ ZAMKNIĘTY</p>
   {% endif %}
diff --git a/src/wolnelektury/templates/main_menu.html b/src/wolnelektury/templates/main_menu.html
deleted file mode 100644 (file)
index be642d6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{% load i18n %}
-
-<li{% if active_menu_item == 'club' %} class="active"{% endif %}>
-  <a href="{% url 'club_join' %}">{% trans "Support us" %}</a>
-</li>
-<li{% if active_menu_item == 'info:lektury-szkolne' %} class="active"{% endif %}>
-  <a href="{% url 'infopage' 'lektury-szkolne' %}">{% trans "School readings" %}</a>
-</li>
-<li{% if active_menu_item == 'books' %} class="active"{% endif %}>
-  <a href="{% url 'book_list' %}">{% trans "Literature" %}</a>
-</li>
-<li{% if active_menu_item == 'theme' %} class="active"{% endif %}>
-  <a href="{% url 'theme_catalogue' %}">{% trans "Themes" %}</a>
-</li>
-<li{% if active_menu_item == 'audiobooks' %} class="active"{% endif %}>
-  <a href="{% url 'audiobook_list' %}">{% trans "Audiobooks" %}</a>
-</li>
-<li{% if active_menu_item == 'collections' %} class="active"{% endif %}>
-  <a href="{% url 'catalogue_collections' %}">{% trans "Collections" %}</a>
-</li>
-<li>
-  <a href="{% url 'subscribe' %}">{% trans "Newsletter" %}</a>
-</li>
diff --git a/src/wolnelektury/templates/main_page.html b/src/wolnelektury/templates/main_page.html
deleted file mode 100644 (file)
index de61221..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-{% extends "base/base.html" %}
-{% load latest_blog_posts from blog %}
-{% load carousel from social_tags %}
-{% load static %}
-{% load i18n catalogue_tags infopages_tags %}
-{% load cache %}
-{% load funding_tags %}
-{% get_current_language as LANGUAGE_CODE %}
-
-
-{% block title %}{% trans "Wolne Lektury internet library" %}{% endblock %}
-{% block ogtitle %}{% trans "Wolne Lektury internet library" %}{% endblock %}
-
-{% block footerlink %}#main-footer{% endblock %}
-
-{% block body %}
-  {% spaceless %}
-    {% carousel 'main' %}
-
-    <section id="main-library">
-      <h1>{% trans "In our digital library you will find" %}</h1>
-      <div class="main-library-row">
-        <div class="covers">
-          {% for book in best %}
-            {{ book.mini_box }}
-          {% endfor %}
-        </div>
-        <div class="note white-box normal-text" style="font-size: 18px">
-         <a href="{% if recommended_collection %}{{ recommended_collection.get_absolute_url }}{% else %}{% url "book_list" %}{% endif %}" style="display: block; height: 100%">
-            {% trans "and many other books, poems, pictures, audiobooks…" %}
-          </a>
-        </div>
-      </div>
-    </section>
-
-    <section>
-      <h1>
-        <a  href="{% url 'recent_list' %}">
-          {% trans "Recent publications" %}
-          &rarr;
-        </a>
-      </h1>
-      {% for book in last_published %}
-        {{ book.mini_box }}
-      {% endfor %}
-    </section>
-
-    {% if collections %}
-      <section>
-        <h1>
-          <a href="{% url 'catalogue_collections' %}">
-            {% trans "Collections" %}
-            &rarr;
-          </a>
-        </h1>
-        {% for collection in collections %}
-         {{ collection.box }}
-        {% endfor %}
-      </section>
-    {% endif %}
-
-    <section id="main-theme">
-      <h1>
-        <a href="{% url 'theme_catalogue' %}">
-          {% trans "Motifs and themes" %}
-          &rarr;
-        </a>
-      </h1>
-      <div class="white-box normal-text">
-        <h2>{% trans "Theme" %}: {{ theme }}</h2>
-        <p>{% trans "Explore works with the same theme" %}</p>
-        {% for book in theme_books %}
-          {{ book.mini_box }}
-        {% endfor %}
-        {% if theme_fragment %}
-          {% cache 3600 fragment_promo theme_fragment.pk %}
-            {% include 'catalogue/fragment_promo.html' with fragment=theme_fragment %}
-          {% endcache %}
-        {% endif %}
-      </div>
-    </section>
-
-    <div id="main-footer" class="clearboth"></div>
-
-    <section class="infopages-box">
-      <h1>{% trans "News" %}</h1>
-      <ol>
-        {% cache 1800 latest_blog_posts %}
-          {% latest_blog_posts %}
-        {% endcache %}
-      </ol>
-    </section>
-
-    <section class="infopages-box">
-      <h1>{% trans "Utilities" %}</h1>
-
-      <ul>
-        <li><a href="{% url 'suggest' %}" id="suggest" class="ajaxable">{% trans "Report a bug or suggestion" %}</a></li>
-        <li><a href="{% url 'reporting_catalogue_pdf' %}">{% trans "Download the catalogue in PDF format." %}</a></li>
-       <li><a href="{% url 'gallery' %}">{% trans "Art" %}</a></li>
-        <li><a href="{% url 'catalogue' %}">{% trans "All works" %}</a></li>
-
-        <li><a href="{% url 'dictionary_notes' %}">{% trans "Footnotes" %}</a></li>
-        <li><a href="{% url 'suggest_publishing' %}" id="suggest-publishing" class="ajaxable">{% trans "Missing a book?" %}</a></li>
-        <li><a href="{% url 'publish_plan' %}">{% trans "Publishing plan" %}</a></li>
-        <li><a href="{% url 'api' %}">API</a></li>
-        <li><a href="{% url 'oaipmh' %}">OAI-PMH</a></li>
-        <li><a href="{% url 'lesmianator' %}" lang="pl">Leśmianator</a></li>
-        <li><a href="https://polski.wolnelektury.pl" lang="pl">Przewodnik dla piszących i czytających</a></li>
-        <li><a href="{% url 'subscribe' %}">{% trans "Newsletter" %}</a></li>
-      </ul>
-    </section>
-
-    <section class="infopages-box">
-      <h1>{% trans "Information" %}</h1>
-      <ul>
-        <li><a href="https://nowoczesnapolska.org.pl/prywatnosc/">{% trans "Privacy policy" %}</a></li>
-        {% infopages_on_main %}
-      </ul>
-
-      <div class="social-links">
-        <a href="https://www.facebook.com/wolnelektury/" title='{% trans "Follow us on Facebook" %}'>
-          <img src="{% static "img/social/f.png" %}" alt="Wolne Lektury @ Facebook" />
-        </a>
-      </div>
-    </section>
-  {% endspaceless %}
-{% endblock %}
-
-
-{% block add_footer %}
-  {% spaceless %}
-    {% if cite %}
-      <p>
-        {% trans "Image used:" %}
-        {% cache 3600 cite_info cite.pk %}
-          {% include 'social/cite_info.html' %}
-        {% endcache %}
-      </p>
-    {% endif %}
-  {% endspaceless %}
-{% endblock %}
diff --git a/src/wolnelektury/templates/podcast.html b/src/wolnelektury/templates/podcast.html
deleted file mode 100644 (file)
index 0fdb071..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<div class="jp-type-playlist">
-    <div id="jplayer" class="jp-jplayer" data-player="jp_container_{{ id }}" data-supplied="mp3"></div>
-    <div id="jp_container_{{ id }}" class="jp-audio">
-        <div class="jp-type-single">
-            <span class="title"></span>
-            <div class="jp-gui jp-interface">
-                <ul class="jp-controls">
-                    <li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
-                    <li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
-                    <li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
-                    <li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
-                </ul>
-                <div class="jp-progress">
-                    <div class="jp-seek-bar">
-                        <div class="jp-play-bar"></div>
-                    </div>
-                </div>
-                <div class="jp-volume-bar">
-                    <div class="jp-volume-bar-value"></div>
-                </div>
-                <div class="jp-time-holder">
-                    <div class="jp-current-time"></div>
-                <div class="jp-duration"></div>
-                </div>
-            </div>
-            <div class="jp-playlist">
-                <ul>
-                    <li data-mp3='{{ mp3 }}'>
-                        <div class='play'>{{ title }}
-                            <div class='extra-info'>
-                                {% if artist %}{% block artist_label %}Czyta{% endblock %}&nbsp;<span class='artist'>{{ artist }}</span>,{% endif %}
-                                {% if director %}reż.&nbsp;<span class='director'>{{ director }}</span>{% endif %}
-                            </div>
-                        </div>
-                    </li>
-                </ul>
-            </div>
-            <div class="jp-no-solution"><span>Update Required</span>
-                To play the media you will need to either update your browser to a recent version or update your
-                <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
-            </div>
-        </div>
-    </div>
-</div>
\ No newline at end of file
diff --git a/src/wolnelektury/templates/post_test.html b/src/wolnelektury/templates/post_test.html
deleted file mode 100644 (file)
index e0f7109..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{% extends "base/base.html" %}
-
-{% block body %}
-  <form method="post" action="{{ action }}">
-    {% csrf_token %}
-    <input type="submit" value="send post"/>
-  </form>
-{% endblock body %}
index 22e59a9..dec60b6 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 
 {% block settings %}
 {% load i18n %}
 
 {% block settings %}
index 3982fc4..a74a473 100644 (file)
@@ -1,5 +1,2 @@
-{% extends "base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {# This is for allauth templates. #}
 {# This is for allauth templates. #}
-
-{% block bodyid %}auth-page{% endblock %}
-{% block titleextra %}{% block head_title %}{% endblock %}{% endblock %}
index 934f4a6..3817211 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,account/base.html" %}
+{% extends "2022/base_simple.html" %}
 
 
 {% block breadcrumbs %}
 
 
 {% block breadcrumbs %}
index eed3212..e60343e 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "base/base.html" %}
+{% extends "2022/base_simple.html" %}
 
 {% load i18n %}
 
 
 {% load i18n %}
 
@@ -16,4 +16,3 @@
 </div>
 
 {% endblock %}
 </div>
 
 {% endblock %}
-
index ef4d5fc..d3f86e0 100644 (file)
@@ -1,7 +1,6 @@
 {% extends "socialaccount/base.html" %}
 
 {% load i18n %}
 {% extends "socialaccount/base.html" %}
 
 {% load i18n %}
-{% load ajaxable_tags %}
 
 {% block head_title %}{% trans "Signup" %}{% endblock %}
 
 
 {% block head_title %}{% trans "Signup" %}{% endblock %}
 
 
 <form class="signup cuteform" id="signup_form" method="post" action="{% url 'socialaccount_signup' %}">
   {% csrf_token %}
 
 <form class="signup cuteform" id="signup_form" method="post" action="{% url 'socialaccount_signup' %}">
   {% csrf_token %}
-  <ul>
-    {{ form.username|pretty_field }}
-    {{ form.email|pretty_field }}
-    {{ form.agree_newsletter|pretty_checkbox }}
-  </ul>
+  {{ form.as_p }}
   {% if redirect_field_value %}
   <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
   {% endif %}
   {% if redirect_field_value %}
   <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
   {% endif %}
index 40c7950..ca9d564 100644 (file)
@@ -1,4 +1,4 @@
-{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %}
+{% extends "2022/base_simple.html" %}
 {% load i18n %}
 
 
 {% load i18n %}
 
 
index a95f690..e86d18b 100644 (file)
@@ -22,10 +22,9 @@ urlpatterns = [
 
     # Authentication
     path('uzytkownik/', views.user_settings, name='user_settings'),
 
     # Authentication
     path('uzytkownik/', views.user_settings, name='user_settings'),
-    path('uzytkownik/login/', banner_exempt(views.LoginFormView()), name='login'),
-    path('uzytkownik/signup/', banner_exempt(views.RegisterFormView()), name='register'),
+    path('uzytkownik/login/', views.WLLoginView.as_view(), name='login'),
+    path('uzytkownik/signup/', views.WLRegisterView.as_view(), name='register'),
     path('uzytkownik/logout/', views.logout_then_redirect, name='logout'),
     path('uzytkownik/logout/', views.logout_then_redirect, name='logout'),
-    path('uzytkownik/zaloguj-utworz/', banner_exempt(views.LoginRegisterFormView()), name='login_register'),
     path('uzytkownik/social/signup/', banner_exempt(views.SocialSignupView.as_view()), name='socialaccount_signup'),
 ]
 
     path('uzytkownik/social/signup/', banner_exempt(views.SocialSignupView.as_view()), name='socialaccount_signup'),
 ]
 
@@ -94,11 +93,6 @@ urlpatterns += [
         url='/info/wlacz-sie-w-prace/', permanent=False)),
 ]
 
         url='/info/wlacz-sie-w-prace/', permanent=False)),
 ]
 
-urlpatterns += [
-    # path('error-test/', views.exception_test),
-    # path('post-test/', views.post_test),
-]
-
 
 if settings.DEBUG:
     import debug_toolbar
 
 if settings.DEBUG:
     import debug_toolbar
index a0e1ae4..a7b48c2 100644 (file)
@@ -18,15 +18,19 @@ from django.shortcuts import render
 from django.utils.translation import gettext_lazy as _
 from django.views.decorators.cache import never_cache
 
 from django.utils.translation import gettext_lazy as _
 from django.views.decorators.cache import never_cache
 
-from ajaxable.utils import AjaxableFormView
-from ajaxable.utils import placeholdized
 from catalogue.models import Book, Collection, Tag, Fragment
 import club.models
 from social.utils import get_or_choose_cite
 from wolnelektury.forms import RegistrationForm, SocialSignupForm, WLAuthenticationForm
 
 
 from catalogue.models import Book, Collection, Tag, Fragment
 import club.models
 from social.utils import get_or_choose_cite
 from wolnelektury.forms import RegistrationForm, SocialSignupForm, WLAuthenticationForm
 
 
-def main_page_2022(request):
+@never_cache
+def main_page(request):
+    if request.GET.get('w') in settings.WIDGETS:
+        request.EXPERIMENTS['layout'].override(True)
+    if request.EXPERIMENTS['sowka'].value:
+        request.EXPERIMENTS['layout'].override(True)
+
     ctx = {}
     ctx['last_published'] = Book.objects.exclude(cover_clean='').filter(findable=True, parent=None).order_by('-created_at')[:10]
     ctx['recommended_collection'] = Collection.objects.filter(listed=True, role='recommend').order_by('?').first()
     ctx = {}
     ctx['last_published'] = Book.objects.exclude(cover_clean='').filter(findable=True, parent=None).order_by('-created_at')[:10]
     ctx['recommended_collection'] = Collection.objects.filter(listed=True, role='recommend').order_by('?').first()
@@ -36,91 +40,11 @@ def main_page_2022(request):
         ctx['widget'] = settings.WIDGETS['pan-sowka']
     return render(request, '2022/main_page.html', ctx)
 
         ctx['widget'] = settings.WIDGETS['pan-sowka']
     return render(request, '2022/main_page.html', ctx)
 
-@never_cache
-def main_page(request):
-    if request.GET.get('w') in settings.WIDGETS:
-        request.EXPERIMENTS['layout'].override(True)
-    if request.EXPERIMENTS['sowka'].value:
-        request.EXPERIMENTS['layout'].override(True)
-
-    if request.EXPERIMENTS['layout'].value:
-        return main_page_2022(request)
-
-    ctx = {
-        'last_published': Book.objects.exclude(cover_clean='').filter(findable=True, parent=None).order_by('-created_at')[:6],
-        'theme_books': [],
-    }
-
-    # FIXME: find this theme and books properly.
-    if Fragment.objects.exists():
-        while True:
-            ctx['theme'] = Tag.objects.filter(category='theme').order_by('?')[:1][0]
-            tf = Fragment.tagged.with_any([ctx['theme']]).select_related('book').filter(book__findable=True).order_by('?')[:100]
-            if not tf:
-                continue
-            ctx['theme_fragment'] = tf[0]
-            for f in tf:
-                if f.book not in ctx['theme_books']:
-                    ctx['theme_books'].append(f.book)
-                if len(ctx['theme_books']) == 3:
-                    break
-            break
-
-    # Choose collections for main.
-    ctx['collections'] = Collection.objects.filter(listed=True).order_by('?')[:4]
-
-    best = []
-    best_places = 5
-    recommended_collection = None
-    for recommended in Collection.objects.filter(listed=True, role='recommend').order_by('?'):
-        if recommended_collection is None:
-            recommended_collection = recommended
-        books = list(recommended.get_books().exclude(id__in=[b.id for b in best]).order_by('?')[:best_places])
-        best.extend(books)
-        best_places -= len(books)
-        if not best_places:
-            break
-    ctx['recommended_collection'] = recommended_collection
-    if best_places:
-        best.extend(
-            list(
-                Book.objects.filter(findable=True).exclude(id__in=[b.id for b in best]).order_by('?')[:best_places]
-            )
-        )
-    ctx['best'] = best
-
-    return render(request, "main_page.html", ctx)
-
 
 class WLLoginView(LoginView):
     form_class = WLAuthenticationForm
 
 
 
 class WLLoginView(LoginView):
     form_class = WLAuthenticationForm
 
 
-wl_login_view = WLLoginView.as_view()
-
-
-class LoginFormView(AjaxableFormView):
-    form_class = AuthenticationForm
-    template = "auth/login.html"
-    placeholdize = True
-    title = _('Sign in')
-    submit = _('Sign in')
-    ajax_redirect = True
-
-    def __call__(self, request):
-        if request.EXPERIMENTS['layout'].value:
-            return wl_login_view(request)
-
-        if request.user.is_authenticated:
-            return self.redirect_or_refresh(
-                request, '/',
-                message=_('Already logged in as user %(user)s', ) % {'user': request.user.username})
-        return super(LoginFormView, self).__call__(request)
-
-    def success(self, form, request):
-        auth.login(request, form.get_user())
-
-
 class WLRegisterView(FormView):
     form_class = RegistrationForm
     template_name = 'registration/register.html'
 class WLRegisterView(FormView):
     form_class = RegistrationForm
     template_name = 'registration/register.html'
@@ -134,48 +58,6 @@ class WLRegisterView(FormView):
         auth.login(self.request, user)
         return HttpResponseRedirect(quote_plus(self.request.GET.get('next', '/'), safe='/?='))
 
         auth.login(self.request, user)
         return HttpResponseRedirect(quote_plus(self.request.GET.get('next', '/'), safe='/?='))
 
-wl_register_view = WLRegisterView.as_view()
-
-
-class RegisterFormView(AjaxableFormView):
-    form_class = RegistrationForm
-    template = "auth/register.html"
-    placeholdize = True
-    title = _('Register')
-    submit = _('Register')
-    ajax_redirect = True
-    form_prefix = 'register'
-    honeypot = True
-
-    def __call__(self, request):
-        if request.EXPERIMENTS['layout'].value:
-            return wl_register_view(request)
-
-        if request.user.is_authenticated:
-            return self.redirect_or_refresh(
-                request, '/',
-                message=_('Already logged in as user %(user)s', ) % {'user': request.user.username})
-        return super(RegisterFormView, self).__call__(request)
-
-    def success(self, form, request):
-        form.save()
-        user = auth.authenticate(
-            username=form.cleaned_data['username'],
-            password=form.cleaned_data['password1']
-        )
-        auth.login(request, user)
-
-
-class LoginRegisterFormView(LoginFormView):
-    template = 'auth/login_register.html'
-    title = _('You have to be logged in to continue')
-
-    def extra_context(self, request, obj):
-        return {
-            "register_form": placeholdized(RegistrationForm(prefix='register')),
-            "register_submit": _('Register'),
-        }
-
 
 @never_cache
 def logout_then_redirect(request):
 
 @never_cache
 def logout_then_redirect(request):
@@ -223,15 +105,3 @@ def widget(request):
 
 class SocialSignupView(SignupView):
     form_class = SocialSignupForm
 
 class SocialSignupView(SignupView):
     form_class = SocialSignupForm
-
-
-def exception_test(request):
-    msg = request.GET.get('msg')
-    if msg:
-        raise Exception('Exception test: %s' % msg)
-    else:
-        raise Exception('Exception test')
-
-
-def post_test(request):
-    return render(request, 'post_test.html', {'action': '/api/reading/jego-zasady/complete/'})