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 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): class MotionVersion(models.Model):
title = models.CharField(max_length=255, verbose_name=ugettext_lazy("Title")) title = models.CharField(max_length=255, verbose_name=ugettext_lazy("Title"))

View File

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

View File

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