ecf5248962
* Set a static projector title * absolute_urls for the activate links * update the projector when a slide changes (in save()) * insert the absolute_url template filter * Preview to slides * renamed is_active to is_active_slide * The SlideMixin has to come before the PersonMixin * Update list of speakers * Render Countdown via JS * Reconnect projector after connection lost * Overlays can allways be active and do not appear in the widget * Rewrote the clock as overlay
37 lines
871 B
Python
37 lines
871 B
Python
#!/usr/bin/env python
|
||
# -*- coding: utf-8 -*-
|
||
"""
|
||
openslides.projector.slides
|
||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
||
Slides for the projector app.
|
||
|
||
:copyright: 2011–2013 by OpenSlides team, see AUTHORS.
|
||
:license: GNU GPL, see LICENSE for more details.
|
||
"""
|
||
|
||
from django.template.loader import render_to_string
|
||
|
||
from openslides.config.api import config
|
||
from openslides.projector.api import register_slide
|
||
|
||
from .models import ProjectorSlide
|
||
|
||
|
||
def projector_slide(**kwargs):
|
||
"""
|
||
Return the html code for a custom slide.
|
||
"""
|
||
slide_pk = kwargs.get('pk', None)
|
||
|
||
try:
|
||
slide = ProjectorSlide.objects.get(pk=slide_pk)
|
||
except ProjectorSlide.DoesNotExist:
|
||
slide = None
|
||
|
||
context = {'slide': slide}
|
||
return render_to_string('projector/slide_projectorslide.html', context)
|
||
|
||
|
||
register_slide('projector_slide', projector_slide)
|