From: Radek Czajka Date: Tue, 20 Dec 2011 16:21:38 +0000 (+0100) Subject: remove some old around-search stuff X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/2bf5eaca680da6ebd22e6fd799a9a5d68206f0b8?ds=sidebyside remove some old around-search stuff --- diff --git a/apps/ajaxable/templates/ajaxable/form_on_page.html b/apps/ajaxable/templates/ajaxable/form_on_page.html index e54231dc0..61175d507 100755 --- a/apps/ajaxable/templates/ajaxable/form_on_page.html +++ b/apps/ajaxable/templates/ajaxable/form_on_page.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load i18n %} -{% block titleextra %}:: {{ title }}{% endblock %} +{% block titleextra %}{{ title }}{% endblock %} {% block body %} diff --git a/apps/catalogue/templatetags/catalogue_tags.py b/apps/catalogue/templatetags/catalogue_tags.py index 0e74f8f77..0ba4476ea 100644 --- a/apps/catalogue/templatetags/catalogue_tags.py +++ b/apps/catalogue/templatetags/catalogue_tags.py @@ -184,22 +184,6 @@ def authentication_form(): return LoginForm(prefix='login').as_ul() -@register.inclusion_tag('catalogue/search_form.html') -def search_form(): - return {"form": SearchForm()} - -@register.inclusion_tag('catalogue/breadcrumbs.html') -def breadcrumbs(tags, search_form=True): - context = {'tag_list': tags} - try: - max_tag_list = settings.MAX_TAG_LIST - except AttributeError: - max_tag_list = -1 - if search_form and (max_tag_list == -1 or len(tags) < max_tag_list): - context['search_form'] = SearchForm(tags=tags) - return context - - @register.tag def catalogue_url(parser, token): bits = token.split_contents() diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 8bf5681b7..57a4975ac 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -46,7 +46,6 @@ def catalogue(request): categories = split_tags(tags) fragment_tags = categories.get('theme', []) - form = forms.SearchForm() return render_to_response('catalogue/catalogue.html', locals(), context_instance=RequestContext(request)) @@ -54,8 +53,6 @@ def catalogue(request): def book_list(request, filter=None, template_name='catalogue/book_list.html'): """ generates a listing of all books, optionally filtered with a test function """ - form = forms.SearchForm() - books_by_author, orphans, books_by_parent = models.Book.book_list(filter) books_nav = SortedDict() for tag in books_by_author: @@ -194,7 +191,6 @@ def book_fragments(request, book, theme_slug): theme = get_object_or_404(models.Tag, slug=theme_slug, category='theme') fragments = models.Fragment.tagged.with_all([book_tag, theme]) - form = forms.SearchForm() return render_to_response('catalogue/book_fragments.html', locals(), context_instance=RequestContext(request)) @@ -240,7 +236,6 @@ def book_detail(request, book): projects.add((project, meta.get('funded_by', ''))) projects = sorted(projects) - form = forms.SearchForm() custom_pdf_form = forms.CustomPDFForm() return render_to_response('catalogue/book_detail.html', locals(), context_instance=RequestContext(request)) diff --git a/apps/dictionary/templates/dictionary/note_list.html b/apps/dictionary/templates/dictionary/note_list.html index fc4ad66b3..cd88c17bc 100755 --- a/apps/dictionary/templates/dictionary/note_list.html +++ b/apps/dictionary/templates/dictionary/note_list.html @@ -1,16 +1,14 @@ {% extends "base.html" %} {% load i18n pagination_tags %} -{% load catalogue_tags %} {% block bodyid %}footnotes{% endblock %} -{% block title %}{% trans "Footnotes on WolneLektury.pl" %}{% endblock %} +{% block titleextra %}{% trans "Footnotes" %}{% endblock %} {% block body %}

{% trans "Footnotes" %}

- {% search_form %}

