diff --git a/openslides/agenda/models.py b/openslides/agenda/models.py
index b6857e0c0..088afed44 100644
--- a/openslides/agenda/models.py
+++ b/openslides/agenda/models.py
@@ -164,10 +164,8 @@ class Item(SlideMixin, AbsoluteUrlMixin, MPTTModel):
Return the title of this item.
"""
if not self.content_object:
- if config['agenda_enable_auto_numbering']:
- item_no = self.item_no
- return '%s %s' % (item_no, self.title) if item_no else self.title
- return self.title
+ item_no = self.item_no
+ return '%s %s' % (item_no, self.title) if item_no else self.title
try:
return self.content_object.get_agenda_title()
except AttributeError:
@@ -306,12 +304,8 @@ class Item(SlideMixin, AbsoluteUrlMixin, MPTTModel):
@property
def item_no(self):
- if config['agenda_agenda_fixed']:
- item_number = self.item_number
- else:
- item_number = self.calc_item_no()
- if item_number:
- item_no = '%s %s' % (config['agenda_number_prefix'], item_number)
+ if self.item_number:
+ item_no = '%s %s' % (config['agenda_number_prefix'], self.item_number)
else:
item_no = None
return item_no
diff --git a/openslides/agenda/signals.py b/openslides/agenda/signals.py
index d5c14cabb..aa818ccf1 100644
--- a/openslides/agenda/signals.py
+++ b/openslides/agenda/signals.py
@@ -60,13 +60,6 @@ def setup_agenda_config(sender, **kwargs):
help_text=ugettext_lazy('[Begin speach] starts the countdown, [End speach] stops the countdown.'),
required=False))
- agenda_enable_auto_numbering = ConfigVariable(
- name='agenda_enable_auto_numbering',
- default_value=False,
- form_field=forms.BooleanField(
- label=ugettext_lazy('Enable automatic numbering of agenda items'),
- required=False))
-
agenda_number_prefix = ConfigVariable(
name='agenda_number_prefix',
default_value='',
@@ -86,10 +79,6 @@ def setup_agenda_config(sender, **kwargs):
('roman', ugettext_lazy('Roman'))),
required=False))
- agenda_agenda_fixed = ConfigVariable(
- name='agenda_agenda_fixed',
- default_value=False)
-
extra_stylefiles = ['css/jquery-ui-timepicker.css']
extra_javascript = ['js/jquery/jquery-ui-timepicker-addon.min.js',
'js/jquery/jquery-ui-sliderAccess.min.js',
@@ -102,10 +91,8 @@ def setup_agenda_config(sender, **kwargs):
variables=(agenda_start_event_date_time,
agenda_show_last_speakers,
agenda_couple_countdown_and_speakers,
- agenda_enable_auto_numbering,
agenda_number_prefix,
- agenda_numeral_system,
- agenda_agenda_fixed),
+ agenda_numeral_system),
extra_context={'extra_stylefiles': extra_stylefiles,
'extra_javascript': extra_javascript})
diff --git a/openslides/agenda/templates/agenda/overview.html b/openslides/agenda/templates/agenda/overview.html
index 148c7910a..6b96db6db 100644
--- a/openslides/agenda/templates/agenda/overview.html
+++ b/openslides/agenda/templates/agenda/overview.html
@@ -70,11 +70,9 @@
{% else %}
{% trans 'Set start time of event' %}
{% endif %}
- {% if perms.agenda.can_manage_agenda and agenda_enable_auto_numbering %}
- {% trans 'Fix numbering' %}
- {% trans 'Reset numbering' %}
+ {% if perms.agenda.can_manage_agenda %}
+ {% trans 'Number agenda items' %}
{% endif %}
{% endif %}
diff --git a/openslides/agenda/urls.py b/openslides/agenda/urls.py
index c311f8aad..218e3148f 100644
--- a/openslides/agenda/urls.py
+++ b/openslides/agenda/urls.py
@@ -40,13 +40,9 @@ urlpatterns = patterns(
views.AgendaPDF.as_view(),
name='print_agenda'),
- url(r'^fix/$',
- views.FixAgendaView.as_view(),
- name='fix_agenda'),
-
- url(r'^reset/$',
- views.ResetAgendaView.as_view(),
- name='reset_agenda'),
+ url(r'^numbering/$',
+ views.AgendaNumberingView.as_view(),
+ name='agenda_numbering'),
# List of speakers
url(r'^(?P\d+)/speaker/$',
diff --git a/openslides/agenda/views.py b/openslides/agenda/views.py
index 8a708bcec..140838981 100644
--- a/openslides/agenda/views.py
+++ b/openslides/agenda/views.py
@@ -112,8 +112,6 @@ class Overview(TemplateView):
context.update({
'items': items,
'agenda_is_active': agenda_is_active,
- 'agenda_enable_auto_numbering': config['agenda_enable_auto_numbering'],
- 'agenda_numbering_fixed': config['agenda_agenda_fixed'],
'duration': duration,
'start': start,
'end': end,
@@ -345,38 +343,20 @@ class CreateRelatedAgendaItemView(SingleObjectMixin, RedirectView):
self.item = Item.objects.create(content_object=self.object)
-class FixAgendaView(QuestionView):
+class AgendaNumberingView(QuestionView):
permission_required = 'agenda.can_manage_agenda'
question_url_name = 'item_overview'
url_name = 'item_overview'
- question_message = ugettext_lazy('Do you really want to fix the agenda numbering?')
+ question_message = ugettext_lazy('Do you really want to generate agenda numbering? Manually added item numbers will be overwritten!')
url_name_args = []
def on_clicked_yes(self):
- config['agenda_agenda_fixed'] = True
for item in Item.objects.all():
item.item_number = item.calc_item_no()
item.save()
def get_final_message(self):
- return ugettext_lazy('The agenda has been fixed.')
-
-
-class ResetAgendaView(QuestionView):
- permission_required = 'agenda.can_manage_agenda'
- question_url_name = 'item_overview'
- url_name = 'item_overview'
- question_message = ugettext_lazy('Do you really want to reset the agenda numbering?')
- url_name_args = []
-
- def on_clicked_yes(self):
- config['agenda_agenda_fixed'] = False
- for item in Item.objects.all():
- item.item_number = ''
- item.save()
-
- def get_final_message(self):
- return ugettext_lazy('The agenda has been reset.')
+ return ugettext_lazy('The agenda has been numbered.')
class AgendaPDF(PDFView):