<span class="did_you_mean">{% trans "Did you mean" %}
<a href="{% url 'search' %}?q={{did_you_mean|urlencode}}">{{did_you_mean|lower}}</a>?</span>
{% endif %}
- <div class="inline-tag-lists top-tag-list">
- {% if tags %}
+ <div class="top-tag-list">
+ {% if pd_authors %}
<div>
- {% for tag in tags %}
- <a class="tag-box" href="{{ tag.get_absolute_url }}">
- {% include "catalogue/tag_box.html" %}
- </a>
+ {% for author in pd_authors %}
+ <div class="tag-box">
+ {% include "pdcounter/pd_author_box.html" %}
+ </div>
{% endfor %}
</div>
{% endif %}
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2018-02-16 16:17+0100\n"
"PO-Revision-Date: 2012-04-15 13:43+0100\n"
"Last-Translator: Kamil <kjaklukowski@gmail.com>\n"
"Language-Team: \n"
msgstr "Lesen Sie einen Artikel über diesem Autor in Wikipedia"
#: templates/pdcounter/author_detail.html:40
+#: templates/pdcounter/pd_author_box.html:9
msgid "This author's works are copyrighted."
msgstr "Die Urheberrechte für dieses Werk werden geschützt."
#: templates/pdcounter/author_detail.html:41
#: templates/pdcounter/author_detail.html:53
+#: templates/pdcounter/pd_author_box.html:10
+#: templates/pdcounter/pd_author_box.html:21
msgid ""
"<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</"
"a> why Internet libraries can't publish this author's works."
"dürfen."
#: templates/pdcounter/author_detail.html:45
+#: templates/pdcounter/pd_author_box.html:14
#, fuzzy
msgid ""
"This author's works are in public domain and will be published on Internet "
msgid "This work is copyrighted."
msgstr "Dieses Werk wird durch das Urheberrecht geschützt."
+#: templates/pdcounter/pd_author_box.html:18
+#, fuzzy
+#| msgid ""
+#| "This author's works will become part of public domain and will be allowed "
+#| "to be published without restrictions in"
+msgid ""
+"This author's works will become part of public domain and will be allowed to "
+"be published without restrictions in the year"
+msgstr ""
+"Die Werke des Autors werden in Public Domain sein und werden unbegrenzt "
+"publeziert werden dürfen in"
+
#~ msgid "year of translator's death"
#~ msgstr "Todesjahr des Übersetzers"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2018-02-16 16:17+0100\n"
"PO-Revision-Date: 2012-03-04 20:05+0100\n"
"Last-Translator: xxx <xxx>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgstr ""
#: templates/pdcounter/author_detail.html:40
+#: templates/pdcounter/pd_author_box.html:9
msgid "This author's works are copyrighted."
msgstr ""
#: templates/pdcounter/author_detail.html:41
#: templates/pdcounter/author_detail.html:53
+#: templates/pdcounter/pd_author_box.html:10
+#: templates/pdcounter/pd_author_box.html:21
msgid ""
"<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</"
"a> why Internet libraries can't publish this author's works."
msgstr ""
#: templates/pdcounter/author_detail.html:45
+#: templates/pdcounter/pd_author_box.html:14
msgid ""
"This author's works are in public domain and will be published on Internet "
"library of Wolne Lektury soon."
msgid "This work is copyrighted."
msgstr ""
+#: templates/pdcounter/pd_author_box.html:18
+msgid ""
+"This author's works will become part of public domain and will be allowed to "
+"be published without restrictions in the year"
+msgstr ""
+
#~ msgid "year of translator's death"
#~ msgstr "Year of translator's death"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2018-02-16 16:17+0100\n"
"PO-Revision-Date: 2012-05-17 22:05+0100\n"
"Last-Translator: KG <kamila.gawron87@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgstr "Lea el artículo sobre este autor en Wikipedia"
#: templates/pdcounter/author_detail.html:40
+#: templates/pdcounter/pd_author_box.html:9
msgid "This author's works are copyrighted."
msgstr "Las obras de este autor tienen todos los derechos de autor reservados."
#: templates/pdcounter/author_detail.html:41
#: templates/pdcounter/author_detail.html:53
+#: templates/pdcounter/pd_author_box.html:10
+#: templates/pdcounter/pd_author_box.html:21
msgid ""
"<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</"
"a> why Internet libraries can't publish this author's works."
"autor."
#: templates/pdcounter/author_detail.html:45
+#: templates/pdcounter/pd_author_box.html:14
#, fuzzy
msgid ""
"This author's works are in public domain and will be published on Internet "
msgid "This work is copyrighted."
msgstr "Esta obra tiene todos los derechos de autor reservados."
+#: templates/pdcounter/pd_author_box.html:18
+#, fuzzy
+#| msgid ""
+#| "This author's works will become part of public domain and will be allowed "
+#| "to be published without restrictions in"
+msgid ""
+"This author's works will become part of public domain and will be allowed to "
+"be published without restrictions in the year"
+msgstr ""
+"Las obras de este autor van a ser parte de dominio público y pronto serán "
+"publicadas sin restricciones en"
+
#~ msgid "year of translator's death"
#~ msgstr "año de la muerte del traductor"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2018-02-16 16:17+0100\n"
"PO-Revision-Date: 2012-02-22 20:58+0100\n"
"Last-Translator: Ela Janota <amarillis5@wp.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgstr ""
#: templates/pdcounter/author_detail.html:40
+#: templates/pdcounter/pd_author_box.html:9
msgid "This author's works are copyrighted."
msgstr ""
#: templates/pdcounter/author_detail.html:41
#: templates/pdcounter/author_detail.html:53
+#: templates/pdcounter/pd_author_box.html:10
+#: templates/pdcounter/pd_author_box.html:21
msgid ""
"<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</"
"a> why Internet libraries can't publish this author's works."
msgstr ""
#: templates/pdcounter/author_detail.html:45
+#: templates/pdcounter/pd_author_box.html:14
msgid ""
"This author's works are in public domain and will be published on Internet "
"library of Wolne Lektury soon."
msgid "This work is copyrighted."
msgstr ""
+#: templates/pdcounter/pd_author_box.html:18
+msgid ""
+"This author's works will become part of public domain and will be allowed to "
+"be published without restrictions in the year"
+msgstr ""
+
#~ msgid "year of translator's death"
#~ msgstr "année de la mort du traducteur"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2018-02-16 16:17+0100\n"
"PO-Revision-Date: 2012-02-21 17:06+0100\n"
"Last-Translator: xxx\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgstr ""
#: templates/pdcounter/author_detail.html:40
+#: templates/pdcounter/pd_author_box.html:9
msgid "This author's works are copyrighted."
msgstr ""
#: templates/pdcounter/author_detail.html:41
#: templates/pdcounter/author_detail.html:53
+#: templates/pdcounter/pd_author_box.html:10
+#: templates/pdcounter/pd_author_box.html:21
msgid ""
"<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</"
"a> why Internet libraries can't publish this author's works."
msgstr ""
#: templates/pdcounter/author_detail.html:45
+#: templates/pdcounter/pd_author_box.html:14
msgid ""
"This author's works are in public domain and will be published on Internet "
"library of Wolne Lektury soon."
msgid "This work is copyrighted."
msgstr ""
+#: templates/pdcounter/pd_author_box.html:18
+msgid ""
+"This author's works will become part of public domain and will be allowed to "
+"be published without restrictions in the year"
+msgstr ""
+
#~ msgid "tags"
#~ msgstr "i tag"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2018-02-16 16:17+0100\n"
"PO-Revision-Date: 2012-04-03 18:01+0100\n"
"Last-Translator: Karolina Zuber <suomija@o2.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgstr "Skaitykite straipsnį apie šį autorių Vikipedijoje"
#: templates/pdcounter/author_detail.html:40
+#: templates/pdcounter/pd_author_box.html:9
msgid "This author's works are copyrighted."
msgstr "Šio autoriaus kūriniai yra autorinių teisių saugomi."
#: templates/pdcounter/author_detail.html:41
#: templates/pdcounter/author_detail.html:53
+#: templates/pdcounter/pd_author_box.html:10
+#: templates/pdcounter/pd_author_box.html:21
msgid ""
"<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</"
"a> why Internet libraries can't publish this author's works."
"publikuojami internetinėje bibliotekoje."
#: templates/pdcounter/author_detail.html:45
+#: templates/pdcounter/pd_author_box.html:14
#, fuzzy
msgid ""
"This author's works are in public domain and will be published on Internet "
msgid "This work is copyrighted."
msgstr "Šis kūrinis yra autorinių teisių saugomas."
+#: templates/pdcounter/pd_author_box.html:18
+#, fuzzy
+#| msgid ""
+#| "This author's works will become part of public domain and will be allowed "
+#| "to be published without restrictions in"
+msgid ""
+"This author's works will become part of public domain and will be allowed to "
+"be published without restrictions in the year"
+msgstr ""
+"Šio autoriaus kūriniai netrukus bus viešai prieinami ir galės būti "
+"publikuojami be apribojimų"
+
#~ msgid "year of translator's death"
#~ msgstr "vertėjo mirimo metai"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2018-02-16 16:17+0100\n"
"PO-Revision-Date: 2013-06-11 15:47+0100\n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgstr "Przeczytaj artykuł o autorze w Wikipedii"
#: templates/pdcounter/author_detail.html:40
+#: templates/pdcounter/pd_author_box.html:9
msgid "This author's works are copyrighted."
msgstr "Dzieła tego autora objęte są prawem autorskim."
#: templates/pdcounter/author_detail.html:41
#: templates/pdcounter/author_detail.html:53
+#: templates/pdcounter/pd_author_box.html:10
+#: templates/pdcounter/pd_author_box.html:21
msgid ""
"<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</"
"a> why Internet libraries can't publish this author's works."
"autora."
#: templates/pdcounter/author_detail.html:45
+#: templates/pdcounter/pd_author_box.html:14
msgid ""
"This author's works are in public domain and will be published on Internet "
"library of Wolne Lektury soon."
msgid "This work is copyrighted."
msgstr "Ten utwór objęty jest prawem autorskim."
+#: templates/pdcounter/pd_author_box.html:18
+msgid ""
+"This author's works will become part of public domain and will be allowed to "
+"be published without restrictions in the year"
+msgstr ""
+"Dzieła tego autora przejdą do zasobów domeny publicznej i będą mogły być "
+"publikowane bez żadnych ograniczeń w roku"
+
#~ msgid "year of translator's death"
#~ msgstr "rok śmierci tłumacza"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2018-02-16 16:17+0100\n"
"PO-Revision-Date: 2012-03-04 22:11+0100\n"
"Last-Translator: xxx <xxx>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgstr ""
#: templates/pdcounter/author_detail.html:40
+#: templates/pdcounter/pd_author_box.html:9
msgid "This author's works are copyrighted."
msgstr ""
#: templates/pdcounter/author_detail.html:41
#: templates/pdcounter/author_detail.html:53
+#: templates/pdcounter/pd_author_box.html:10
+#: templates/pdcounter/pd_author_box.html:21
msgid ""
"<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</"
"a> why Internet libraries can't publish this author's works."
msgstr ""
#: templates/pdcounter/author_detail.html:45
+#: templates/pdcounter/pd_author_box.html:14
msgid ""
"This author's works are in public domain and will be published on Internet "
"library of Wolne Lektury soon."
msgid "This work is copyrighted."
msgstr ""
+#: templates/pdcounter/pd_author_box.html:18
+msgid ""
+"This author's works will become part of public domain and will be allowed to "
+"be published without restrictions in the year"
+msgstr ""
+
#~ msgid "year of translator's death"
#~ msgstr "год смерти переводчика"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2018-02-16 16:17+0100\n"
"PO-Revision-Date: 2012-05-28 14:18+0100\n"
"Last-Translator: Natalia Kertyczak <natalczyk@o2.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgstr "Прочитати статтю про автора у Вікіпедії"
#: templates/pdcounter/author_detail.html:40
+#: templates/pdcounter/pd_author_box.html:9
msgid "This author's works are copyrighted."
msgstr "Твори цього автора охороняються авторським правом."
#: templates/pdcounter/author_detail.html:41
#: templates/pdcounter/author_detail.html:53
+#: templates/pdcounter/pd_author_box.html:10
+#: templates/pdcounter/pd_author_box.html:21
msgid ""
"<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</"
"a> why Internet libraries can't publish this author's works."
"опублікувати творів цього автора."
#: templates/pdcounter/author_detail.html:45
+#: templates/pdcounter/pd_author_box.html:14
#, fuzzy
msgid ""
"This author's works are in public domain and will be published on Internet "
msgid "This work is copyrighted."
msgstr "Цей твір охороняється авторським правом."
+#: templates/pdcounter/pd_author_box.html:18
+#, fuzzy
+#| msgid ""
+#| "This author's works will become part of public domain and will be allowed "
+#| "to be published without restrictions in"
+msgid ""
+"This author's works will become part of public domain and will be allowed to "
+"be published without restrictions in the year"
+msgstr ""
+"Твори цього автора стануть частиною суспільного надбання і можна буде їх "
+"вільно публікувати у"
+
#~ msgid "year of translator's death"
#~ msgstr "рік смерті перекладача"
--- /dev/null
+{% 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 and will be published on Internet library of Wolne Lektury soon." %}</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 %}
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django.conf import settings
+from django.http.response import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.views.decorators import cache
from django.http import HttpResponse, JsonResponse
-from catalogue.utils import split_tags
from catalogue.models import Book, Tag
+from pdcounter.models import Author
from search.index import Search, SearchResult
from suggest.forms import PublishingSuggestForm
import re
search = Search()
- tags = search.hint_tags(query, pdcounter=True, prefix=False)
- tags = split_tags(tags)
+ pd_authors = Author.objects.filter(name__icontains=query)
+ existing_slugs = Tag.objects.filter(
+ category='author', slug__in=list(pd_authors.values_list('slug', flat=True)))\
+ .values_list('slug', flat=True)
+ pd_authors = pd_authors.exclude(slug__in=existing_slugs)
results_parts = []
results = filter(ensure_exists, results)
- if not results:
+ if not results and not pd_authors:
form = PublishingSuggestForm(initial={"books": query + ", "})
return render_to_response(
'catalogue/search_no_hits.html',
{
- 'tags': tags,
- 'prefix': query,
'form': form,
'did_you_mean': suggestion
},
context_instance=RequestContext(request))
+ if not results and len(pd_authors) == 1:
+ return HttpResponseRedirect(pd_authors[0].get_absolute_url())
+
return render_to_response(
'catalogue/search_multiple_hits.html',
{
- 'tags': tags['author'] + tags['kind'] + tags['genre'] + tags['epoch'] + tags['theme'],
- 'prefix': query,
+ 'pd_authors': pd_authors,
'results': results,
'did_you_mean': suggestion
},