diff --git a/openslides/agenda/templates/agenda/item_slide.html b/openslides/agenda/templates/agenda/item_slide.html index 296fec8b2..5ebbd3e26 100644 --- a/openslides/agenda/templates/agenda/item_slide.html +++ b/openslides/agenda/templates/agenda/item_slide.html @@ -5,8 +5,6 @@
-
- {% if item.text %} - {{ item.text|safe|linebreaks }} - {% endif %} -
+{% if item.text %} + {{ item.text|safe }} +{% endif %} diff --git a/openslides/agenda/templates/agenda/item_slide_list_of_speaker.html b/openslides/agenda/templates/agenda/item_slide_list_of_speaker.html index c6960681d..6f281588e 100644 --- a/openslides/agenda/templates/agenda/item_slide_list_of_speaker.html +++ b/openslides/agenda/templates/agenda/item_slide_list_of_speaker.html @@ -21,8 +21,7 @@ {% if item.speaker_list_closed %}({% trans 'closed' %}){% endif %} -
- {% if list_of_speakers %} +{% if list_of_speakers %} - {% else %} - {% trans 'The list of speakers is empty.' %} - {% endif %} -
- +{% else %} + {% trans 'The list of speakers is empty.' %} +{% endif %} diff --git a/openslides/assignment/templates/assignment/slide.html b/openslides/assignment/templates/assignment/slide.html index 70cc54c36..814e4adc6 100644 --- a/openslides/assignment/templates/assignment/slide.html +++ b/openslides/assignment/templates/assignment/slide.html @@ -19,94 +19,93 @@
-
- {% if not assignment.candidates %} -

-

{{ assignment.description|linebreaks }}
-

- {% endif %} - {% if assignment.candidates and assignment.status != "fin" %} -

{% trans "Candidates" %}

-
    - {% for candidate in assignment.candidates %} -
  1. {{ candidate }}
  2. - {% empty %} -
  3. - {% trans "No candidates available." %} -
  4. - {% endfor %} -
-


- {% endif %} +{% if not assignment.candidates %} +

+

{{ assignment.description|linebreaks }}
+

+{% endif %} - {% if polls.exists %} -

{% trans "Election results" %}

- +{% if assignment.candidates and assignment.status != "fin" %} +

{% trans "Candidates" %}

+
    + {% for candidate in assignment.candidates %} +
  1. {{ candidate }}
  2. + {% empty %} +
  3. + {% trans "No candidates available." %} +
  4. + {% endfor %} +
+


+{% endif %} + +{% if polls.exists %} +

{% trans "Election results" %}

