From ecf52489623823dfd7e561bb70f6a6c8bd86188e Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sun, 4 Aug 2013 12:59:11 +0200 Subject: [PATCH] Rework of the projector with websocket * 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 --- .../account/personal_info_widget.html | 8 +- openslides/agenda/models.py | 82 +++---- openslides/agenda/signals.py | 37 ++-- openslides/agenda/slides.py | 65 +++++- .../agenda/templates/agenda/item_row.html | 26 +-- .../agenda/templates/agenda/item_slide.html | 8 + .../agenda/item_slide_list_of_speaker.html | 40 ++++ .../templates/agenda/item_slide_summary.html | 9 + .../agenda/templates/agenda/overview.html | 6 +- openslides/agenda/templates/agenda/view.html | 22 +- .../agenda/templates/agenda/widget.html | 38 ++-- .../templates/projector/AgendaSummary.html | 19 -- .../templates/projector/AgendaText.html | 19 -- .../projector/agenda_list_of_speaker.html | 46 ---- openslides/agenda/views.py | 56 +++-- openslides/assignment/__init__.py | 1 + openslides/assignment/models.py | 70 +++--- openslides/assignment/slides.py | 38 ++++ .../assignment/assignment_detail.html | 12 +- .../templates/assignment/slide.html | 110 ++++++++++ .../templates/assignment/widget.html | 8 +- .../templates/projector/Assignment.html | 122 ----------- .../templates/mediafile/mediafile_list.html | 6 +- openslides/motion/models.py | 16 +- openslides/motion/slides.py | 23 +- .../templates/motion/motion_detail.html | 20 +- openslides/motion/templates/motion/slide.html | 69 ++++++ .../motion/templates/motion/widget.html | 12 +- .../motion/templates/projector/Motion.html | 76 ------- openslides/motion/views.py | 2 +- openslides/participant/__init__.py | 1 + openslides/participant/models.py | 116 ++++------ openslides/participant/slides.py | 48 +++++ .../templates/participant/group_detail.html | 2 +- .../templates/participant/group_overview.html | 2 +- .../templates/participant/group_slide.html | 7 + .../templates/participant/group_widget.html | 12 +- .../templates/participant/user_slide.html | 15 ++ .../templates/participant/user_widget.html | 13 +- .../templates/projector/GroupSlide.html | 13 -- .../templates/projector/UserSlide.html | 22 -- openslides/participant/views.py | 7 +- openslides/projector/__init__.py | 2 +- openslides/projector/api.py | 202 ++++++++++-------- openslides/projector/models.py | 93 ++++++-- openslides/projector/projector.py | 136 ++++-------- openslides/projector/signals.py | 82 ++++--- openslides/projector/slides.py | 36 ++++ .../projector/static/javascript/clock.js | 8 + .../projector/static/javascript/countdown.js | 25 +++ .../projector/static/javascript/projector.js | 107 +++++----- .../{base-projector.html => projector.html} | 42 ++-- .../templates/projector/ProjectorSlide.html | 19 -- .../templates/projector/all_overlays.html | 3 + .../projector/custom_slide_widget.html | 18 +- .../templates/projector/default.html | 8 - .../templates/projector/default_slide.html | 4 + .../projector/overlay_clock_projector.html | 1 + .../overlay_countdown_projector.html | 1 - .../projector/slide_projectorslide.html | 12 ++ openslides/projector/urls.py | 28 +-- openslides/projector/views.py | 140 ++++-------- openslides/utils/tornado_webserver.py | 27 ++- openslides/utils/utils.py | 7 + openslides/utils/views.py | 1 + tests/agenda/models.py | 17 +- tests/agenda/test_list_of_speakers.py | 17 +- tests/agenda/tests.py | 46 ++-- 68 files changed, 1242 insertions(+), 1164 deletions(-) create mode 100644 openslides/agenda/templates/agenda/item_slide.html create mode 100644 openslides/agenda/templates/agenda/item_slide_list_of_speaker.html create mode 100644 openslides/agenda/templates/agenda/item_slide_summary.html delete mode 100644 openslides/agenda/templates/projector/AgendaSummary.html delete mode 100644 openslides/agenda/templates/projector/AgendaText.html delete mode 100644 openslides/agenda/templates/projector/agenda_list_of_speaker.html create mode 100644 openslides/assignment/slides.py create mode 100644 openslides/assignment/templates/assignment/slide.html delete mode 100644 openslides/assignment/templates/projector/Assignment.html create mode 100644 openslides/motion/templates/motion/slide.html delete mode 100644 openslides/motion/templates/projector/Motion.html create mode 100644 openslides/participant/slides.py create mode 100644 openslides/participant/templates/participant/group_slide.html create mode 100644 openslides/participant/templates/participant/user_slide.html delete mode 100644 openslides/participant/templates/projector/GroupSlide.html delete mode 100644 openslides/participant/templates/projector/UserSlide.html create mode 100644 openslides/projector/slides.py create mode 100644 openslides/projector/static/javascript/clock.js create mode 100644 openslides/projector/static/javascript/countdown.js rename openslides/projector/templates/{base-projector.html => projector.html} (50%) delete mode 100644 openslides/projector/templates/projector/ProjectorSlide.html create mode 100644 openslides/projector/templates/projector/all_overlays.html delete mode 100644 openslides/projector/templates/projector/default.html create mode 100644 openslides/projector/templates/projector/default_slide.html create mode 100644 openslides/projector/templates/projector/overlay_clock_projector.html create mode 100644 openslides/projector/templates/projector/slide_projectorslide.html diff --git a/openslides/account/templates/account/personal_info_widget.html b/openslides/account/templates/account/personal_info_widget.html index d1e0d0ff3..9d21ecf43 100644 --- a/openslides/account/templates/account/personal_info_widget.html +++ b/openslides/account/templates/account/personal_info_widget.html @@ -4,7 +4,7 @@