Added Slot.content_override

Slots can now be controlled through content_override if custom content is
needed in non-talk slots.
This commit is contained in:
Brian Rosner 2012-10-24 23:21:20 -06:00
parent 06ea84331c
commit d7ac510555
3 changed files with 11 additions and 2 deletions

View file

@ -48,6 +48,7 @@ class Slot(models.Model):
kind = models.ForeignKey(SlotKind)
start = models.TimeField()
end = models.TimeField()
content_override = models.TextField(blank=True)
def assign(self, content):
"""

View file

@ -17,9 +17,13 @@
<div class="title"><a class="edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">{{ slot.content.title }}</a></div>
<div class="speaker">{{ slot.content.speaker }}</div>
{% endif %}
{% else %}
{% if slot.content_override %}
{{ slot.content_override|safe }}
{% else %}
{{ slot.kind.label }}
{% endif %}
{% endif %}
</td>
{% endfor %}
</tr>

View file

@ -16,9 +16,13 @@
<div class="title"><a href="{% url schedule_presentation_detail slot.content.pk %}">{{ slot.content.title }}</a></div>
<div class="speaker">{{ slot.content.speaker }}</div>
{% endif %}
{% else %}
{% if slot.content_override %}
{{ slot.content_override|safe }}
{% else %}
{{ slot.kind.label }}
{% endif %}
{% endif %}
</td>
{% endfor %}
</tr>