project ProjectorSlide
This commit is contained in:
parent
c0bf5ba822
commit
15a34fda97
@ -13,6 +13,14 @@ class ProjectorSlide(models.Model, SlideMixin):
|
|||||||
text = models.TextField(null=True, blank=True, verbose_name=_("Text"))
|
text = models.TextField(null=True, blank=True, verbose_name=_("Text"))
|
||||||
weight = models.IntegerField(default=0, verbose_name=_("Weight"))
|
weight = models.IntegerField(default=0, verbose_name=_("Weight"))
|
||||||
|
|
||||||
|
def slide(self):
|
||||||
|
return {
|
||||||
|
'slide': self,
|
||||||
|
'title': self.title,
|
||||||
|
'template': 'projector/ProjectorSlide.html',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
|
14
openslides/projector/templates/projector/ProjectorSlide.html
Normal file
14
openslides/projector/templates/projector/ProjectorSlide.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{% extends "base-projector.html" %}
|
||||||
|
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block title %}{{ block.super }} - {{ slide.title }}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% if slide.text %}
|
||||||
|
<h1>{{ slide.title }}</h1>
|
||||||
|
{{ slide.text|safe|linebreaks }}
|
||||||
|
{% else %}
|
||||||
|
<div class="item_fullscreen">{{ slide.title }}</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
@ -90,6 +90,8 @@ def active_slide(request):
|
|||||||
|
|
||||||
data['ajax'] = 'on'
|
data['ajax'] = 'on'
|
||||||
data['messages'] = []
|
data['messages'] = []
|
||||||
|
|
||||||
|
# Projector Messages
|
||||||
active_defs = ProjectorMessage.objects.filter(active=True).values_list('def_name', flat=True)
|
active_defs = ProjectorMessage.objects.filter(active=True).values_list('def_name', flat=True)
|
||||||
for receiver, response in projector_messages.send(sender='active_slide', register=False, call=active_defs):
|
for receiver, response in projector_messages.send(sender='active_slide', register=False, call=active_defs):
|
||||||
if response is not None:
|
if response is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user