From e5e7e1bcce52029efd03738ddb6ff23f959498b5 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Mon, 3 Jun 2013 16:01:16 +0200 Subject: [PATCH 01/10] Template improvements. Improved agenda and participants overview. --- openslides/agenda/signals.py | 6 +- .../agenda/static/styles/agenda_sort.css | 10 +++- .../agenda/templates/agenda/item_row.html | 55 +++++++++++-------- openslides/agenda/views.py | 1 + .../templates/participant/overview.html | 20 +++++-- openslides/static/javascript/utils.js | 16 +++++- openslides/utils/templatetags/tags.py | 4 +- 7 files changed, 73 insertions(+), 39 deletions(-) diff --git a/openslides/agenda/signals.py b/openslides/agenda/signals.py index b4286aa27..843bb239e 100644 --- a/openslides/agenda/signals.py +++ b/openslides/agenda/signals.py @@ -51,15 +51,15 @@ def setup_agenda_config_page(sender, **kwargs): validators=[validate_start_time, ], widget=forms.DateTimeInput(format='%d.%m.%Y %H:%M'), required=False, - label=_('Begin of event'), - help_text=_('Input format: DD.MM.YYYY HH:MM'))) + label=ugettext_lazy('Begin of event'), + help_text=ugettext_lazy('Input format: DD.MM.YYYY HH:MM'))) agenda_show_last_speakers = ConfigVariable( name='agenda_show_last_speakers', default_value=1, form_field=forms.IntegerField( min_value=0, - label=_('Number of last speakers to be shown on the projector'))) + label=ugettext_lazy('Number of last speakers to be shown on the projector'))) extra_stylefiles = ['styles/timepicker.css', 'styles/jquery-ui/jquery-ui.custom.min.css'] extra_javascript = ['javascript/jquery-ui.custom.min.js', diff --git a/openslides/agenda/static/styles/agenda_sort.css b/openslides/agenda/static/styles/agenda_sort.css index 36d231b2f..fc2446b03 100644 --- a/openslides/agenda/static/styles/agenda_sort.css +++ b/openslides/agenda/static/styles/agenda_sort.css @@ -37,6 +37,9 @@ ol.agenda_list { filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); overflow: auto; } +.agenda_list li > div.activeline { + background: #bed4de !important; +} .agenda_list.sortable li > div { cursor: move; } @@ -52,13 +55,14 @@ ol.agenda_list { .agenda_list .openclose { width: 40px; float: left; min-height: 1px; } .agenda_list .duration { width: 92px; float: right; min-height: 1px; padding-left: 5px; } -.agenda_list .manage { width: 150px; float: right; min-height: 1px; padding-left: 5px; } +.agenda_list .manage { width: 200px; float: right; min-height: 1px; padding-left: 5px; } .agenda_list .title { float: left; } .agenda_list .optional { float: left; } -.agenda_list .opener_closer { float: left; margin-right: 10px; } +.agenda_list .opener_closer { float: left; margin-right: 10px; margin-left:-6px;} +.agenda_list .opener_closer .btn { padding: 0 2px; } .agenda_list .optional { float: right; width: 208px; padding-left: 8px;} -#menu-overview .manage { width: 150px; } +#menu-overview .manage { width: 200px; } #menu-overview .duration { width: 75px; } #menu-overview .optional { width: 200px; } diff --git a/openslides/agenda/templates/agenda/item_row.html b/openslides/agenda/templates/agenda/item_row.html index e8fb05dd4..ae973c19d 100644 --- a/openslides/agenda/templates/agenda/item_row.html +++ b/openslides/agenda/templates/agenda/item_row.html @@ -1,15 +1,15 @@ {% load i18n %} {% load tags %} -
+
{% if perms.agenda.can_manage_agenda or perms.projector.can_manage_projector %}
{% if perms.projector.can_manage_projector %} - + {% endif %} {% if perms.agenda.can_manage_agenda %} - + - + + + + {% if not node.is_leaf_node %} - - + + {% endif %} {% endif %} @@ -37,36 +44,36 @@ {% if perms.agenda.can_see_orga_items %}
{% if node.duration %} - {{ node.duration }}h {% if start and end %}{% endif %} + {{ node.duration }}h + {% if start and end %} + + + {% endif %} {% endif %}
{% endif %} {% if perms.agenda.can_manage_agenda %}
- {{ node.comment|first_line }} + {% if node.comment %} + {{ node.comment|first_line }} + + + + {% endif %}
{% endif %}
- - -
- -
- {% if perms.agenda.can_manage_agenda %} - - - - {% else %} - - - - {% endif %} + +
+ + + {% with form=node.weight_form %} {{ form.weight }} {{ form.self }} diff --git a/openslides/agenda/views.py b/openslides/agenda/views.py index 8642a8bec..3eb750143 100644 --- a/openslides/agenda/views.py +++ b/openslides/agenda/views.py @@ -83,6 +83,7 @@ class Overview(TemplateView): 'duration': duration, 'start': start, 'end': end, + 'summary': config['presentation_argument'] == 'summary', 'show_list': config['presentation_argument'] == 'show_list_of_speakers'}) return context diff --git a/openslides/participant/templates/participant/overview.html b/openslides/participant/templates/participant/overview.html index e277c1c9d..ebe77849e 100644 --- a/openslides/participant/templates/participant/overview.html +++ b/openslides/participant/templates/participant/overview.html @@ -46,8 +46,7 @@ {% trans "Present" %} {% trans "Title" %} - {% trans "First Name" %} - {% trans "Last Name" %} + {% trans "Name" %} {% trans "Structure level" %} {% trans "Group" %} {% trans "Committee" %} @@ -76,8 +75,13 @@ {% endif %} {{ user.title }} - {{ user.first_name }} - {{ user.last_name }} + + {% if 'participant_sort_users_by_first_name'|get_config %} + {{ user.first_name }} {{ user.last_name }} + {% else %} + {{ user.last_name }}, {{ user.first_name }} + {% endif %} + {{ user.structure_level }} {% for group in user.groups.all %} @@ -89,7 +93,13 @@ {{ user.committee }} {% if perms.participant.can_manage_participant %} - {{ user.comment|first_line }} + + {% if user.comment %} + + + + {% endif %} + {% if user.last_login > user.date_joined %} {{ user.last_login }} diff --git a/openslides/static/javascript/utils.js b/openslides/static/javascript/utils.js index 4737a7664..b6099bc4f 100644 --- a/openslides/static/javascript/utils.js +++ b/openslides/static/javascript/utils.js @@ -29,14 +29,19 @@ $(function () { success: function(data) { $('.activate_link').removeClass('btn-primary'); $('.activate_link i').removeClass('icon-white'); + $('tr').removeClass('activeline'); + $('div').removeClass('activeline'); + $('li').removeClass('activeline'); // is table line if ( link.parent().parent().parent().is("tr") ) { - $('tr').removeClass('activeline'); + link.parent().parent().parent().addClass('activeline'); + } + // is sortable list (agenda) + if ( link.parent().parent().parent().is("div") ) { link.parent().parent().parent().addClass('activeline'); } // is widget list item if ( link.parent().is("li") ) { - $('li').removeClass('activeline'); link.parent().addClass('activeline'); } link.addClass('btn-primary'); @@ -165,6 +170,13 @@ $(document).ready(function(){ $('.tooltip-bottom').tooltip({ placement: 'bottom' }); + //Popover + $(this).popover({ + selector: "a[rel=popover]", + placement: 'bottom', + html: true + }); + // Resize menu and content container function iconmenu(){ $('.leftmenu').removeClass('span2').addClass('lefticon').addClass('span1'); diff --git a/openslides/utils/templatetags/tags.py b/openslides/utils/templatetags/tags.py index 87c17e4e1..cb814067a 100644 --- a/openslides/utils/templatetags/tags.py +++ b/openslides/utils/templatetags/tags.py @@ -39,8 +39,8 @@ def first_line(text): lines = text.split('\n') except AttributeError: return '' - if len(lines) > 1 or len(lines[0]) > 40: + if len(lines) > 1 or len(lines[0]) > 30: s = "%s ..." else: s = "%s" - return s % lines[0][:40] + return s % lines[0][:30] From dad31e53e2cb4d7ddec388732d01498bf61ec83e Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Mon, 3 Jun 2013 22:39:48 +0200 Subject: [PATCH 02/10] Fixed merge error. --- THANKS | 77 +++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 66 insertions(+), 11 deletions(-) diff --git a/THANKS b/THANKS index 403257ff4..804a8fb18 100644 --- a/THANKS +++ b/THANKS @@ -5,29 +5,84 @@ OpenSlides uses parts of the following projects: * Django - + + License: BSD + +* Django mptt + + License: BSD * jQuery - - and some addons: cookie, form, once, templating + + License: MIT + and some plugins: + - jQuery DataTables Plugin + + License: BSD/GPLv2 + - jQuery Cookie Plugin + + License: MIT/GPL + - jQuery Form Plugin + + License: MIT/GPLv2 + - jQuery Once Plugin + + License: MIT/GPL + - jQuery Templating Plugin + + License: MIT/GPLv2 * jQuery UI - - custom ui components: core, widget, mouse, sortable, datepicker, slider - with css theme 'smoothness' - and some addons: slider access, timepicker - -* nestedSortable jQuery Plugin - + + with custom ui components: core, widget, mouse, sortable, datepicker, slider + and css theme 'smoothness' + License: MIT + and some addons: + - jQuery UI Nested Sortable + + License: MIT + - jQuery UI Slider Access + + License: MIT/GPLv2 + - jQuery timepicker addon + + License: MIT/GPLv2 * Twitter Bootstrap + License: Apache License v2.0 + +* CKEditor + + License: GPL, LGPL, MPL + +* Beautiful Soup + + License: MIT + +* Bleach + + License: BSD + +* Pillow + + License: Standard PIL License + +* qrcode + + License: BSD * ReportLab + License: BSD + +* Tornado + + License: Apache License v2.0 * Ubuntu TrueType Font - + + License: Ubuntu Font Licence 1.0 * Sphinx From ef6eaf8fa470e4cee48ae893a5230e432bc7ba31 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Mon, 3 Jun 2013 20:59:23 +0200 Subject: [PATCH 03/10] Fixed #703: Mcrophon icons for list of speakers --- openslides/agenda/templates/agenda/speaker_widget.html | 2 +- openslides/agenda/templates/agenda/view.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openslides/agenda/templates/agenda/speaker_widget.html b/openslides/agenda/templates/agenda/speaker_widget.html index 11a54fa25..b3ea0fcda 100644 --- a/openslides/agenda/templates/agenda/speaker_widget.html +++ b/openslides/agenda/templates/agenda/speaker_widget.html @@ -4,7 +4,7 @@

{% trans 'Put me on the current list of speakers' %}

{% endif %} -

{% trans 'Go to current list of speakers' %}

+

{% trans 'Go to current list of speakers' %}

{% if perms.agenda.can_manage_agenda %}
diff --git a/openslides/agenda/templates/agenda/view.html b/openslides/agenda/templates/agenda/view.html index c345a2fb3..c3b0396da 100644 --- a/openslides/agenda/templates/agenda/view.html +++ b/openslides/agenda/templates/agenda/view.html @@ -138,9 +138,9 @@

{% if is_on_the_list_of_speakers %} - {% trans "Remove me from the list" %} + {% trans "Remove me from the list" %} {% elif not object.speaker_list_closed and perms.agenda.can_be_speaker %} - {% trans "Put me on the list" %} + {% trans "Put me on the list" %} {% endif %}

From cd84d6407104323230c32051f728218cd79dd8db Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Mon, 3 Jun 2013 21:08:59 +0200 Subject: [PATCH 04/10] Fixed #702: list of speakers projetor/overlay style. --- .../templates/agenda/overlay_speaker_projector.html | 13 +++++++------ .../templates/projector/agenda_list_of_speaker.html | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/openslides/agenda/templates/agenda/overlay_speaker_projector.html b/openslides/agenda/templates/agenda/overlay_speaker_projector.html index cb86881ef..48cb3ea27 100644 --- a/openslides/agenda/templates/agenda/overlay_speaker_projector.html +++ b/openslides/agenda/templates/agenda/overlay_speaker_projector.html @@ -14,18 +14,19 @@ margin: 1em; z-index: 2; width: 45%; - min-width: 200px} + min-width: 200px;} #overlay_list_of_speaker_box h3 { - margin: 5px} + margin: 5px;} #overlay_list_of_speaker_box ul { - margin: 5px} + list-style-type: none; + margin: 5px;} #overlay_list_of_speaker_box li { font-size: 120%; - line-height: 120%} + line-height: 120%;} #overlay_list_of_speaker_box .old_speaker { - color: #777777} + color: #777777;} #overlay_list_of_speaker_box .actual_speaker { - margin-bottom: 0em} + margin-bottom: 0em;}
diff --git a/openslides/agenda/templates/projector/agenda_list_of_speaker.html b/openslides/agenda/templates/projector/agenda_list_of_speaker.html index 726180c39..e4eb018e7 100644 --- a/openslides/agenda/templates/projector/agenda_list_of_speaker.html +++ b/openslides/agenda/templates/projector/agenda_list_of_speaker.html @@ -9,15 +9,15 @@ /* List of speakers – projector slide */ ul#list_of_speakers { list-style-type: none; - padding: 0} + padding: 0;} #list_of_speakers li { font-size: 130%; - line-height: 150%} + line-height: 150%;} #list_of_speakers .old_speaker { - color: #9FA9B7} + color: #9FA9B7;} #list_of_speakers .actual_speaker { font-weight: bold; - margin-bottom: 0.5em} + margin-bottom: 0.5em;} {% endblock %} From 4126c180c8ef642d556639018f205752e605e6da Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Mon, 3 Jun 2013 21:54:52 +0200 Subject: [PATCH 05/10] Fixed #701: Check bootstrap tooltips on all buttons. --- .../agenda/static/styles/agenda_sort.css | 2 +- .../agenda/templates/agenda/overview.html | 30 +++++++++-------- openslides/agenda/templates/agenda/view.html | 12 ++++--- .../templates/assignment/overview.html | 19 +++++++---- .../assignment/templates/assignment/view.html | 32 +++++++++++-------- .../templates/mediafile/mediafile_list.html | 4 +-- .../templates/motion/category_list.html | 8 ++--- .../templates/motion/motion_detail.html | 10 ++++-- .../motion/templates/motion/motion_list.html | 14 ++++---- .../templates/participant/overview.html | 19 ++++++----- 10 files changed, 87 insertions(+), 63 deletions(-) diff --git a/openslides/agenda/static/styles/agenda_sort.css b/openslides/agenda/static/styles/agenda_sort.css index fc2446b03..6ccf635cb 100644 --- a/openslides/agenda/static/styles/agenda_sort.css +++ b/openslides/agenda/static/styles/agenda_sort.css @@ -56,7 +56,7 @@ ol.agenda_list { .agenda_list .openclose { width: 40px; float: left; min-height: 1px; } .agenda_list .duration { width: 92px; float: right; min-height: 1px; padding-left: 5px; } .agenda_list .manage { width: 200px; float: right; min-height: 1px; padding-left: 5px; } -.agenda_list .title { float: left; } +.agenda_list .title { float: left; padding-left: 5px;} .agenda_list .optional { float: left; } .agenda_list .opener_closer { float: left; margin-right: 10px; margin-left:-6px;} .agenda_list .opener_closer .btn { padding: 0 2px; } diff --git a/openslides/agenda/templates/agenda/overview.html b/openslides/agenda/templates/agenda/overview.html index 6cda8851f..44aeee972 100644 --- a/openslides/agenda/templates/agenda/overview.html +++ b/openslides/agenda/templates/agenda/overview.html @@ -46,18 +46,22 @@ {% if perms.agenda.can_see_orga_items %} - {% if start and end %} - - - - - - - - - -
{% trans "Start of event" %}:{{ start|date:"DATETIME_FORMAT" }}
{% trans "Estimated end" %}:{{ end|date:"DATETIME_FORMAT" }}
- {% endif %} + {% if start and end %} + + + + + + + + + +
{% trans "Start of event" %}:{{ start|date:"DATETIME_FORMAT" }}
{% trans "Estimated end" %}:{{ end|date:"DATETIME_FORMAT" }}
+ {% else %} + + {% endif %} {% endif %}