Add slide Date to the motion

This commit is contained in:
Oskar Hahn 2013-02-02 00:37:43 +01:00
parent 1518543a9a
commit 910e0f17e7
3 changed files with 15 additions and 4 deletions

View File

@ -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"))

View File

@ -16,7 +16,7 @@
{% if motion.status == "rej" %}
<img src="{% static 'images/icons/voting-no.png' %}">
{% endif %}
{% trans motion.get_status_display %}
{% trans motion.status %}
{% else %}
{% for note in motion.notes %}
{{ note }}
@ -53,7 +53,7 @@
{% endwith %}
<p><b>{% trans "Submitter" %}:</b><br>
{{ motion.submitter }}
{{ motion.submitter.person }}
</p>
</div>
</div>
@ -65,7 +65,7 @@
{% trans "Motion" %} <i>[{% trans "no number" %}]</i>
{% endif %}
</h1>
<b>{{ motion.public_version.title }}</b>
<b>{{ motion.title }}</b>
<hr>
{% endblock %}

View File

@ -34,6 +34,7 @@ from .forms import (BaseMotionForm, MotionSubmitterMixin, MotionSupporterMixin,
MotionCreateNewVersionMixin, ConfigForm)
from .workflow import WorkflowError
class MotionListView(ListView):
"""
List all motion.