From 34701c67a6ed61674785cff008ed1790ff67a1ba Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Sat, 9 Nov 2013 23:04:50 +0100 Subject: [PATCH] Template improvements. - motion detail template: Fixes motion manage state template block. - mediafile list template: Fixed missing activeline class. - item detail template: Fixed is_active_slide conditions. - assignment view template: Use bottongroup instead of single radio buttons. - Projector template: Updated header and countdown style. Removed footer. - Added config options to show logo and/or title/description. - Projector template: New config options to set background color and font color for projector header. - Make WLAN form labels not translateable. --- openslides/agenda/templates/agenda/view.html | 8 +-- .../assignment/assignment_detail.html | 23 +++--- openslides/core/signals.py | 54 ++++++++++++-- .../templates/mediafile/mediafile_list.html | 2 +- .../templates/motion/motion_detail.html | 10 +-- .../projector/static/styles/projector.css | 72 +++++++------------ openslides/projector/templates/projector.html | 43 +++++++---- .../overlay_countdown_projector.html | 9 +-- 8 files changed, 130 insertions(+), 91 deletions(-) diff --git a/openslides/agenda/templates/agenda/view.html b/openslides/agenda/templates/agenda/view.html index 0b033d77d..d7e00f049 100644 --- a/openslides/agenda/templates/agenda/view.html +++ b/openslides/agenda/templates/agenda/view.html @@ -23,9 +23,9 @@ {% trans "Back to overview" %} {% if perms.projector.can_manage_projector %} - + {% endif %} {% if perms.agenda.can_manage_agenda %} @@ -69,9 +69,9 @@ {% endif %} {% if perms.projector.can_manage_projector %} - + {% trans 'Show list' %} {% endif %} diff --git a/openslides/assignment/templates/assignment/assignment_detail.html b/openslides/assignment/templates/assignment/assignment_detail.html index 53daa97e5..0b188b743 100644 --- a/openslides/assignment/templates/assignment/assignment_detail.html +++ b/openslides/assignment/templates/assignment/assignment_detail.html @@ -283,18 +283,17 @@ {% if perms.assignment.can_manage_assignment %}

{% trans "Change status" %}:

- - - +
{% endif %} diff --git a/openslides/core/signals.py b/openslides/core/signals.py index 70d28b7ae..6fa7f200b 100644 --- a/openslides/core/signals.py +++ b/openslides/core/signals.py @@ -59,6 +59,48 @@ def setup_general_config_page(sender, **kwargs): label=ugettext_lazy('Event organizer'), required=False)) + projector_enable_logo = ConfigVariable( + name='projector_enable_logo', + default_value=True, + form_field=forms.BooleanField( + label=ugettext_lazy('Show logo on projector'), + help_text=ugettext_lazy('You can find and replace the logo under "openslides/static/img/projector/static/img/logo-projector.png".'), + required=False)) + + projector_enable_title = ConfigVariable( + name='projector_enable_title', + default_value=True, + form_field=forms.BooleanField( + label=ugettext_lazy('Show titel and description of event on projector'), + required=False)) + + projector_backgroundcolor1 = ConfigVariable( + name='projector_backgroundcolor1', + default_value='#444444', + form_field=forms.CharField( + widget=forms.TextInput(), + label=ugettext_lazy('Background color of projector header'), + help_text=ugettext_lazy('Use web color names like "red" or hex numbers like "#ff0000".'), + required=True)) + + projector_backgroundcolor2 = ConfigVariable( + name='projector_backgroundcolor2', + default_value='#222222', + form_field=forms.CharField( + widget=forms.TextInput(), + label=ugettext_lazy('Second (optional) background color for linear color gradient'), + help_text=ugettext_lazy('Use web color names like "red" or hex numbers like "#ff0000".'), + required=False)) + + projector_fontcolor = ConfigVariable( + name='projector_fontcolor', + default_value='#F5F5F5', + form_field=forms.CharField( + widget=forms.TextInput(), + label=ugettext_lazy('Font color of projector header'), + help_text=ugettext_lazy('Use web color names like "red" or hex numbers like "#ff0000".'), + required=True)) + welcome_title = ConfigVariable( name='welcome_title', default_value=_('Welcome to OpenSlides'), @@ -119,15 +161,19 @@ def setup_general_config_page(sender, **kwargs): label=ugettext_lazy('WLAN encryption'), help_text=ugettext_lazy('Used for WLAN QRCode in PDF of access data.'), choices=( - ('', ugettext_lazy('---------')), - ('WEP', ugettext_lazy('WEP')), - ('WPA', ugettext_lazy('WPA/WPA2')), + ('', '---------'), + ('WEP', 'WEP'), + ('WPA', 'WPA/WPA2'), ('nopass', ugettext_lazy('No encryption'))))) group_event = ConfigGroup( title=ugettext_lazy('Event'), variables=(event_name, event_description, event_date, event_location, event_organizer)) + group_projector = ConfigGroup( + title=ugettext_lazy('Projector'), + variables=(projector_enable_logo, projector_enable_title, projector_backgroundcolor1, projector_backgroundcolor2, projector_fontcolor)) + group_welcome_widget = ConfigGroup( title=ugettext_lazy('Welcome Widget'), variables=(welcome_title, welcome_text)) @@ -141,4 +187,4 @@ def setup_general_config_page(sender, **kwargs): url='general', required_permission='config.can_manage', weight=10, - groups=(group_event, group_welcome_widget, group_system)) + groups=(group_event, group_projector, group_welcome_widget, group_system)) diff --git a/openslides/mediafile/templates/mediafile/mediafile_list.html b/openslides/mediafile/templates/mediafile/mediafile_list.html index c78a64101..ea033c59b 100644 --- a/openslides/mediafile/templates/mediafile/mediafile_list.html +++ b/openslides/mediafile/templates/mediafile/mediafile_list.html @@ -25,7 +25,7 @@ {% endif %} {% for mediafile in mediafile_list %} - + {{ mediafile }} {{ mediafile.filetype }} {{ mediafile.get_filesize }} diff --git a/openslides/motion/templates/motion/motion_detail.html b/openslides/motion/templates/motion/motion_detail.html index 680e8663c..cb072358a 100644 --- a/openslides/motion/templates/motion/motion_detail.html +++ b/openslides/motion/templates/motion/motion_detail.html @@ -292,13 +292,15 @@

