From d13884c8db4b387b360189b5d97ca840bcbc4cd4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Thu, 25 Sep 2008 17:23:25 +0200 Subject: [PATCH 1/1] Added counts to book_sets.html and user_shelves.html templates. --- apps/catalogue/forms.py | 2 +- wolnelektury/templates/catalogue/main_page.html | 2 +- wolnelektury/templates/catalogue/user_shelves.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/catalogue/forms.py b/apps/catalogue/forms.py index 68363c6e7..63a552675 100644 --- a/apps/catalogue/forms.py +++ b/apps/catalogue/forms.py @@ -32,7 +32,7 @@ class ObjectSetsForm(forms.Form): self.fields['set_ids'] = forms.MultipleChoiceField( label=u'Półki', required=False, - choices=[(tag.id, tag.name) for tag in Tag.objects.filter(category='set', user=user)], + choices=[(tag.id, "%s (%s)" % (tag.name, tag.book_count)) for tag in Tag.objects.filter(category='set', user=user)], initial=[tag.id for tag in obj.tags.filter(category='set', user=user)], widget=forms.CheckboxSelectMultiple ) diff --git a/wolnelektury/templates/catalogue/main_page.html b/wolnelektury/templates/catalogue/main_page.html index 107d27d39..daa7ce86d 100644 --- a/wolnelektury/templates/catalogue/main_page.html +++ b/wolnelektury/templates/catalogue/main_page.html @@ -20,7 +20,7 @@ {% if shelves %} {% else %} diff --git a/wolnelektury/templates/catalogue/user_shelves.html b/wolnelektury/templates/catalogue/user_shelves.html index 7f6ce5538..ab34fe497 100644 --- a/wolnelektury/templates/catalogue/user_shelves.html +++ b/wolnelektury/templates/catalogue/user_shelves.html @@ -2,7 +2,7 @@ {% if shelves %} {% else %} -- 2.20.1