fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cda38da
)
minimum list size to use letter initials
author
Jan Szejko
<j-sz@o2.pl>
Thu, 28 Jan 2016 15:03:58 +0000
(16:03 +0100)
committer
Jan Szejko
<j-sz@o2.pl>
Thu, 28 Jan 2016 15:03:58 +0000
(16:03 +0100)
src/catalogue/templates/catalogue/catalogue.html
patch
|
blob
|
history
src/catalogue/templates/catalogue/collections.html
patch
|
blob
|
history
src/catalogue/templatetags/catalogue_tags.py
patch
|
blob
|
history
src/wolnelektury/locale-contrib/pl/LC_MESSAGES/django.po
patch
|
blob
|
history
src/wolnelektury/settings/custom.py
patch
|
blob
|
history
diff --git
a/src/catalogue/templates/catalogue/catalogue.html
b/src/catalogue/templates/catalogue/catalogue.html
index
f1b97f4
..
1fc8b7b
100644
(file)
--- a/
src/catalogue/templates/catalogue/catalogue.html
+++ b/
src/catalogue/templates/catalogue/catalogue.html
@@
-21,7
+21,7
@@
{% plain_list books by_author=True paged=False initial_blocks=True %}
<h2>{% trans "Collections" %}</h2>
{% plain_list books by_author=True paged=False initial_blocks=True %}
<h2>{% trans "Collections" %}</h2>
- {% plain_list collections paged=False
with_initials=False
%}
+ {% plain_list collections paged=False %}
<h2>{% trans "Gallery" %}</h2>
{% plain_list pictures by_author=True paged=False initial_blocks=True %}
<h2>{% trans "Gallery" %}</h2>
{% plain_list pictures by_author=True paged=False initial_blocks=True %}
diff --git
a/src/catalogue/templates/catalogue/collections.html
b/src/catalogue/templates/catalogue/collections.html
index
26d67f1
..
1c69872
100644
(file)
--- a/
src/catalogue/templates/catalogue/collections.html
+++ b/
src/catalogue/templates/catalogue/collections.html
@@
-15,7
+15,7
@@
{% endfor %}
<h2>{% trans "All collections" %}</h2>
{% endfor %}
<h2>{% trans "All collections" %}</h2>
- {% plain_list objects
with_initials=False
%}
+ {% plain_list objects %}
diff --git
a/src/catalogue/templatetags/catalogue_tags.py
b/src/catalogue/templatetags/catalogue_tags.py
index
d5e7e05
..
23eeeda
100644
(file)
--- a/
src/catalogue/templatetags/catalogue_tags.py
+++ b/
src/catalogue/templatetags/catalogue_tags.py
@@
-359,6
+359,9
@@
def plain_list(context, object_list, with_initials=True, by_author=False, choice
paged=True, initial_blocks=False):
names = [('', [])]
last_initial = None
paged=True, initial_blocks=False):
names = [('', [])]
last_initial = None
+ if len(object_list) < settings.CATALOGUE_MIN_INITIALS and not by_author:
+ with_initials = False
+ initial_blocks = False
for obj in object_list:
if with_initials:
if by_author:
for obj in object_list:
if with_initials:
if by_author:
diff --git
a/src/wolnelektury/locale-contrib/pl/LC_MESSAGES/django.po
b/src/wolnelektury/locale-contrib/pl/LC_MESSAGES/django.po
index
53cdb98
..
17c1e9c
100644
(file)
--- a/
src/wolnelektury/locale-contrib/pl/LC_MESSAGES/django.po
+++ b/
src/wolnelektury/locale-contrib/pl/LC_MESSAGES/django.po
@@
-507,8
+507,8
@@
msgid ""
"Forgotten your password? Enter your e-mail address below, and we'll send "
"you an e-mail allowing you to reset it."
msgstr ""
"Forgotten your password? Enter your e-mail address below, and we'll send "
"you an e-mail allowing you to reset it."
msgstr ""
-"Nie pamiętasz swojego hasła? Wpisz adres e-mail, a wyślemy Ci
e-mail
"
-"umożliwiając
y
zresetowanie go."
+"Nie pamiętasz swojego hasła? Wpisz adres e-mail, a wyślemy Ci
wiadomość
"
+"umożliwiając
ą
zresetowanie go."
#: /home/janek/.virtualenvs/lektury/local/lib/python2.7/site-packages/allauth/templates/account/password_reset.html:20
msgid "Reset My Password"
#: /home/janek/.virtualenvs/lektury/local/lib/python2.7/site-packages/allauth/templates/account/password_reset.html:20
msgid "Reset My Password"
diff --git
a/src/wolnelektury/settings/custom.py
b/src/wolnelektury/settings/custom.py
index
6885732
..
09cc641
100644
(file)
--- a/
src/wolnelektury/settings/custom.py
+++ b/
src/wolnelektury/settings/custom.py
@@
-24,3
+24,5
@@
LIBRARIAN_PDF_MOREFLOATS = None
LATEST_BLOG_POSTS = "http://nowoczesnapolska.org.pl/feed/?cat=-135"
CATALOGUE_COUNTERS_FILE = os.path.join(VAR_DIR, 'catalogue_counters.p')
LATEST_BLOG_POSTS = "http://nowoczesnapolska.org.pl/feed/?cat=-135"
CATALOGUE_COUNTERS_FILE = os.path.join(VAR_DIR, 'catalogue_counters.p')
+
+CATALOGUE_MIN_INITIALS = 60