changes from server
authorJan Szejko <j-sz@o2.pl>
Thu, 21 Jan 2016 13:22:29 +0000 (14:22 +0100)
committerJan Szejko <j-sz@o2.pl>
Thu, 21 Jan 2016 13:22:29 +0000 (14:22 +0100)
apps/catalogue/templates/catalogue/menu.html
apps/catalogue/templatetags/catalogue_tags.py
apps/catalogue/urls.py
lib/librarian

index 5ddbd3b..ee71d7a 100644 (file)
@@ -38,4 +38,4 @@
 
 </ul>
 
 
 </ul>
 
-{% endspaceless %}
\ No newline at end of file
+{% endspaceless %}
index 6e81cae..b99b9f6 100644 (file)
@@ -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'),
                 ('author', _('Authors'), 'autorzy'),
                 ('genre', _('Genres'), 'gatunki'),
                 ('kind', _('Kinds'), 'rodzaje'),
                 ('epoch', _('Epochs'), 'epoki'),
                 ('theme', _('Themes'), 'motywy'),
-        ]}
+        ],
+        'LANGUAGE_CODE': context.get('LANGUAGE_CODE'),
+        }
 
 
 @register.simple_tag
 
 
 @register.simple_tag
index b7c59a0..f24b246 100644 (file)
@@ -68,7 +68,7 @@ urlpatterns += patterns('catalogue.views',
         'book_fragments', name='book_fragments'),
 
     # Includes.
         'book_fragments', name='book_fragments'),
 
     # Includes.
-    url(r'^(?P<lang>[^/]+)\.json$', 'catalogue_json'),
+    url(r'^(?P<lang>[^/]+)\.json$', 'catalogue_json', name='catalogue_json'),
     url(r'^b/(?P<pk>\d+)/mini\.(?P<lang>.+)\.html', 'book_mini', name='catalogue_book_mini'),
     url(r'^b/(?P<pk>\d+)/mini_nolink\.(?P<lang>.+)\.html', 'book_mini', {'with_link': False}, name='catalogue_book_mini_nolink'),
     url(r'^b/(?P<pk>\d+)/short\.(?P<lang>.+)\.html', 'book_short', name='catalogue_book_short'),
     url(r'^b/(?P<pk>\d+)/mini\.(?P<lang>.+)\.html', 'book_mini', name='catalogue_book_mini'),
     url(r'^b/(?P<pk>\d+)/mini_nolink\.(?P<lang>.+)\.html', 'book_mini', {'with_link': False}, name='catalogue_book_mini_nolink'),
     url(r'^b/(?P<pk>\d+)/short\.(?P<lang>.+)\.html', 'book_short', name='catalogue_book_short'),
index cc0a99f..c3cfacb 160000 (submodule)
@@ -1 +1 @@
-Subproject commit cc0a99f82b1780ed842188fc22fbe18af6a9bc3b
+Subproject commit c3cfacbfd878f8a26750f22f701f4ac23fa98163