update
[prawokultury.git] / prawokultury / menu_items.py
1 # -*- coding: utf-8
2 from menu.helpers import ObjectMenuItem, MenuItem, ModelMenuItem
3 from django.core.urlresolvers import reverse_lazy
4 from django.utils.translation import ugettext_lazy as _
5
6
7 def ITEMS():
8     from migdal.models import Category, Entry
9     return [
10     ObjectMenuItem(obj_get=lambda: Entry.published_objects.get(slug_pl='o-nas')),
11     ModelMenuItem(Entry, reverse_lazy('migdal_entry_list_publications'),
12                   field_lookups={'type': 'publications'}, title=_('Publications')),
13     MenuItem(reverse_lazy('events'), _('Events'), langs=['en']),
14     MenuItem('/kurs/', u'Kurs dla uczelni', langs=['pl']),
15     ObjectMenuItem(
16         obj_get=lambda: Category.objects.get(slug_pl='stanowisko'),
17         rev_lookups={Entry: 'categories'},
18         title=_('Positions')),
19     MenuItem(
20         reverse_lazy('questions'), _('First aid')),
21     ObjectMenuItem(
22         obj_get=lambda: Entry.published_objects.get(slug_pl='pierwsza-pomoc'),
23         title=_('Guide')),
24 ]