diff --git a/openslides/agenda/models.py b/openslides/agenda/models.py index 2ce3c1959..3ccb20131 100644 --- a/openslides/agenda/models.py +++ b/openslides/agenda/models.py @@ -10,6 +10,11 @@ :license: GNU GPL, see LICENSE for more details. """ +try: + import json +except ImportError: + import simplejson as json + from django.db import models from django.utils.translation import ugettext as _ @@ -138,6 +143,16 @@ class Item(InheritanceCastModel): if link == 'delete': return ('item_delete', [str(self.id)]) + @property + def json(self): + """ + Return the model as jquery data + """ + return json.dumps({ + 'id': self.id, + 'active': self.active, + }) + def __unicode__(self): return self.title diff --git a/openslides/agenda/templates/agenda/overview.html b/openslides/agenda/templates/agenda/overview.html index 99172df55..060daad19 100644 --- a/openslides/agenda/templates/agenda/overview.html +++ b/openslides/agenda/templates/agenda/overview.html @@ -4,12 +4,15 @@ {% block header %} + {% if perms.agenda.can_manage_agenda %} + - + +