diff --git a/openslides/agenda/forms.py b/openslides/agenda/forms.py index 0f27e254c..3578f95c5 100644 --- a/openslides/agenda/forms.py +++ b/openslides/agenda/forms.py @@ -63,7 +63,7 @@ class ItemOrderForm(CssClassMixin, forms.Form): class AppendSpeakerForm(CssClassMixin, forms.Form): speaker = PersonFormField( widget=forms.Select(attrs={'class': 'medium-input'}), - label=ugettext_lazy("Set a person to the speaker list.")) + label=ugettext_lazy("Add participant")) def __init__(self, item, *args, **kwargs): self.item = item @@ -73,6 +73,6 @@ class AppendSpeakerForm(CssClassMixin, forms.Form): speaker = self.cleaned_data['speaker'] if Speaker.objects.filter(person=speaker, item=self.item, time=None).exists(): raise forms.ValidationError(ugettext_lazy( - '%s is allready on the list of speakers.' - % speaker)) + '%s is already on the list of speakers.' + % unicode(speaker))) return speaker diff --git a/openslides/agenda/static/javascript/agenda.js b/openslides/agenda/static/javascript/agenda.js index 9de70b69a..35cb30765 100644 --- a/openslides/agenda/static/javascript/agenda.js +++ b/openslides/agenda/static/javascript/agenda.js @@ -34,15 +34,6 @@ function hideClosedSlides(hide) { return false; } -function toggleOldSpeakers() { - $('#show_old_speakers').toggle(); - $('#old_speakers').toggle(); -} - -$('.toggle_old_speakers > a').click(function() { - toggleOldSpeakers(); -}); - $('#speaker_list_changed_form').submit(function() { $('#sort_order').val($('#list_of_speakers').sortable("toArray")); }); @@ -95,9 +86,6 @@ $(function() { //# $('#hide_closed_items').attr('checked', true); //# } - // List of Speakers - toggleOldSpeakers(); - $('#list_of_speakers').sortable({axis: "y", containment: "parent", update: function(event, ui) { $('#speaker_list_changed_form').show(); }}); diff --git a/openslides/agenda/static/styles/agenda.css b/openslides/agenda/static/styles/agenda.css index 3c6ead5ea..2b8343ac9 100644 --- a/openslides/agenda/static/styles/agenda.css +++ b/openslides/agenda/static/styles/agenda.css @@ -21,3 +21,7 @@ table#agendatime td { padding: 3px; white-space: nowrap; } + +#list_of_speakers li { + line-height: 30px; +} diff --git a/openslides/agenda/templates/agenda/view.html b/openslides/agenda/templates/agenda/view.html index 66d40ee9e..1e5337580 100644 --- a/openslides/agenda/templates/agenda/view.html +++ b/openslides/agenda/templates/agenda/view.html @@ -6,6 +6,10 @@ {% block title %}{{ block.super }} – {{ item.title }}{% endblock %} +{% block header %} + +{% endblock %} + {% block javascript %} {{ block.super }} {% comment %} TODO: import the sortable-plugin in our custom jquery-file {% endcomment %} @@ -19,23 +23,25 @@
{% trans "Back to overview" %} + {% if perms.agenda.can_manage_agenda %}
{% trans 'More actions' %} - {% if perms.agenda.can_manage_agenda %} - {% endif %} + {% endif %}
- {% if perms.projector.can_manage_projector %} - - - - {% endif %} + {% if perms.projector.can_manage_projector %} + + + + {% endif %}
@@ -43,90 +49,128 @@ {% if perms.agenda.can_manage_agenda %} {% if item.comment %} -

{% trans "Comment" %}

+

{% trans "Comment" %}

{{ item.comment|linebreaks }}

{% endif %} {% endif %} {# List of Speakers #} -

{% trans "Speaker List" %}{% if item.speaker_list_closed %}({% trans 'Closed' %}){% endif %}

- -{% if item.speaker_list_closed %} - {% trans 'Open list of speakers' %} -{% else %} - {% trans 'Close list of speakers' %} +

{% trans "List of speakers" %} {% if item.speaker_list_closed %}{% trans 'closed' %}{% endif %}

+

+{% if perms.agenda.can_manage_agenda %} + {% if item.speaker_list_closed %} + {% trans 'Open list' %} + {% else %} + {% trans 'Close list' %} + {% endif %} {% endif %} +{% if perms.projector.can_manage_projector %} + + + {% trans 'Show list' %} + -

Show list of speakers

+{% endif %} +

{% if old_speakers %} - - -
- {% trans "Hide old speakers" %} -
    +
    + {% trans "Last speakers:" %} +
    + +
    +
    +
    {% for speaker in old_speakers %} -
  1. - {{ speaker.time }} - {{ speaker }} - + {% if not forloop.last %} + {{forloop.counter}}. + [{{ speaker.time }}h] + {{ speaker }} + {% if perms.agenda.can_manage_agenda %} + + + + {% endif %} +
    + {% endif %} + {% endfor %} +
  2. + {% if old_speakers %} + {% with last=old_speakers|last %} + {{ old_speakers|length }}. + [{{ last.time }}h] + {{ last }} + {% if perms.agenda.can_manage_agenda %} + - - {% endfor %} -
+ {% endif %} + + {% endwith %} + {% endif %}
{% endif %} {% if perms.agenda.can_manage_agenda %} {% endif %} -{% if speakers %} + +
+ {% trans "Next speakers:" %}
    {% for speaker in speakers %}
  1. {{ speaker }} - speak - - - + {% if perms.agenda.can_manage_agenda %} + Finished speech + + + + {% endif %}
  2. + {% empty %} + {% trans "The list of speakers is empty." %} {% endfor %}
-{% else %} -

{% trans 'The list of speakers is empty' %}

-{% endif %} +

+ {% if is_speaker %} + {% trans "Remove me from the list" %} + {% elif not object.speaker_list_closed %} + {% trans "Put me on the list" %} + {% endif %} +

+ {% if perms.can_manage_agenda %} +
{% csrf_token %} + {% for field in form %} + +
+ {{ field }} + + {% if perms.participant.can_see_participant and perms.participant.can_manage_participant %} + + {% endif %} + {% if field.errors %} + {{ field.errors }} + {% endif %} +
+ {% endfor %} +
+ {% endif %} -{% if is_speaker %} - {% trans "Remove me vom speakers list." %} -{% elif not object.speaker_list_closed %} - {% trans "Put me on speakers list." %} -{% endif %} - -{% if perms.can_manage_agenda %} -
{% csrf_token %} - {{ form.as_p }} - - {% if perms.participant.can_see_participant and perms.participant.can_manage_participant %} - - {% endif %} -
-{% endif %} - +
{% endblock %} diff --git a/openslides/agenda/templates/projector/agenda_list_of_speaker.html b/openslides/agenda/templates/projector/agenda_list_of_speaker.html index bb4401ebe..3bddb3791 100644 --- a/openslides/agenda/templates/projector/agenda_list_of_speaker.html +++ b/openslides/agenda/templates/projector/agenda_list_of_speaker.html @@ -10,7 +10,7 @@ {% block scrollcontent %} {% if speakers %} -
    +
      {% for speaker in speakers %}
    1. {{ speaker }}
    2. {% endfor %} diff --git a/openslides/agenda/views.py b/openslides/agenda/views.py index 7348d9fe2..a5fb9b8bf 100644 --- a/openslides/agenda/views.py +++ b/openslides/agenda/views.py @@ -129,17 +129,13 @@ class AgendaItemView(SingleObjectMixin, FormView): self.object = self.get_object() speakers = Speaker.objects.filter(time=None, item=self.object.pk).order_by('weight') old_speakers = list(Speaker.objects.exclude(time=None).order_by('time')) - try: - last_speaker = old_speakers[-1] - except IndexError: - last_speaker = None kwargs.update({ 'object': self.object, 'speakers': speakers, 'old_speakers': old_speakers, - 'last_speaker': last_speaker, 'is_speaker': Speaker.objects.filter( time=None, person=self.request.user, item=self.object).exists(), + 'show_list': config['presentation_argument'] == 'show_list_of_speakers', }) return super(AgendaItemView, self).get_context_data(**kwargs) diff --git a/openslides/projector/static/styles/projector.css b/openslides/projector/static/styles/projector.css index b956d7b6d..84b8aeb3d 100644 --- a/openslides/projector/static/styles/projector.css +++ b/openslides/projector/static/styles/projector.css @@ -146,7 +146,12 @@ body{ color: #9FA9B7; list-style-type: none; } - +/* list of speakers */ +#list_of_speakers li +{ + font-size: 130%; + line-height: 160%; +} /* Table */ table {