ask-a-lawyer stuff
[prawokultury.git] / prawokultury / menu_items.py
1 # -*- coding: utf-8
2 from migdal.models import Category, Entry
3 from menu.helpers import ObjectMenuItem, MenuItem, ModelMenuItem
4 from django.core.urlresolvers import reverse_lazy
5 from django.utils.translation import ugettext_lazy as _
6
7
8 ITEMS = []
9
10 ITEMS.append(ObjectMenuItem(
11     obj_get=lambda:Entry.published_objects.get(slug_pl='o-nas')
12 ))
13
14 ITEMS.append(ModelMenuItem(Entry, reverse_lazy('migdal_entry_list_publications'),
15         field_lookups={'type': 'publications'}, title=_('Publications')))
16
17 ITEMS.append(MenuItem(reverse_lazy('events'), _('Events'),
18         more_urls=(reverse_lazy('events_past'),)))
19
20 ITEMS.append(ObjectMenuItem(
21     obj_get=lambda:Category.objects.get(slug_pl='stanowisko'),
22     rev_lookups={Entry: 'categories'},
23     title=_('Positions')
24 ))
25
26 ITEMS.append(MenuItem(reverse_lazy('questions_form'), _('First aid'),
27         more_urls=(
28             reverse_lazy('questions'),
29             #reverse_lazy('questions_question'),
30             reverse_lazy('questions_thanks'),
31         )))
32
33 ITEMS.append(ObjectMenuItem(
34     obj_get=lambda:Entry.published_objects.get(slug_pl='pierwsza-pomoc'),
35     title=_('Guide')
36 ))