diff --git a/openslides/participant/models.py b/openslides/participant/models.py index 68d4034a3..2437ceba7 100644 --- a/openslides/participant/models.py +++ b/openslides/participant/models.py @@ -125,7 +125,8 @@ class User(DjangoUser, PersonMixin, Person, SlideMixin): register_slidemodel(User) -class Group(DjangoGroup, PersonMixin, Person): +class Group(DjangoGroup, PersonMixin, Person, SlideMixin): + prefix = 'group' # This is for the slides person_prefix = 'group' django_group = models.OneToOneField(DjangoGroup, editable=False, parent_link=True) @@ -155,6 +156,16 @@ class Group(DjangoGroup, PersonMixin, Person): class Meta: ordering = ('name',) + def slide(self): + """ + Returns a map with the data for the slides. + """ + return { + 'group': self, + 'title': self.name, + 'template': 'projector/GroupSlide.html'} + +register_slidemodel(Group) class UsersAndGroupsToPersons(object): """ diff --git a/openslides/participant/templates/projector/GroupSlide.html b/openslides/participant/templates/projector/GroupSlide.html new file mode 100644 index 000000000..26d420bef --- /dev/null +++ b/openslides/participant/templates/projector/GroupSlide.html @@ -0,0 +1,25 @@ +{% extends "base-projector.html" %} + +{% load i18n %} +{% load tags %} + +{% block title %}{{ block.super }} - {{ title }}{% endblock %} + +{% block content %} + +
{{ group.description }}
+ +{{ member }}
+ {% empty %} +{% trans "No members available." %}
+ {% endfor %} + +{% endblock %}