diff --git a/openslides/agenda/models.py b/openslides/agenda/models.py index 9de46ee4d..b71817e22 100644 --- a/openslides/agenda/models.py +++ b/openslides/agenda/models.py @@ -77,7 +77,7 @@ class Item(MPTTModel, SlideMixin): """ Type of the agenda item. - See Agenda.ITEM_TYPE for more informations. + See Item.ITEM_TYPE for more information. """ duration = models.CharField(null=True, blank=True, max_length=5, @@ -191,11 +191,11 @@ class Item(MPTTModel, SlideMixin): * normal slide of the item The method returns only one of them according to the config value - 'presentation_argument' and the attribut 'related_sid'. + 'presentation_argument' and the attribute 'related_sid'. """ if config['presentation_argument'] == 'summary': data = {'title': self.get_title(), - 'items': self.get_children(), + 'items': self.get_children().filter(type__exact=Item.AGENDA_ITEM), 'template': 'projector/AgendaSummary.html'} elif config['presentation_argument'] == 'show_list_of_speakers': diff --git a/openslides/agenda/signals.py b/openslides/agenda/signals.py index e7f92afed..fec09339d 100644 --- a/openslides/agenda/signals.py +++ b/openslides/agenda/signals.py @@ -84,7 +84,10 @@ def agenda_list_of_speakers(sender, **kwargs): """ slide = get_slide_from_sid(get_active_slide(only_sid=True), element=True) if not isinstance(slide, Item): - # Only show list of speakers on Agenda-Items + # Only show list of speakers overlay on agenda items + return None + if config['presentation_argument'] == 'show_list_of_speakers': + # Do not show list of speakers overlay on the list of speakers slide return None clear_projector_cache() list_of_speakers = slide.get_list_of_speakers( diff --git a/openslides/agenda/templates/agenda/overlay_speaker_projector.html b/openslides/agenda/templates/agenda/overlay_speaker_projector.html index 287536aa0..6c9b9ac3a 100644 --- a/openslides/agenda/templates/agenda/overlay_speaker_projector.html +++ b/openslides/agenda/templates/agenda/overlay_speaker_projector.html @@ -35,8 +35,8 @@
{% if is_on_the_list_of_speakers %} {% trans "Remove me from the list" %} - {% elif not object.speaker_list_closed and perms.can_be_speaker %} + {% elif not object.speaker_list_closed and perms.agenda.can_be_speaker %} {% trans "Put me on the list" %} {% endif %}
diff --git a/openslides/agenda/views.py b/openslides/agenda/views.py index 0f340bbed..b050aacb5 100644 --- a/openslides/agenda/views.py +++ b/openslides/agenda/views.py @@ -450,13 +450,14 @@ class CurrentListOfSpeakersView(RedirectView): """ Returns the URL to the item_view if: - * the current slide is an item and - * the user has the permission to see the item + * the current slide is an item, + * the user has the permission to see the item and + * the list of speakers of the item is not closed, in other case, it returns the URL to the dashboard. - This method also add the request.user to the list of speakers, if he - has the right permissions. + This method also adds the request.user to the list of speakers, if he + has the right permissions and the list is not closed. """ item = self.get_item() request = self.request @@ -466,6 +467,10 @@ class CurrentListOfSpeakersView(RedirectView): 'Please choose the agenda item manually from the agenda.')) return reverse('dashboard') + if item.speaker_list_closed: + messages.error(request, _('The list of speakers is closed.')) + return reverse('dashboard') + if self.request.user.has_perm('agenda.can_be_speaker'): try: Speaker.objects.add(self.request.user, item) diff --git a/openslides/core/templates/core/version.html b/openslides/core/templates/core/version.html index ee118188c..b83508bcc 100644 --- a/openslides/core/templates/core/version.html +++ b/openslides/core/templates/core/version.html @@ -6,7 +6,9 @@ {% block content %}{{ version.0 }} {% trans "Version" %}: {{ version.1 }}
+