fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7f22cc9
)
search fixes
author
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 19 Mar 2012 12:58:57 +0000
(13:58 +0100)
committer
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 19 Mar 2012 12:58:57 +0000
(13:58 +0100)
apps/catalogue/urls.py
patch
|
blob
|
history
wolnelektury/static/js/widget.js
patch
|
blob
|
history
wolnelektury/static/opensearch.xml
patch
|
blob
|
history
wolnelektury/templates/superbase.html
patch
|
blob
|
history
wolnelektury/urls.py
patch
|
blob
|
history
diff --git
a/apps/catalogue/urls.py
b/apps/catalogue/urls.py
index
88e6226
..
c40c4ec
100644
(file)
--- a/
apps/catalogue/urls.py
+++ b/
apps/catalogue/urls.py
@@
-4,8
+4,6
@@
#
from django.conf.urls.defaults import *
from catalogue.feeds import AudiobookFeed
#
from django.conf.urls.defaults import *
from catalogue.feeds import AudiobookFeed
-from catalogue.models import Book
-from picture.models import Picture
from catalogue.views import CustomPDFFormView
from catalogue.views import CustomPDFFormView
@@
-25,7
+23,7
@@
urlpatterns = patterns('picture.views',
url(r'^daisy/$', 'daisy_list', name='daisy_list'),
url(r'^tags/$', 'tags_starting_with', name='hint'),
url(r'^jtags/$', 'json_tags_starting_with', name='jhint'),
url(r'^daisy/$', 'daisy_list', name='daisy_list'),
url(r'^tags/$', 'tags_starting_with', name='hint'),
url(r'^jtags/$', 'json_tags_starting_with', name='jhint'),
- url(r'^szukaj/$', 'search', name='old_search'),
+
#
url(r'^szukaj/$', 'search', name='old_search'),
# zip
url(r'^zip/pdf\.zip$', 'download_zip', {'format': 'pdf', 'slug': None}, 'download_zip_pdf'),
# zip
url(r'^zip/pdf\.zip$', 'download_zip', {'format': 'pdf', 'slug': None}, 'download_zip_pdf'),
@@
-48,4
+46,10
@@
urlpatterns = patterns('picture.views',
url(r'^custompdf$', CustomPDFFormView(), name='custom_pdf_form'),
url(r'^custompdf/(?P<slug>%s).pdf' % SLUG, 'download_custom_pdf'),
url(r'^custompdf$', CustomPDFFormView(), name='custom_pdf_form'),
url(r'^custompdf/(?P<slug>%s).pdf' % SLUG, 'download_custom_pdf'),
-)
+)
+
+urlpatterns += patterns('django.views.generic.simple',
+ # old static pages - redirected
+ url(r'^szukaj/$', 'redirect_to',
+ {'url': '/szukaj/'}),
+)
diff --git
a/wolnelektury/static/js/widget.js
b/wolnelektury/static/js/widget.js
index
d8e1fec
..
de30eb7
100644
(file)
--- a/
wolnelektury/static/js/widget.js
+++ b/
wolnelektury/static/js/widget.js
@@
-17,7
+17,7
@@
stylesheet.setAttribute('rel', 'stylesheet');
stylesheet.setAttribute('href', 'http://'+host+'/static/css/widget.css');
linkLogo.setAttribute('href', 'http://'+host);
logo.setAttribute('src', 'http://'+host+'/static/img/logo.png');
stylesheet.setAttribute('href', 'http://'+host+'/static/css/widget.css');
linkLogo.setAttribute('href', 'http://'+host);
logo.setAttribute('src', 'http://'+host+'/static/img/logo.png');
-form.setAttribute('action', 'http://'+host+'/
fullsearch
/');
+form.setAttribute('action', 'http://'+host+'/
szukaj
/');
form.setAttribute('method', 'get');
form.setAttribute('accept-charset', 'utf-8');
form.setAttribute('id', 'wl-form');
form.setAttribute('method', 'get');
form.setAttribute('accept-charset', 'utf-8');
form.setAttribute('id', 'wl-form');
diff --git
a/wolnelektury/static/opensearch.xml
b/wolnelektury/static/opensearch.xml
index
cf904d0
..
1e05889
100644
(file)
--- a/
wolnelektury/static/opensearch.xml
+++ b/
wolnelektury/static/opensearch.xml
@@
-8,12
+8,12
@@
<Developer>Fundacja Nowoczesna Polska</Developer>
<Language>pl</Language>
<Contact>fundacja@nowoczesnapolska.org.pl</Contact>
<Developer>Fundacja Nowoczesna Polska</Developer>
<Language>pl</Language>
<Contact>fundacja@nowoczesnapolska.org.pl</Contact>
- <Image height="16" width="16" type="image/x-icon">http://
www
.wolnelektury.pl/static/img/favicon.ico</Image>
- <Image height="64" width="64" type="image/png">http://
www
.wolnelektury.pl/static/img/wl_icon_64.png</Image>
+ <Image height="16" width="16" type="image/x-icon">http://
static
.wolnelektury.pl/static/img/favicon.ico</Image>
+ <Image height="64" width="64" type="image/png">http://
static
.wolnelektury.pl/static/img/wl_icon_64.png</Image>
<Url type="application/atom+xml;profile=opds-catalog"
<Url type="application/atom+xml;profile=opds-catalog"
- template="http://w
ww.w
olnelektury.pl/opds/search/?q={searchTerms}&author={atom:author}&translator={atom:contributor}&title={atom:title}" />
- <Url type="text/html" method="GET" template="http://w
ww.wolnelektury.pl/katalog
/szukaj?q={searchTerms}" />
+ template="http://wolnelektury.pl/opds/search/?q={searchTerms}&author={atom:author}&translator={atom:contributor}&title={atom:title}" />
+ <Url type="text/html" method="GET" template="http://w
olnelektury.pl
/szukaj?q={searchTerms}" />
<Url type="application/x-suggestions+json" method="GET" template="http://www.wolnelektury.pl/katalog/jtags?mozhint=1&q={searchTerms}" />
<Url type="application/x-suggestions+json" method="GET" template="http://www.wolnelektury.pl/katalog/jtags?mozhint=1&q={searchTerms}" />
- <moz:SearchForm>http://w
ww.wolnelektury.pl/katalog
/</moz:SearchForm>
+ <moz:SearchForm>http://w
olnelektury.pl
/</moz:SearchForm>
<Query role="example" searchTerms="słowa" />
</OpenSearchDescription>
<Query role="example" searchTerms="słowa" />
</OpenSearchDescription>
diff --git
a/wolnelektury/templates/superbase.html
b/wolnelektury/templates/superbase.html
index
1cb43b0
..
138bffe
100644
(file)
--- a/
wolnelektury/templates/superbase.html
+++ b/
wolnelektury/templates/superbase.html
@@
-96,7
+96,7
@@
- <form id="search-area" action="
/fullsearch/
" class="hidelabels">
+ <form id="search-area" action="
{% url search %}
" class="hidelabels">
<div id="search-field" class="grid-line">
<label for="search">{{search_form.q.label}}</label>
<div id="search-field" class="grid-line">
<label for="search">{{search_form.q.label}}</label>
diff --git
a/wolnelektury/urls.py
b/wolnelektury/urls.py
index
3806b73
..
d027036
100644
(file)
--- a/
wolnelektury/urls.py
+++ b/
wolnelektury/urls.py
@@
-44,7
+44,7
@@
urlpatterns += patterns('',
# API
(r'^api/', include('api.urls')),
# API
(r'^api/', include('api.urls')),
- url(r'^
fullsearch
/', include('search.urls')),
+ url(r'^
szukaj
/', include('search.urls')),
# Static files
url(r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
# Static files
url(r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',