From: Marek Stępniowski Date: Thu, 25 Sep 2008 15:23:25 +0000 (+0200) Subject: Added counts to book_sets.html and user_shelves.html templates. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/d13884c8db4b387b360189b5d97ca840bcbc4cd4?ds=inline;hp=-c Added counts to book_sets.html and user_shelves.html templates. --- d13884c8db4b387b360189b5d97ca840bcbc4cd4 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 %}