+
+ + + {% for poll in polls %} + + {% endfor %} + + {% for candidate, poll_list in vote_results.items %} - - {% for poll in polls %} - - {% endfor %} - - {% for candidate, poll_list in vote_results.items %} - - - {% for vote in poll_list %} - + {% for vote in poll_list %} + - {% endfor %} - - {% endfor %} - - - {% for poll in polls %} - - - {% endfor %} - - - - {% for poll in polls %} - - {% endfor %} + {% endfor %} -
{% trans "Candidates" %} + {{ poll.get_ballot }}. {% trans "ballot" %} +
{% trans "Candidates" %} - {{ poll.get_ballot }}. {% trans "ballot" %} -
- {% if candidate in assignment.elected %} - - - - {% endif %} - {{ candidate }} - - {% if not "assignment_publish_winner_results_only"|get_config or candidate in assignment.elected %} - {% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %} - {{ vote.Yes }}
- {{ vote.No }}
- {{ vote.Abstain }}
- {% elif 'Votes' in vote %} - {{ vote.Votes }} - {% elif vote == None %} - {% trans 'was not a
candidate'%} - {% else %} -   - {% endif %} +
+ {% if candidate in assignment.elected %} + + + + {% endif %} + {{ candidate }} + + {% if not "assignment_publish_winner_results_only"|get_config or candidate in assignment.elected %} + {% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %} + {{ vote.Yes }}
+ {{ vote.No }}
+ {{ vote.Abstain }}
+ {% elif 'Votes' in vote %} + {{ vote.Votes }} + {% elif vote == None %} + {% trans 'was not a
candidate'%} {% else %}   {% endif %} -
{% trans 'Invalid votes' %} - {% if poll.has_votes %} - - {{ poll.print_votesinvalid }} - {% endif %} -
- {% trans 'Votes cast' %} + {% else %} +   + {% endif %} - {% if poll.has_votes %} - - {{ poll.print_votescast }} - {% endif %} -
- {% endif %} -
+ {% endfor %} + + {% trans 'Invalid votes' %} + {% for poll in polls %} + + {% if poll.has_votes %} + + {{ poll.print_votesinvalid }} + {% endif %} + + + {% endfor %} + + + + {% trans 'Votes cast' %} + + {% for poll in polls %} + + {% if poll.has_votes %} + + {{ poll.print_votescast }} + {% endif %} + + {% endfor %} + + +{% endif %} diff --git a/openslides/motion/templates/motion/slide.html b/openslides/motion/templates/motion/slide.html index 7271091be..67d3f9545 100644 --- a/openslides/motion/templates/motion/slide.html +++ b/openslides/motion/templates/motion/slide.html @@ -61,11 +61,9 @@
-
{{ motion.active_version.text|safe }}
{% if motion.active_version.reason %}

{% trans "Reason" %}:

{{ motion.active_version.reason|safe }}
{% endif %} -
diff --git a/openslides/projector/signals.py b/openslides/projector/signals.py index 65ffed53e..4ddda365b 100644 --- a/openslides/projector/signals.py +++ b/openslides/projector/signals.py @@ -57,7 +57,7 @@ def config_variables(sender, **kwargs): projector_scale = ConfigVariable( name='projector_scale', - default_value=100) + default_value=0) projector_scroll = ConfigVariable( name='projector_scroll', diff --git a/openslides/projector/static/javascript/dashboard.js b/openslides/projector/static/javascript/dashboard.js index eb6a9f40c..3e29a8c82 100644 --- a/openslides/projector/static/javascript/dashboard.js +++ b/openslides/projector/static/javascript/dashboard.js @@ -48,6 +48,14 @@ $(function() { url: link.attr('href'), dataType: 'json', success: function(data) { + $('#scale_level').html(data['scale_level']); + $('#scroll_level').html(data['scroll_level']); + if ( data['scroll_level'] == 0 ) + $('#scroll_up_button').addClass('disabled'); + else { + if ( $('#scroll_up_button').hasClass('disabled') ) + $('#scroll_up_button').removeClass('disabled'); + } } }); }); diff --git a/openslides/projector/static/javascript/projector.js b/openslides/projector/static/javascript/projector.js index 16dd75190..113f08b57 100644 --- a/openslides/projector/static/javascript/projector.js +++ b/openslides/projector/static/javascript/projector.js @@ -6,7 +6,6 @@ */ $(document).ready(function() { - $('#content .scroll').wrap('
'); if ($('#content.reload').length > 0) { updater.start(); } @@ -25,12 +24,11 @@ var projector = { }, scroll: function(value) { - $('#content .scroll').css('margin-top', value + 'em') + $('#content').css('margin-top', -10 * value + 'em'); }, scale: function(value) { - $('#content').css('font-size', value + '%'); - $('#content #sidebar').css('font-size', '18px'); + $('#content').css('font-size', 100 + 20 * value + '%'); }, update_data: function(data) { @@ -60,7 +58,6 @@ var updater = { updateProjector: function(data) { if (data.content) { $('#content').html(data.content); - $('#content .scroll').wrap('
'); } if (data.overlays) { $.each(data.overlays, function (key, value) { diff --git a/openslides/projector/static/styles/projector.css b/openslides/projector/static/styles/projector.css index 8336e2afa..d0bd283c2 100644 --- a/openslides/projector/static/styles/projector.css +++ b/openslides/projector/static/styles/projector.css @@ -86,39 +86,46 @@ body{ top: 150px; right: 40px; z-index: -1; - transition: all 2s; + transition: all 1s; + line-height: normal; } #content .scroll { - transition: margin 2s; -} -#content .scrollwrapper { - overflow: hidden; + transition: margin 1s; } h1 { - font-size: 45px !important; - margin-bottom: 40px !important; + font-size: 2.25em; + margin-bottom: 40px; + line-height: 0.95em; +} +h1 small { + font-size: 0.55em; +} +h3 { + font-size: 1.2em; } #sidebar { width: 255px; float: right; margin: 0 0 20px 10px; } +ul, ol { + margin: 0 0 10px 2em; +} +li { + line-height: normal; +} .well h4 { margin: 20px 0 2px 0; } .well h4 .first { margin-top: 0; } - -.well .results { - line-height: 30px; -} .well .results hr { - margin: 5px 0 !important; + margin: 5px 0; + border: 1px solid #E3E3E3; } - hr { - margin: 10px 0 !important; + margin: 10px 0; } diff --git a/openslides/projector/templates/projector.html b/openslides/projector/templates/projector.html index 357717e3f..60ce3a573 100644 --- a/openslides/projector/templates/projector.html +++ b/openslides/projector/templates/projector.html @@ -5,8 +5,8 @@ - + {% trans 'Projector' %} – {{ 'event_name'|get_config }} diff --git a/openslides/projector/templates/projector/live_view_widget.html b/openslides/projector/templates/projector/live_view_widget.html index 32cd362e5..8802c5ff2 100644 --- a/openslides/projector/templates/projector/live_view_widget.html +++ b/openslides/projector/templates/projector/live_view_widget.html @@ -1,4 +1,5 @@ {% load i18n %} +{% load tags %} @@ -11,22 +12,28 @@ {% if perms.projector.can_manage_projector %}

- + - + -    - - - - - - -    - + + {% trans "Zoom level" %}: {{ 'projector_scale'|get_config }} +

+

+ + + + + + + + + + {% trans "Scroll level" %}: {{ 'projector_scroll'|get_config }}

{% endif %} diff --git a/openslides/projector/templates/projector/projectorslide_slide.html b/openslides/projector/templates/projector/projectorslide_slide.html index f3ac1438f..6414bfa93 100644 --- a/openslides/projector/templates/projector/projectorslide_slide.html +++ b/openslides/projector/templates/projector/projectorslide_slide.html @@ -2,8 +2,6 @@

{{ slide.title }}

-
- {% if slide.text %} - {{ slide.text|safe|linebreaks }} - {% endif %} -
+{% if slide.text %} + {{ slide.text|safe|linebreaks }} +{% endif %} diff --git a/openslides/projector/urls.py b/openslides/projector/urls.py index bb5e4d860..c1931c05b 100644 --- a/openslides/projector/urls.py +++ b/openslides/projector/urls.py @@ -77,10 +77,15 @@ urlpatterns = patterns( {'direction': 'down'}, name='projector_down'), - url(r'^clean/$', + url(r'^clean/scale/$', views.ProjectorControllView.as_view(), - {'direction': 'clean'}, - name='projector_clean'), + {'direction': 'clean_scale'}, + name='projector_clean_scale'), + + url(r'^clean/scroll/$', + views.ProjectorControllView.as_view(), + {'direction': 'clean_scroll'}, + name='projector_clean_scroll'), url(r'^countdown/reset/$', views.CountdownControllView.as_view(), diff --git a/openslides/projector/views.py b/openslides/projector/views.py index 3611772d8..b58808c89 100644 --- a/openslides/projector/views.py +++ b/openslides/projector/views.py @@ -144,21 +144,28 @@ class ProjectorControllView(RedirectView): def pre_redirect(self, request, *args, **kwargs): direction = kwargs['direction'] if direction == 'bigger': - config['projector_scale'] = int(config['projector_scale']) + 20 + config['projector_scale'] = int(config['projector_scale']) + 1 elif direction == 'smaller': - config['projector_scale'] = int(config['projector_scale']) - 20 + config['projector_scale'] = int(config['projector_scale']) - 1 elif direction == 'down': - config['projector_scroll'] = int(config['projector_scroll']) - 5 + config['projector_scroll'] = int(config['projector_scroll']) + 1 elif direction == 'up': - if config['projector_scroll'] < 0: - config['projector_scroll'] = int(config['projector_scroll']) + 5 - elif direction == 'clean': - config['projector_scroll'] = config.get_default('projector_scroll') + if config['projector_scroll'] > 0: + config['projector_scroll'] = int(config['projector_scroll']) - 1 + elif direction == 'clean_scale': config['projector_scale'] = config.get_default('projector_scale') + elif direction == 'clean_scroll': + config['projector_scroll'] = config.get_default('projector_scroll') call_on_projector({'scroll': config['projector_scroll'], 'scale': config['projector_scale']}) + def get_ajax_context(self, **kwargs): + return { + 'scale_level': config['projector_scale'], + 'scroll_level': config['projector_scroll'], + } + class CountdownControllView(RedirectView): """