diff --git a/openslides/agenda/api.py b/openslides/agenda/api.py
index d07c306af..aa67e86c6 100644
--- a/openslides/agenda/api.py
+++ b/openslides/agenda/api.py
@@ -15,7 +15,7 @@ from django.contrib import messages
from django.core.context_processors import csrf
from openslides.system.api import config_get
-from beamer.api import get_active_element
+from projector.api import get_active_element
def is_summary():
diff --git a/openslides/agenda/models.py b/openslides/agenda/models.py
index f0228ef53..42bf0250c 100644
--- a/openslides/agenda/models.py
+++ b/openslides/agenda/models.py
@@ -18,8 +18,8 @@ except ImportError:
from django.db import models
from django.utils.translation import ugettext as _
-from beamer.models import Element
-from beamer.api import element_register
+from projector.models import Element
+from projector.api import element_register
from system.api import config_set
from application.models import Application
from poll.models import Poll
@@ -41,14 +41,14 @@ class Item(models.Model, Element):
prefix = 'item'
- def beamer(self):
+ def slide(self):
"""
- Return a map with all Data for the Beamer
+ Return a map with all Data for the Slide
"""
return {
'item': self,
'title': self.title,
- 'template': 'beamer/AgendaText.html',
+ 'template': 'projector/AgendaText.html',
}
@property
@@ -137,7 +137,7 @@ class Item(models.Model, Element):
def get_absolute_url(self, link='view'):
"""
Return the URL to this item. By default it is the Link to its
- beamer-view.
+ slide
link can be:
* view
diff --git a/openslides/agenda/templates/agenda/base_agenda.html b/openslides/agenda/templates/agenda/base_agenda.html
index 331f98d6f..6d9e54097 100644
--- a/openslides/agenda/templates/agenda/base_agenda.html
+++ b/openslides/agenda/templates/agenda/base_agenda.html
@@ -11,7 +11,7 @@
{%trans "New item" %}
{% endif %}
{% if perms.agenda.can_see_projector %}
- {%trans 'Projector view' %}
+ {%trans 'Projector view' %}
{% endif %}
{% endblock %}
diff --git a/openslides/agenda/templates/agenda/overview.html b/openslides/agenda/templates/agenda/overview.html
index bbde2f377..2c1319477 100644
--- a/openslides/agenda/templates/agenda/overview.html
+++ b/openslides/agenda/templates/agenda/overview.html
@@ -52,18 +52,18 @@
{% trans "Countdown" %} ({{countdown_time}}{% trans "sec" %} ){% if countdown_visible == "True" %}:
-
-
-
+
+
+
{% endif %}
-
+
{% trans "Adjust projector view" %}:
-
-
-
-
-
+
+
+
+
+
{% endif %}
diff --git a/openslides/agenda/templates/beamer/AgendaSummary.html b/openslides/agenda/templates/projector/AgendaSummary.html
similarity index 92%
rename from openslides/agenda/templates/beamer/AgendaSummary.html
rename to openslides/agenda/templates/projector/AgendaSummary.html
index 1a5b240a4..aa8fcc3f8 100644
--- a/openslides/agenda/templates/beamer/AgendaSummary.html
+++ b/openslides/agenda/templates/projector/AgendaSummary.html
@@ -1,4 +1,4 @@
-{% extends "beamer.html" %}
+{% extends "base-projector.html" %}
{% block title %}{{ block.super }} -
{% if title %} {{ title }} {% else %} {%trans "Agenda" %} {% endif %}
{% endblock %}
diff --git a/openslides/agenda/templates/beamer/AgendaText.html b/openslides/agenda/templates/projector/AgendaText.html
similarity index 88%
rename from openslides/agenda/templates/beamer/AgendaText.html
rename to openslides/agenda/templates/projector/AgendaText.html
index 36626b53d..3b7767ffe 100644
--- a/openslides/agenda/templates/beamer/AgendaText.html
+++ b/openslides/agenda/templates/projector/AgendaText.html
@@ -1,4 +1,4 @@
-{% extends "beamer.html" %}
+{% extends "base-projector.html" %}
{% block title %}{{ block.super }} - {{ item.title }}{% endblock %}
{% block content %}
{% if item.text %}
diff --git a/openslides/agenda/tests.py b/openslides/agenda/tests.py
index 8728c4f2d..f44fed453 100644
--- a/openslides/agenda/tests.py
+++ b/openslides/agenda/tests.py
@@ -110,20 +110,6 @@ class ViewTest(TestCase):
def anonymClient(self):
return Client()
- def testBeamer(self):
- c = self.anonymClient
- response = c.get('/beamer/')
- self.assertEqual(response.status_code, 302)
-
- c = self.adminClient
- response = c.get('/beamer/')
- self.assertEqual(response.status_code, 200)
-
- response = c.get('/agenda/%d/' % self.item1.id)
- self.assertEqual(response.status_code, 200)
- self.assertEqual(response.context['item'], self.item1.cast())
- self.assertEqual(response.templates[0].name, 'beamer/ItemText.html')
-
def testActivate(self):
c = self.adminClient
diff --git a/openslides/agenda/views.py b/openslides/agenda/views.py
index 9702b6b5b..3e16f3dd2 100644
--- a/openslides/agenda/views.py
+++ b/openslides/agenda/views.py
@@ -17,7 +17,7 @@ from django.core.urlresolvers import reverse
from django.contrib import messages
from django.utils.translation import ugettext as _
-from beamer.api import get_active_element
+from projector.api import get_active_element
from agenda.models import Item
from agenda.api import is_summary, children_list, \
del_confirm_form_for_items
@@ -37,14 +37,10 @@ def view(request, item_id):
Shows the Slide.
"""
item = Item.objects.get(id=item_id)
- votes = assignment_votes(item)
- polls = assignment_polls(item)
- return render_to_response('beamer/%s.html' % item.type,
+ return render_to_response('projector/AgendaText.html',
{
- 'item': item.cast(),
+ 'item': item,
'ajax': 'off',
- 'votes': votes,
- 'polls': polls,
},
context_instance=RequestContext(request))
diff --git a/openslides/application/models.py b/openslides/application/models.py
index 79404ed5e..5c74b4fc2 100644
--- a/openslides/application/models.py
+++ b/openslides/application/models.py
@@ -17,8 +17,8 @@ from django.db.models import Max
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
-from beamer.api import element_register
-from beamer.models import Element
+from projector.api import element_register
+from projector.models import Element
from participant.models import Profile
from system.api import config_get
@@ -430,14 +430,14 @@ class Application(models.Model, Element):
results.append([option.yes, option.no, option.undesided, poll.votesinvalidf, poll.votescastf])
return results
- def beamer(self):
+ def slide(self):
"""
- return the beamer dict
+ return the slide dict
"""
- data = super(Application, self).beamer()
+ data = super(Application, self).slide()
data['application'] = self
data['title'] = self.title
- data['template'] = 'beamer/Application.html'
+ data['template'] = 'projector/Application.html'
return data
@models.permalink
diff --git a/openslides/application/templates/beamer/Application.html b/openslides/application/templates/projector/Application.html
similarity index 98%
rename from openslides/application/templates/beamer/Application.html
rename to openslides/application/templates/projector/Application.html
index cad4db3e1..827f4e829 100644
--- a/openslides/application/templates/beamer/Application.html
+++ b/openslides/application/templates/projector/Application.html
@@ -1,4 +1,4 @@
-{% extends "beamer.html" %}
+{% extends "base-projector.html" %}
{% load tags %}
{% block title %}{{ block.super }} - {{ item.title }}{% endblock %}
{% block content %}
diff --git a/openslides/assignment/models.py b/openslides/assignment/models.py
index 337a6bb0b..6b0ed77a4 100644
--- a/openslides/assignment/models.py
+++ b/openslides/assignment/models.py
@@ -15,8 +15,8 @@ from django.utils.translation import ugettext as _
from participant.models import Profile
-from beamer.models import Element
-from beamer.api import element_register
+from projector.models import Element
+from projector.api import element_register
class Assignment(models.Model, Element):
@@ -117,14 +117,14 @@ class Assignment(models.Model, Element):
poll.add_option(candidate)
return poll
- def beamer(self):
+ def slide(self):
"""
- return the beamer dict
+ return the slide dict
"""
- data = super(Assignment, self).beamer()
+ data = super(Assignment, self).slide()
data['assignment'] = self
data['title'] = self.name
- data['template'] = 'beamer/Assignment.html'
+ data['template'] = 'projector/Assignment.html'
return data
@models.permalink
diff --git a/openslides/assignment/templates/beamer/Assignment.html b/openslides/assignment/templates/projector/Assignment.html
similarity index 99%
rename from openslides/assignment/templates/beamer/Assignment.html
rename to openslides/assignment/templates/projector/Assignment.html
index b0a6c38eb..bda794ae2 100644
--- a/openslides/assignment/templates/beamer/Assignment.html
+++ b/openslides/assignment/templates/projector/Assignment.html
@@ -1,4 +1,4 @@
-{% extends "beamer.html" %}
+{% extends "base-projector.html" %}
{% block title %}{{ block.super }} - #{{ item.title }}{% endblock %}
{% block header %}
diff --git a/openslides/beamer/urls.py b/openslides/beamer/urls.py
deleted file mode 100644
index 4fb419630..000000000
--- a/openslides/beamer/urls.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-"""
- openslides.beamer.urls
- ~~~~~~~~~~~~~~~~~~~~~~
-
- URL list for the beamer app.
-
- :copyright: 2011 by the OpenSlides team, see AUTHORS.
- :license: GNU GPL, see LICENSE for more details.
-"""
-
-from django.conf.urls.defaults import *
-
-urlpatterns = patterns('beamer.views',
- url(r'^$', 'beamer',
- name='beamer_show'),
-
- url(r'^bigger$', 'beamer_edit', {'direction': 'bigger'},
- name='beamer_bigger'),
-
- url(r'^smaller$', 'beamer_edit', {'direction': 'smaller'}, name='beamer_smaller'),
-
- url(r'^up$', 'beamer_edit', {'direction': 'up'},
- name='beamer_up'),
-
- url(r'^beamer/down$', 'beamer_edit', {'direction': 'down'},
- name='beamer_down'),
-
- url(r'^beamer/clean$', 'beamer_edit', {'direction': 'clean'},
- name='beamer_clean'),
-
- url(r'^beamer/countdown/show$', 'beamer_countdown', {'command': 'show'},
- name='countdown_open'),
-
- url(r'^beamer/countdown/hide$', 'beamer_countdown', {'command': 'hide'},
- name='countdown_close'),
-
- url(r'^beamer/countdown/reset/(?P\d+)$', 'beamer_countdown', {'command': 'reset'},
- name='countdown_reset'),
-
- url(r'^beamer/countdown/start$', 'beamer_countdown', {'command': 'start'},
- name='countdown_start'),
-
- url(r'^beamer/countdown/stop$', 'beamer_countdown', {'command': 'stop'},
- name='countdown_stop'),
-)
diff --git a/openslides/default.settings.py b/openslides/default.settings.py
index 62ee6bd8d..d4ad10687 100644
--- a/openslides/default.settings.py
+++ b/openslides/default.settings.py
@@ -130,7 +130,7 @@ INSTALLED_APPS = (
'poll',
'assignment',
'utils',
- 'beamer',
+ 'projector',
)
TEMPLATE_CONTEXT_PROCESSORS = (
diff --git a/openslides/beamer/__init__.py b/openslides/projector/__init__.py
similarity index 100%
rename from openslides/beamer/__init__.py
rename to openslides/projector/__init__.py
diff --git a/openslides/beamer/api.py b/openslides/projector/api.py
similarity index 96%
rename from openslides/beamer/api.py
rename to openslides/projector/api.py
index 481785cf0..9b8d2a4c4 100644
--- a/openslides/beamer/api.py
+++ b/openslides/projector/api.py
@@ -1,5 +1,5 @@
from system.api import config_set, config_get
-from beamer.models import ELEMENT
+from projector.models import ELEMENT
def get_element_from_eid(eid):
@@ -20,7 +20,7 @@ def get_active_element(only_eid=False):
if only_id is True, returns only the id of this item. Returns None if not Item
is active. Does not Raise Item.DoesNotExist
"""
- from beamer.models import Element
+ from projector.models import Element
eid = config_get("presentation", None)
if only_eid:
diff --git a/openslides/beamer/models.py b/openslides/projector/models.py
similarity index 87%
rename from openslides/beamer/models.py
rename to openslides/projector/models.py
index 8e81c967e..937e35a52 100644
--- a/openslides/beamer/models.py
+++ b/openslides/projector/models.py
@@ -6,9 +6,9 @@ ELEMENT = {}
class Element(object):
- def beamer(self):
+ def slide(self):
"""
- Return a map with all Data for the Beamer
+ Return a map with all Data for a Slide
"""
return {
'element': self,
@@ -30,7 +30,7 @@ class Element(object):
"""
Return True, if the the element is the active one.
"""
- from beamer.api import get_active_element
+ from projector.api import get_active_element
return True if get_active_element(only_eid=True) == self.eid else False
def set_active(self):
diff --git a/openslides/beamer/templates/beamer.html b/openslides/projector/templates/base-projector.html
similarity index 86%
rename from openslides/beamer/templates/beamer.html
rename to openslides/projector/templates/base-projector.html
index 18fdc4bfb..20aa533e2 100644
--- a/openslides/beamer/templates/beamer.html
+++ b/openslides/projector/templates/base-projector.html
@@ -4,10 +4,10 @@
{% load tags %}
-
+
-
+
{% block title %} {% get_config 'event_name' %} {% endblock %}
{% block header %}
{% endblock %}
@@ -19,7 +19,7 @@
diff --git a/openslides/beamer/tests.py b/openslides/projector/tests.py
similarity index 100%
rename from openslides/beamer/tests.py
rename to openslides/projector/tests.py
diff --git a/openslides/projector/urls.py b/openslides/projector/urls.py
new file mode 100644
index 000000000..ac0f10e6c
--- /dev/null
+++ b/openslides/projector/urls.py
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""
+ openslides.projector.urls
+ ~~~~~~~~~~~~~~~~~~~~~~
+
+ URL list for the projector app.
+
+ :copyright: 2011 by the OpenSlides team, see AUTHORS.
+ :license: GNU GPL, see LICENSE for more details.
+"""
+
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('projector.views',
+ url(r'^$', 'active_slide',
+ name='projector_show'),
+
+ url(r'^bigger$', 'projector_edit', {'direction': 'bigger'},
+ name='projector_bigger'),
+
+ url(r'^smaller$', 'projector_edit', {'direction': 'smaller'},
+ name='projector_smaller'),
+
+ url(r'^up$', 'projector_edit', {'direction': 'up'},
+ name='projector_up'),
+
+ url(r'^projector/down$', 'projector_edit', {'direction': 'down'},
+ name='projector_down'),
+
+ url(r'^projector/clean$', 'projector_edit', {'direction': 'clean'},
+ name='projector_clean'),
+
+ url(r'^projector/countdown/show$', 'projector_countdown', {'command': 'show'},
+ name='countdown_open'),
+
+ url(r'^projector/countdown/hide$', 'projector_countdown', {'command': 'hide'},
+ name='countdown_close'),
+
+ url(r'^projector/countdown/reset/(?P\d+)$', 'projector_countdown', {'command': 'reset'},
+ name='countdown_reset'),
+
+ url(r'^projector/countdown/start$', 'projector_countdown', {'command': 'start'},
+ name='countdown_start'),
+
+ url(r'^projector/countdown/stop$', 'projector_countdown', {'command': 'stop'},
+ name='countdown_stop'),
+)
diff --git a/openslides/beamer/views.py b/openslides/projector/views.py
similarity index 91%
rename from openslides/beamer/views.py
rename to openslides/projector/views.py
index 269e738f7..598559522 100644
--- a/openslides/beamer/views.py
+++ b/openslides/projector/views.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
- openslides.beamer.views
+ openslides.projector.views
~~~~~~~~~~~~~~~~~~~~~~~
- Views for the beamer app.
+ Views for the projector app.
:copyright: 2011 by the OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
@@ -28,11 +28,11 @@ from agenda.api import is_summary, children_list, \
del_confirm_form_for_items
from agenda.models import Item
-from beamer.api import get_active_element, assignment_votes, assignment_polls
+from projector.api import get_active_element, assignment_votes, assignment_polls
@permission_required('agenda.can_see_projector')
-def beamer(request):
+def active_slide(request):
"""
Shows the active Slide.
"""
@@ -45,7 +45,7 @@ def beamer(request):
if element is None:
data = {}
else:
- data = element.beamer()
+ data = element.slide()
data['ajax'] = 'on'
@@ -59,7 +59,7 @@ def beamer(request):
items = element.children.filter(hidden=False)
data['title'] = element.title
data['items'] = items
- data['template'] = 'beamer/AgendaSummary.html'
+ data['template'] = 'projector/AgendaSummary.html'
if request.is_ajax():
@@ -84,7 +84,7 @@ def beamer(request):
@permission_required('agenda.can_manage_agenda')
-def beamer_edit(request, direction):
+def projector_edit(request, direction):
if direction == 'bigger':
config_set('bigger', int(config_get('bigger', 100)) + 10)
elif direction == 'smaller':
@@ -103,7 +103,7 @@ def beamer_edit(request, direction):
@permission_required('agenda.can_manage_agenda')
-def beamer_countdown(request, command, time=60):
+def projector_countdown(request, command, time=60):
if command == 'show':
config_set('countdown_visible', True)
elif command == 'hide':
diff --git a/openslides/static/images/logo-beamer.png b/openslides/static/images/logo-projector.png
similarity index 100%
rename from openslides/static/images/logo-beamer.png
rename to openslides/static/images/logo-projector.png
diff --git a/openslides/static/javascript/agenda.js b/openslides/static/javascript/agenda.js
index 5201ae5c7..87a35b3f2 100644
--- a/openslides/static/javascript/agenda.js
+++ b/openslides/static/javascript/agenda.js
@@ -78,8 +78,8 @@ $(function() {
hideClosedSlides(true);
}
- // control beamer
- $('.beamer_edit').click(function(event) {
+ // control the projector
+ $('.projector_edit').click(function(event) {
event.preventDefault();
link = $(this);
$.ajax({
@@ -92,7 +92,7 @@ $(function() {
});
// control countdown
- $('.beamer_countdown').click(function(event) {
+ $('.projector_countdown').click(function(event) {
event.preventDefault();
link = $(this);
$.ajax({
diff --git a/openslides/static/javascript/beamer.js b/openslides/static/javascript/projector.js
similarity index 98%
rename from openslides/static/javascript/beamer.js
rename to openslides/static/javascript/projector.js
index 0d125dbb8..a306b9323 100644
--- a/openslides/static/javascript/beamer.js
+++ b/openslides/static/javascript/projector.js
@@ -2,7 +2,7 @@ function presentation_reload() {
if ($('#config > #ajax').html() == 'on') {
$.ajax({
type: 'GET',
- url: '/beamer',
+ url: '/projector',
dataType: 'json',
data: '',
success: function(data) {
diff --git a/openslides/static/styles/beamer.css b/openslides/static/styles/projector.css
similarity index 99%
rename from openslides/static/styles/beamer.css
rename to openslides/static/styles/projector.css
index 2e6108ee6..b028860dd 100644
--- a/openslides/static/styles/beamer.css
+++ b/openslides/static/styles/projector.css
@@ -1,5 +1,5 @@
/**
- * OpenSlides Beamer Style
+ * OpenSlides projector Style
*/
body{
margin : 0px;
diff --git a/openslides/urls.py b/openslides/urls.py
index e52251d60..77ed98e59 100644
--- a/openslides/urls.py
+++ b/openslides/urls.py
@@ -24,7 +24,7 @@ urlpatterns = patterns('',
(r'', include('openslides.participant.urls')),
(r'', include('openslides.assignment.urls')),
(r'', include('openslides.system.urls')),
- (r'beamer', include('beamer.urls')),
+ (r'projector', include('projector.urls')),
(r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_DOC_ROOT}),
(r'^i18n/', include('django.conf.urls.i18n')),
)