2013-11-14 01:16:14 +01:00
|
|
|
from django.utils.translation import ugettext_lazy
|
|
|
|
|
|
|
|
from openslides.utils.widgets import Widget
|
|
|
|
|
|
|
|
from .models import Motion
|
|
|
|
|
|
|
|
|
|
|
|
class MotionWidget(Widget):
|
|
|
|
"""
|
|
|
|
Motion widget.
|
|
|
|
"""
|
|
|
|
name = 'motion'
|
|
|
|
verbose_name = ugettext_lazy('Motions')
|
2014-05-15 20:07:09 +02:00
|
|
|
required_permission = 'core.can_manage_projector'
|
2013-11-14 01:16:14 +01:00
|
|
|
default_column = 1
|
|
|
|
default_weight = 40
|
2014-01-14 23:22:29 +01:00
|
|
|
icon_css_class = 'icon-file'
|
2013-11-14 01:16:14 +01:00
|
|
|
template_name = 'motion/widget_motion.html'
|
|
|
|
more_link_pattern_name = 'motion_list'
|
|
|
|
|
|
|
|
def get_context_data(self, **context):
|
|
|
|
return super(MotionWidget, self).get_context_data(
|
|
|
|
motions=Motion.objects.all(),
|
|
|
|
**context)
|