Automated merge with ssh://openslides.org/openslides
This commit is contained in:
commit
4b2211d59f
@ -18,6 +18,7 @@ from django.dispatch import receiver
|
||||
from utils.translation_ext import ugettext as _
|
||||
|
||||
from openslides.config.signals import default_config_value
|
||||
import settings
|
||||
|
||||
|
||||
class ConfigStore(models.Model):
|
||||
@ -58,6 +59,8 @@ class Config(object):
|
||||
for receiver, value in default_config_value.send(sender='config', key=key):
|
||||
if value is not None:
|
||||
return value
|
||||
if settings.DEBUG:
|
||||
print "No default value for: %s" % key
|
||||
return None
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
@ -81,10 +84,12 @@ def default_config(sender, key, **kwargs):
|
||||
return {
|
||||
'event_name': _('OpenSlides'),
|
||||
'event_description': _('Presentation and voting system'),
|
||||
'presentation': '',
|
||||
'frontpage_title': _('Welcome'),
|
||||
'frontpage_welcometext': _('Welcome to OpenSlides!'),
|
||||
'show_help_text': True,
|
||||
'help_text': _('If you need any help wieth OpenSlides, you can find commercial support on our <a href="http://openslides.org/en/support">Webpage</a>.'),
|
||||
'system_enable_anonymous': False,
|
||||
}.get(key)
|
||||
|
||||
|
||||
|
@ -48,7 +48,7 @@ class ProjectorOverlay(models.Model):
|
||||
register_slidemodel(ProjectorSlide, model_name=_('Projector Slide'))
|
||||
|
||||
|
||||
@receiver(default_config_value, dispatch_uid="config_default_config")
|
||||
@receiver(default_config_value, dispatch_uid="projector_default_config")
|
||||
def default_config(sender, key, **kwargs):
|
||||
return {
|
||||
'projector_message': '',
|
||||
|
@ -122,7 +122,6 @@
|
||||
<img src="{% static 'images/icons/media-playback-pause.png' %}" />
|
||||
</a>
|
||||
{% endif %}
|
||||
{# Message #}
|
||||
{% if overlay.def_name == "Message" %}
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
<input name='message_text' type='text' style='width: 70%'
|
||||
|
@ -51,7 +51,8 @@ class ControlView(TemplateView):
|
||||
try:
|
||||
projector_overlay = ProjectorOverlay.objects.get(def_name=name)
|
||||
except ProjectorOverlay.DoesNotExist:
|
||||
projector_overlay = ProjectorOverlay(def_name=name, active=False)
|
||||
active = name == 'Message'
|
||||
projector_overlay = ProjectorOverlay(def_name=name, active=active)
|
||||
projector_overlay.save()
|
||||
overlays.append(projector_overlay)
|
||||
return overlays
|
||||
@ -92,7 +93,6 @@ class ControlView(TemplateView):
|
||||
|
||||
context.update({
|
||||
'categories': categories,
|
||||
'countdown_visible': config['countdown_visible'],
|
||||
'countdown_time': config['agenda_countdown_time'],
|
||||
'overlays': self.get_projector_overlays(),
|
||||
})
|
||||
@ -121,10 +121,10 @@ def active_slide(request, sid=None):
|
||||
data = get_active_slide()
|
||||
except AttributeError: #TODO: It has to be an Slide.DoesNotExist
|
||||
data = None
|
||||
data['ajax'] = 'on'
|
||||
ajax = 'on'
|
||||
else:
|
||||
data = get_slide_from_sid(sid)
|
||||
data['ajax'] = 'off'
|
||||
ajax = 'off'
|
||||
|
||||
if data is None:
|
||||
data = {
|
||||
@ -133,6 +133,7 @@ def active_slide(request, sid=None):
|
||||
}
|
||||
data['overlays'] = []
|
||||
data['overlay'] = ''
|
||||
data['ajax'] = ajax
|
||||
|
||||
# Projector Overlays
|
||||
sid = get_active_slide(True)
|
||||
|
Loading…
Reference in New Issue
Block a user