From 910e0f17e75e3c905aba9243d57caa74313835bd Mon Sep 17 00:00:00 2001
From: Oskar Hahn
Date: Sat, 2 Feb 2013 00:37:43 +0100
Subject: [PATCH] Add slide Date to the motion
---
openslides/motion/models.py | 10 ++++++++++
openslides/motion/templates/projector/Motion.html | 8 ++++----
openslides/motion/views.py | 1 +
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/openslides/motion/models.py b/openslides/motion/models.py
index 72734da68..97cd9c04f 100644
--- a/openslides/motion/models.py
+++ b/openslides/motion/models.py
@@ -304,6 +304,16 @@ class Motion(SlideMixin, models.Model):
"""
self.state_id = get_state('default').id
+ def slide(self):
+ """
+ return the slide dict
+ """
+ data = super(Motion, self).slide()
+ data['motion'] = self
+ data['title'] = self.title
+ data['template'] = 'projector/Motion.html'
+ return data
+
class MotionVersion(models.Model):
title = models.CharField(max_length=255, verbose_name=ugettext_lazy("Title"))
diff --git a/openslides/motion/templates/projector/Motion.html b/openslides/motion/templates/projector/Motion.html
index ab094313f..db7e8d54a 100644
--- a/openslides/motion/templates/projector/Motion.html
+++ b/openslides/motion/templates/projector/Motion.html
@@ -16,10 +16,10 @@
{% if motion.status == "rej" %}
{% endif %}
- {% trans motion.get_status_display %}
+ {% trans motion.status %}
{% else %}
{% for note in motion.notes %}
- {{ note }}
+ {{ note }}
{% endfor %}
{% endif %}
@@ -53,7 +53,7 @@
{% endwith %}
{% trans "Submitter" %}:
- {{ motion.submitter }}
+ {{ motion.submitter.person }}
@@ -65,7 +65,7 @@
{% trans "Motion" %} [{% trans "no number" %}]
{% endif %}
- {{ motion.public_version.title }}
+ {{ motion.title }}
{% endblock %}
diff --git a/openslides/motion/views.py b/openslides/motion/views.py
index 1728cc9a4..2c692d091 100644
--- a/openslides/motion/views.py
+++ b/openslides/motion/views.py
@@ -34,6 +34,7 @@ from .forms import (BaseMotionForm, MotionSubmitterMixin, MotionSupporterMixin,
MotionCreateNewVersionMixin, ConfigForm)
from .workflow import WorkflowError
+
class MotionListView(ListView):
"""
List all motion.