fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8eaff81
)
Collections in menu
author
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 12 Dec 2012 13:35:58 +0000
(14:35 +0100)
committer
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 12 Dec 2012 13:35:58 +0000
(14:35 +0100)
apps/catalogue/locale/pl/LC_MESSAGES/django.mo
patch
|
blob
|
history
apps/catalogue/locale/pl/LC_MESSAGES/django.po
patch
|
blob
|
history
apps/catalogue/models/collection.py
patch
|
blob
|
history
apps/catalogue/templates/catalogue/catalogue.html
patch
|
blob
|
history
apps/catalogue/templates/catalogue/collection_list.html
[new file with mode: 0755]
patch
|
blob
apps/catalogue/templates/catalogue/menu.html
patch
|
blob
|
history
apps/catalogue/templatetags/catalogue_tags.py
patch
|
blob
|
history
apps/catalogue/views.py
patch
|
blob
|
history
apps/wolnelektury_core/static/css/header.css
patch
|
blob
|
history
apps/wolnelektury_core/static/css/screen.css
patch
|
blob
|
history
diff --git
a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo
b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo
index
ed68b42
..
a04bce5
100644
(file)
Binary files a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo and b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo differ
diff --git
a/apps/catalogue/locale/pl/LC_MESSAGES/django.po
b/apps/catalogue/locale/pl/LC_MESSAGES/django.po
index
7682cd2
..
46e1524
100644
(file)
--- a/
apps/catalogue/locale/pl/LC_MESSAGES/django.po
+++ b/
apps/catalogue/locale/pl/LC_MESSAGES/django.po
@@
-7,8
+7,8
@@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-1
1-08 16:21
+0100\n"
-"PO-Revision-Date: 2012-1
1-08 16:21
+0100\n"
+"POT-Creation-Date: 2012-1
2-12 14:09
+0100\n"
+"PO-Revision-Date: 2012-1
2-12 14:09
+0100\n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
@@
-73,7
+73,7
@@
msgstr "Duży"
msgid "Queue is full. Please try again later."
msgstr ""
msgid "Queue is full. Please try again later."
msgstr ""
-#: views.py:52
5
+#: views.py:52
8
#, python-format
msgid ""
"An error occurred: %(exception)s\n"
#, python-format
msgid ""
"An error occurred: %(exception)s\n"
@@
-84,20
+84,20
@@
msgstr ""
"\n"
"%(tb)s"
"\n"
"%(tb)s"
-#: views.py:52
6
+#: views.py:52
9
msgid "Book imported successfully"
msgstr "Książka zaimportowana"
msgid "Book imported successfully"
msgstr "Książka zaimportowana"
-#: views.py:5
28
+#: views.py:5
31
#, python-format
msgid "Error importing file: %r"
msgstr "Błąd podczas importowania pliku: %r"
#, python-format
msgid "Error importing file: %r"
msgstr "Błąd podczas importowania pliku: %r"
-#: views.py:56
0
+#: views.py:56
3
msgid "Download custom PDF"
msgstr "Stwórz własny PDF"
msgid "Download custom PDF"
msgstr "Stwórz własny PDF"
-#: views.py:56
1
+#: views.py:56
4
#: templates/catalogue/book_short.html:92
#: templates/catalogue/book_text.html:28
#: templates/catalogue/book_wide.html:63
#: templates/catalogue/book_short.html:92
#: templates/catalogue/book_text.html:28
#: templates/catalogue/book_wide.html:63
@@
-415,7
+415,7
@@
msgid "Table of contents"
msgstr ""
#: templates/catalogue/book_text.html:24
msgstr ""
#: templates/catalogue/book_text.html:24
-#: templatetags/catalogue_tags.py:41
2
+#: templatetags/catalogue_tags.py:41
6
#, fuzzy
msgid "Themes"
msgstr "motyw"
#, fuzzy
msgid "Themes"
msgstr "motyw"
@@
-499,7
+499,7
@@
msgstr ""
#: templates/catalogue/catalogue.html:19
#: templates/catalogue/search_multiple_hits.html:17
#: templates/catalogue/tagged_object_list.html:26
#: templates/catalogue/catalogue.html:19
#: templates/catalogue/search_multiple_hits.html:17
#: templates/catalogue/tagged_object_list.html:26
-#: templatetags/catalogue_tags.py:4
08
+#: templatetags/catalogue_tags.py:4
12
#, fuzzy
msgid "Authors"
msgstr "autor"
#, fuzzy
msgid "Authors"
msgstr "autor"
@@
-507,14
+507,14
@@
msgstr "autor"
#: templates/catalogue/catalogue.html:22
#: templates/catalogue/search_multiple_hits.html:25
#: templates/catalogue/tagged_object_list.html:34
#: templates/catalogue/catalogue.html:22
#: templates/catalogue/search_multiple_hits.html:25
#: templates/catalogue/tagged_object_list.html:34
-#: templatetags/catalogue_tags.py:41
0
+#: templatetags/catalogue_tags.py:41
4
msgid "Kinds"
msgstr ""
#: templates/catalogue/catalogue.html:25
#: templates/catalogue/search_multiple_hits.html:33
#: templates/catalogue/tagged_object_list.html:42
msgid "Kinds"
msgstr ""
#: templates/catalogue/catalogue.html:25
#: templates/catalogue/search_multiple_hits.html:33
#: templates/catalogue/tagged_object_list.html:42
-#: templatetags/catalogue_tags.py:4
09
+#: templatetags/catalogue_tags.py:4
13
#, fuzzy
msgid "Genres"
msgstr "gatunek"
#, fuzzy
msgid "Genres"
msgstr "gatunek"
@@
-522,7
+522,7
@@
msgstr "gatunek"
#: templates/catalogue/catalogue.html:28
#: templates/catalogue/search_multiple_hits.html:41
#: templates/catalogue/tagged_object_list.html:50
#: templates/catalogue/catalogue.html:28
#: templates/catalogue/search_multiple_hits.html:41
#: templates/catalogue/tagged_object_list.html:50
-#: templatetags/catalogue_tags.py:41
1
+#: templatetags/catalogue_tags.py:41
5
#, fuzzy
msgid "Epochs"
msgstr "epoka"
#, fuzzy
msgid "Epochs"
msgstr "epoka"
@@
-531,6
+531,11
@@
msgstr "epoka"
msgid "Themes and topics"
msgstr ""
msgid "Themes and topics"
msgstr ""
+#: templates/catalogue/catalogue.html:34
+#: templates/catalogue/menu.html:29
+msgid "Collections"
+msgstr "Kolekcje"
+
#: templates/catalogue/daisy_list.html:6
#: templates/catalogue/daisy_list.html:12
msgid "Listing of all DAISY files"
#: templates/catalogue/daisy_list.html:6
#: templates/catalogue/daisy_list.html:12
msgid "Listing of all DAISY files"
@@
-581,6
+586,7
@@
msgid "See full category"
msgstr "kategoria"
#: templates/catalogue/menu.html:9
msgstr "kategoria"
#: templates/catalogue/menu.html:9
+#: templates/catalogue/menu.html.py:31
msgid "Please wait…"
msgstr ""
msgid "Please wait…"
msgstr ""
diff --git
a/apps/catalogue/models/collection.py
b/apps/catalogue/models/collection.py
index
1c9027c
..
daee484
100644
(file)
--- a/
apps/catalogue/models/collection.py
+++ b/
apps/catalogue/models/collection.py
@@
-23,3
+23,7
@@
class Collection(models.Model):
def __unicode__(self):
return self.title
def __unicode__(self):
return self.title
+
+ @models.permalink
+ def get_absolute_url(self):
+ return ("collection", [self.slug])
diff --git
a/apps/catalogue/templates/catalogue/catalogue.html
b/apps/catalogue/templates/catalogue/catalogue.html
index
8a558ab
..
31c4d5b
100644
(file)
--- a/
apps/catalogue/templates/catalogue/catalogue.html
+++ b/
apps/catalogue/templates/catalogue/catalogue.html
@@
-20,16
+20,19
@@
<div class="white-box">{% tag_list categories.author %}</div>
<h2 class="white-box">{% trans "Kinds" %}<a name="rodzaje"></a></h2>
<div class="white-box">{% tag_list categories.author %}</div>
<h2 class="white-box">{% trans "Kinds" %}<a name="rodzaje"></a></h2>
- <div class="white-box">{% tag_list categories.kind %}</div>
+ <div class="white-box"
lang="pl"
>{% tag_list categories.kind %}</div>
<h2 class="white-box">{% trans "Genres" %}<a name="gatunki"></a></h2>
<h2 class="white-box">{% trans "Genres" %}<a name="gatunki"></a></h2>
- <div class="white-box">{% tag_list categories.genre %}</div>
+ <div class="white-box"
lang="pl"
>{% tag_list categories.genre %}</div>
<h2 class="white-box">{% trans "Epochs" %}<a name="epoki"></a></h2>
<h2 class="white-box">{% trans "Epochs" %}<a name="epoki"></a></h2>
- <div class="white-box">{% tag_list categories.epoch %}</div>
+ <div class="white-box"
lang="pl"
>{% tag_list categories.epoch %}</div>
<h2 class="white-box">{% trans "Themes and topics" %}<a name="motywy"></a></h2>
<h2 class="white-box">{% trans "Themes and topics" %}<a name="motywy"></a></h2>
- <div class="white-box">{% tag_list fragment_tags %}</div>
+ <div class="white-box" lang="pl">{% tag_list fragment_tags %}</div>
+
+ <h2 class="white-box">{% trans "Collections" %}<a name="kolekcje"></a></h2>
+ <div class="white-box" lang="pl">{% collection_list collections %}</div>
</div>
{% endblock %}
</div>
{% endblock %}
diff --git a/apps/catalogue/templates/catalogue/collection_list.html
b/apps/catalogue/templates/catalogue/collection_list.html
new file mode 100755
(executable)
index 0000000..
38466f1
--- /dev/null
+++ b/
apps/catalogue/templates/catalogue/collection_list.html
@@ -0,0
+1,5
@@
+<ul>
+{% for collection in collections %}
+ <li><a href="{{ collection.get_absolute_url }}">{{ collection }}</a></li>
+{% endfor %}
+</ul>
diff --git
a/apps/catalogue/templates/catalogue/menu.html
b/apps/catalogue/templates/catalogue/menu.html
index
72bf5e6
..
c87cd33
100644
(file)
--- a/
apps/catalogue/templates/catalogue/menu.html
+++ b/
apps/catalogue/templates/catalogue/menu.html
@@
-23,4
+23,12
@@
<a href="{% url daisy_list %}" class="menu">
<span class='mono'>{% trans "DAISY" %}</span></a>
</li>
<a href="{% url daisy_list %}" class="menu">
<span class='mono'>{% trans "DAISY" %}</span></a>
</li>
+
+ <li class="hidden-box-wrapper menu">
+ <a href="{% url catalogue %}#kolekcje" class="hidden-box-trigger menu load-menu">
+ <span class='mono'>{% trans "Collections" %}</span></a>
+ <div class="hidden-box" id="menu-collections">
+ <img src="{% static "img/indicator.gif" %}" alt="{% trans "Please wait…" %}" />
+ </div>
+ </li>
</ul>
\ No newline at end of file
</ul>
\ No newline at end of file
diff --git
a/apps/catalogue/templatetags/catalogue_tags.py
b/apps/catalogue/templatetags/catalogue_tags.py
index
af9bfae
..
6a30a9c
100644
(file)
--- a/
apps/catalogue/templatetags/catalogue_tags.py
+++ b/
apps/catalogue/templatetags/catalogue_tags.py
@@
-311,6
+311,11
@@
def inline_tag_list(tags, choices=None):
return tag_list(tags, choices)
return tag_list(tags, choices)
+@register.inclusion_tag('catalogue/collection_list.html')
+def collection_list(collections):
+ return locals()
+
+
@register.inclusion_tag('catalogue/book_info.html')
def book_info(book):
return locals()
@register.inclusion_tag('catalogue/book_info.html')
def book_info(book):
return locals()
diff --git
a/apps/catalogue/views.py
b/apps/catalogue/views.py
index
66036bf
..
6dd3d7e
100644
(file)
--- a/
apps/catalogue/views.py
+++ b/
apps/catalogue/views.py
@@
-21,11
+21,10
@@
from django.utils.translation import ugettext as _, ugettext_lazy
from django.views.decorators.cache import never_cache
from ajaxable.utils import JSONResponse, AjaxableFormView
from django.views.decorators.cache import never_cache
from ajaxable.utils import JSONResponse, AjaxableFormView
-
from catalogue import models
from catalogue import forms
from catalogue.utils import split_tags, MultiQuerySet
from catalogue import models
from catalogue import forms
from catalogue.utils import split_tags, MultiQuerySet
-from catalogue.templatetags.catalogue_tags import tag_list
+from catalogue.templatetags.catalogue_tags import tag_list
, collection_list
from pdcounter import models as pdcounter_models
from pdcounter import views as pdcounter_views
from suggest.forms import PublishingSuggestForm
from pdcounter import models as pdcounter_models
from pdcounter import views as pdcounter_views
from suggest.forms import PublishingSuggestForm
@@
-43,6
+42,7
@@
def catalogue(request):
tag.count = tag.book_count
categories = split_tags(tags)
fragment_tags = categories.get('theme', [])
tag.count = tag.book_count
categories = split_tags(tags)
fragment_tags = categories.get('theme', [])
+ collections = models.Collection.objects.all()
if request.is_ajax():
render_tag_list = lambda x: render_to_string(
if request.is_ajax():
render_tag_list = lambda x: render_to_string(
@@
-50,6
+50,8
@@
def catalogue(request):
output = {'theme': render_tag_list(fragment_tags)}
for category, tags in categories.items():
output[category] = render_tag_list(tags)
output = {'theme': render_tag_list(fragment_tags)}
for category, tags in categories.items():
output[category] = render_tag_list(tags)
+ output['collections'] = render_to_string(
+ 'catalogue/collection_list.html', collection_list(collections))
return JSONResponse(output)
else:
return render_to_response('catalogue/catalogue.html', locals(),
return JSONResponse(output)
else:
return render_to_response('catalogue/catalogue.html', locals(),
diff --git
a/apps/wolnelektury_core/static/css/header.css
b/apps/wolnelektury_core/static/css/header.css
index
fefb65a
..
3e1a4af
100755
(executable)
--- a/
apps/wolnelektury_core/static/css/header.css
+++ b/
apps/wolnelektury_core/static/css/header.css
@@
-153,6
+153,10
@@
a.menu {
padding-top: 1.8em;
color: #0c7076;
}
padding-top: 1.8em;
color: #0c7076;
}
+#menu a.hidden-box-trigger:hover {
+ border-bottom: 3px solid white;
+ margin-bottom: -3px;
+}
a.menu span {
font-size: 1.1em;
}
a.menu span {
font-size: 1.1em;
}
diff --git
a/apps/wolnelektury_core/static/css/screen.css
b/apps/wolnelektury_core/static/css/screen.css
index
138121e
..
8522996
100644
(file)
--- a/
apps/wolnelektury_core/static/css/screen.css
+++ b/
apps/wolnelektury_core/static/css/screen.css
@@
-18,6
+18,11
@@
-webkit-column-width: 12em;
}
-webkit-column-width: 12em;
}
+#menu-collections ul {
+ width: 18em;
+}
+
+
#header-content, div#main-content, div#half-header-content, #footer-content {
width: 97.5em;
margin: auto;
#header-content, div#main-content, div#half-header-content, #footer-content {
width: 97.5em;
margin: auto;