{% trans "Manage motion" %}

-
{% for state in motion.state.next_states.all %} + {% if forloop.first %} +
+ {% endif %} {% trans state.get_action_word %} + {% if forloop.last %} +
+ {% endif %} {% endfor %} -
-

-
{% trans "For administration only:" %}
{% trans 'Reset state' %} diff --git a/openslides/projector/static/styles/projector.css b/openslides/projector/static/styles/projector.css index 85f76a818..57a2b72a1 100644 --- a/openslides/projector/static/styles/projector.css +++ b/openslides/projector/static/styles/projector.css @@ -13,25 +13,37 @@ body{ /*** HEADER ***/ #header { - background-color: #333333; - background-image: -moz-linear-gradient(top, #444444, #222222); - background-image: -ms-linear-gradient(top, #444444, #222222); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); - background-image: -webkit-linear-gradient(top, #444444, #222222); - background-image: -o-linear-gradient(top, #444444, #222222); - background-image: linear-gradient(top, #444444, #222222); box-shadow: 0 0 7px rgba(0,0,0,0.6); height: 70px; margin-bottom: 20px; - padding: 7px 20px 0; - position: relative; } #logo { - position: absolute; - top: 8px; + position: relative; left: 75px; + top: 4px; + height: 60px; + margin-right: 35px; + float: left; +} +#eventdata { + position: relative; + left: 75px; + top: 12px; + height: 50px; + overflow: hidden; +} +#eventdata .title { + font-size: 26px; + font-weight: bold; + } +#eventdata .title.titleonly { + position: relative; + top: 12px; +} +#eventdata .description { + font-size: 18px; + opacity: 0.5; } - #currentTime { border:0 solid #000000; font-size:24px; @@ -43,42 +55,6 @@ body{ background: url(../img/glyphicons_054_clock_big.png) no-repeat scroll 0px 0px; } -/*** FOOTER ***/ -#footer { - color: #999999; - font-size: 16px; - clear: both; - margin-top: 50px; - position: fixed; - left: 0px; - right: 0; - bottom: 0px; - height: 30px; - padding-top: 10px; - background-color: #333333; - background-image: -moz-linear-gradient(top, #444444, #222222); - background-image: -ms-linear-gradient(top, #444444, #222222); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); - background-image: -webkit-linear-gradient(top, #444444, #222222); - background-image: -o-linear-gradient(top, #444444, #222222); - background-image: linear-gradient(top, #444444, #222222); - box-shadow: 0 0 7px rgba(0,0,0,0.6); - border-top: 1px solid #999999; - -} -.event_name_description { - left: 75px; - float: left; - position: absolute; - width: 50%; -} -.event_date_location { - text-align: right; - right: 40px; - position: absolute; - width: 40%; -} - /*** CONTENT ***/ #content { position: absolute; diff --git a/openslides/projector/templates/projector.html b/openslides/projector/templates/projector.html index 52aa5f387..56d4c0f75 100644 --- a/openslides/projector/templates/projector.html +++ b/openslides/projector/templates/projector.html @@ -23,12 +23,38 @@ {% endfor %} }); - +
@@ -38,16 +64,5 @@
{{ content }}
- - diff --git a/openslides/projector/templates/projector/overlay_countdown_projector.html b/openslides/projector/templates/projector/overlay_countdown_projector.html index 96fa536b0..0dc98ef1c 100644 --- a/openslides/projector/templates/projector/overlay_countdown_projector.html +++ b/openslides/projector/templates/projector/overlay_countdown_projector.html @@ -2,13 +2,14 @@ #overlay_countdown_inner { position: fixed; right: 40px; - height: 37px; + height: 30px; + width: 215px; + margin: 0; top: 0; - padding: 20px 50px; font-size: 4em; font-weight: bold; - border-bottom-left-radius: 0.5em; - border-bottom-right-radius: 0.5em; + text-align: center; + border-radius: 0 0 0.2em 0.2em; }