From: Jan Szejko Date: Thu, 21 Jan 2016 13:22:29 +0000 (+0100) Subject: changes from server X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/ab81d95154bd35a67078cc6c926b5b9fbdd9011b changes from server --- diff --git a/apps/catalogue/templates/catalogue/menu.html b/apps/catalogue/templates/catalogue/menu.html index 5ddbd3b23..ee71d7aa1 100644 --- a/apps/catalogue/templates/catalogue/menu.html +++ b/apps/catalogue/templates/catalogue/menu.html @@ -38,4 +38,4 @@ -{% endspaceless %} \ No newline at end of file +{% endspaceless %} diff --git a/apps/catalogue/templatetags/catalogue_tags.py b/apps/catalogue/templatetags/catalogue_tags.py index 6e81caec2..b99b9f631 100644 --- a/apps/catalogue/templatetags/catalogue_tags.py +++ b/apps/catalogue/templatetags/catalogue_tags.py @@ -347,15 +347,18 @@ def related_books(context, instance, limit=6, random=1, taken=0): } -@register.inclusion_tag('catalogue/menu.html') -def catalogue_menu(): - return {'categories': [ +@register.inclusion_tag('catalogue/menu.html', takes_context=True) +def catalogue_menu(context): + return { + 'categories': [ ('author', _('Authors'), 'autorzy'), ('genre', _('Genres'), 'gatunki'), ('kind', _('Kinds'), 'rodzaje'), ('epoch', _('Epochs'), 'epoki'), ('theme', _('Themes'), 'motywy'), - ]} + ], + 'LANGUAGE_CODE': context.get('LANGUAGE_CODE'), + } @register.simple_tag diff --git a/apps/catalogue/urls.py b/apps/catalogue/urls.py index b7c59a055..f24b246ec 100644 --- a/apps/catalogue/urls.py +++ b/apps/catalogue/urls.py @@ -68,7 +68,7 @@ urlpatterns += patterns('catalogue.views', 'book_fragments', name='book_fragments'), # Includes. - url(r'^(?P[^/]+)\.json$', 'catalogue_json'), + url(r'^(?P[^/]+)\.json$', 'catalogue_json', name='catalogue_json'), url(r'^b/(?P\d+)/mini\.(?P.+)\.html', 'book_mini', name='catalogue_book_mini'), url(r'^b/(?P\d+)/mini_nolink\.(?P.+)\.html', 'book_mini', {'with_link': False}, name='catalogue_book_mini_nolink'), url(r'^b/(?P\d+)/short\.(?P.+)\.html', 'book_short', name='catalogue_book_short'), diff --git a/lib/librarian b/lib/librarian index cc0a99f82..c3cfacbfd 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit cc0a99f82b1780ed842188fc22fbe18af6a9bc3b +Subproject commit c3cfacbfd878f8a26750f22f701f4ac23fa98163