diff --git a/apps/dictionary/views.py b/apps/dictionary/views.py index e12006366..7b9cd5313 100755 --- a/apps/dictionary/views.py +++ b/apps/dictionary/views.py @@ -7,7 +7,6 @@ from catalogue.forms import SearchForm from dictionary.models import Note def letter_notes(request, letter=None): - form = SearchForm() letters = ["0-9"] + [chr(a) for a in range(ord('a'), ord('z')+1)] objects = Note.objects.all() if letter == "0-9": diff --git a/apps/infopages/templates/infopages/infopage.html b/apps/infopages/templates/infopages/infopage.html index 2d00d5d0e..dc9efe1aa 100755 --- a/apps/infopages/templates/infopages/infopage.html +++ b/apps/infopages/templates/infopages/infopage.html @@ -2,7 +2,7 @@ {% load i18n %} {% load chunks %} -{% block titleextra %}:: {{ page.title }}{% endblock %} +{% block titleextra %}{{ page.title }}{% endblock %} {% block metadescription %}{{ left_column|striptags|truncatewords:10 }}{% endblock %} diff --git a/apps/lesmianator/views.py b/apps/lesmianator/views.py index cebcf8bae..28cb32a87 100644 --- a/apps/lesmianator/views.py +++ b/apps/lesmianator/views.py @@ -8,17 +8,15 @@ from django.views.decorators import cache from catalogue.utils import get_random_hash from catalogue.models import Book, Tag -from catalogue import forms from lesmianator.models import Poem, Continuations def main_page(request): last = Poem.objects.all().order_by('-created_at')[:10] - form = forms.SearchForm() shelves = Tag.objects.filter(user__username='lesmianator') return render_to_response('lesmianator/lesmianator.html', - {"last": last, "form": form, "shelves": shelves}, + {"last": last, "shelves": shelves}, context_instance=RequestContext(request)) diff --git a/apps/lessons/views.py b/apps/lessons/views.py index 242526d86..9314d1cac 100644 --- a/apps/lessons/views.py +++ b/apps/lessons/views.py @@ -3,7 +3,6 @@ # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.views.generic.list_detail import object_detail -from catalogue import forms from lessons import models @@ -17,6 +16,4 @@ def document_detail(request, slug): slug_field='slug', queryset=models.Document.objects.all(), template_name=template_name, - extra_context={ - 'form': forms.SearchForm(), - }) + ) diff --git a/apps/picture/views.py b/apps/picture/views.py index 105f6b863..c5be3bea3 100644 --- a/apps/picture/views.py +++ b/apps/picture/views.py @@ -1,4 +1,3 @@ -from catalogue import forms from picture.models import Picture from django.utils.datastructures import SortedDict from django.shortcuts import render_to_response, get_object_or_404 @@ -8,8 +7,6 @@ from django.template import RequestContext def picture_list(request, filter=None, template_name='catalogue/picture_list.html'): """ generates a listing of all books, optionally filtered with a test function """ - form = forms.SearchForm() - pictures_by_author, orphans = Picture.picture_list() books_nav = SortedDict() for tag in pictures_by_author: @@ -22,7 +19,6 @@ def picture_list(request, filter=None, template_name='catalogue/picture_list.htm def picture_detail(request, picture): - form = forms.SearchForm() picture = get_object_or_404(Picture, slug=picture) categories = SortedDict() diff --git a/apps/reporting/templates/reporting/main.html b/apps/reporting/templates/reporting/main.html index bbfca9964..c629f105c 100755 --- a/apps/reporting/templates/reporting/main.html +++ b/apps/reporting/templates/reporting/main.html @@ -2,14 +2,13 @@ {% load i18n %} {% load reporting_stats catalogue_tags %} -{% block title %}Statystyka w WolneLektury.pl{% endblock %} +{% block titleextra %}{% trans "Reports" %}{% endblock %} {% block bodyid %}reports-stats{% endblock %} {% block body %}

Statystyka

- {% search_form %}

Katalog biblioteki w formacie PDF.

diff --git a/wolnelektury/templates/base.html b/wolnelektury/templates/base.html index b53bab7b4..19c808a1e 100644 --- a/wolnelektury/templates/base.html +++ b/wolnelektury/templates/base.html @@ -7,7 +7,7 @@ - {% trans "Wolne Lektury internet library" %} + <title>{% trans "Wolne Lektury" %} :: {% block titleextra %}{% endblock %} diff --git a/wolnelektury/templates/catalogue/audiobook_list.html b/wolnelektury/templates/catalogue/audiobook_list.html index a9b8ba0e9..d794cd938 100644 --- a/wolnelektury/templates/catalogue/audiobook_list.html +++ b/wolnelektury/templates/catalogue/audiobook_list.html @@ -3,7 +3,7 @@ {% block bodyid %}book-a-list{% endblock %} -{% block title %}{% trans "Listing of all audiobooks on WolneLektury.pl" %}{% endblock %} +{% block titleextra %}{% trans "Listing of all audiobooks" %}{% endblock %} {% block metadescription %}Darmowe audiobooki na wolnej licencji. Lektury czytane przez znanych aktorów.{% endblock %} diff --git a/wolnelektury/templates/catalogue/book_detail.html b/wolnelektury/templates/catalogue/book_detail.html index c47e2176d..5c0a047f4 100644 --- a/wolnelektury/templates/catalogue/book_detail.html +++ b/wolnelektury/templates/catalogue/book_detail.html @@ -2,7 +2,7 @@ {% load i18n %} {% load catalogue_tags pagination_tags %} -{% block title %}{{ book.title }} {% trans "on WolneLektury.pl" %}{% endblock %} +{% block titleextra %}{{ book.title }}{% endblock %} {% block metadescription %}{% book_title book %}. {{ block.super }}{% endblock %} @@ -10,9 +10,6 @@ {% block body %}

{% book_title book %}

-
-

{{ form.q }} {% trans "or" %} {% trans "return to main page" %}

-