2012-04-25 22:29:19 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
openslides.agenda.slides
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Slides for the agenda app.
|
|
|
|
|
|
|
|
:copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
|
|
|
|
:license: GNU GPL, see LICENSE for more details.
|
|
|
|
"""
|
|
|
|
|
2012-07-12 14:06:58 +02:00
|
|
|
from django.utils.translation import ugettext as _
|
|
|
|
|
2013-03-18 12:34:47 +01:00
|
|
|
from openslides.projector.api import register_slidemodel, register_slidefunc
|
|
|
|
|
|
|
|
from .models import Item
|
|
|
|
|
2012-02-09 01:46:58 +01:00
|
|
|
|
|
|
|
def agenda_show():
|
|
|
|
data = {}
|
2013-02-01 15:13:40 +01:00
|
|
|
items = Item.objects.filter(parent=None, type__exact=Item.AGENDA_ITEM)
|
2012-02-09 01:46:58 +01:00
|
|
|
data['title'] = _("Agenda")
|
|
|
|
data['items'] = items
|
|
|
|
data['template'] = 'projector/AgendaSummary.html'
|
|
|
|
return data
|
2013-03-18 12:34:47 +01:00
|
|
|
|
|
|
|
register_slidemodel(Item, control_template='agenda/control_item.html')
|
|
|
|
register_slidefunc('agenda', agenda_show, weight=-1, name=_('Agenda'))
|