diff --git a/openslides/participant/models.py b/openslides/participant/models.py index d2e42e60a..6f90709f4 100644 --- a/openslides/participant/models.py +++ b/openslides/participant/models.py @@ -22,8 +22,11 @@ from openslides.utils.person.signals import receive_persons from openslides.config.models import config from openslides.config.signals import default_config_value +from openslides.projector.api import register_slidemodel +from openslides.projector.projector import SlideMixin -class User(DjangoUser, PersonMixin, Person): +class User(DjangoUser, PersonMixin, Person, SlideMixin): + prefix = 'user' # This is for the slides person_prefix = 'user' GENDER_CHOICES = ( ('male', _('Male')), @@ -111,6 +114,16 @@ class User(DjangoUser, PersonMixin, Person): ) ordering = ('last_name',) + def slide(self): + """ + Returns a map with the data for the slides. + """ + return { + 'shown_user': self, + 'title': self.clean_name, + 'template': 'projector/UserSlide.html'} + +register_slidemodel(User) class Group(DjangoGroup, PersonMixin, Person): person_prefix = 'group' diff --git a/openslides/participant/templates/projector/UserSlide.html b/openslides/participant/templates/projector/UserSlide.html new file mode 100644 index 000000000..3c38a273b --- /dev/null +++ b/openslides/participant/templates/projector/UserSlide.html @@ -0,0 +1,43 @@ +{% extends "base-projector.html" %} + +{% load i18n %} +{% load tags %} + +{% block title %}{{ block.super }} - {{ title }}{% endblock %} + +{% block content %} + + + +

{{ shown_user }}

+

{{ shown_user.email }}

+ +{% endblock %} + +{% block scrollcontent %} +

+

{{ shown_user.about_me|linebreaks }}
+

+ +{% endblock %}