From 35e41873a04ea65f6150a054fe0e1c1fd9fe73bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Tue, 6 Nov 2012 00:02:44 +0100 Subject: [PATCH] Add UserSlide with new template. --- openslides/participant/models.py | 15 ++++++- .../templates/projector/UserSlide.html | 43 +++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 openslides/participant/templates/projector/UserSlide.html diff --git a/openslides/participant/models.py b/openslides/participant/models.py index 17c5ef832..ce06e5b0c 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 %}