2012-12-20 04:59:48 +00:00
|
|
|
<table class="calendar table table-bordered">
|
|
|
|
<thead>
|
2012-09-21 02:02:02 +00:00
|
|
|
<tr>
|
2012-12-20 04:59:48 +00:00
|
|
|
<th class="time"> </th>
|
|
|
|
{% for room in timetable.rooms %}
|
|
|
|
<th>{{ room.name }}</th>
|
2012-09-21 02:02:02 +00:00
|
|
|
{% endfor %}
|
|
|
|
</tr>
|
2012-12-20 04:59:48 +00:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for row in timetable %}
|
|
|
|
<tr>
|
|
|
|
<td class="time">{{ row.time|date:"h:iA" }}</td>
|
|
|
|
{% for slot in row.slots %}
|
|
|
|
<td class="slot slot-{{ slot.kind.label }}" colspan="{{ slot.colspan }}" rowspan="{{ slot.rowspan }}">
|
|
|
|
{% if slot.kind.label == "talk" or slot.kind.label == "tutorial" %}
|
|
|
|
{% if not slot.content %}
|
2014-07-05 13:46:01 +00:00
|
|
|
<a class="btn btn-mini edit-slot" data-action="{% url "schedule_slot_edit" schedule.section.slug slot.pk %}" href="#">+</a>
|
2012-12-20 04:59:48 +00:00
|
|
|
{% else %}
|
2014-07-05 13:46:01 +00:00
|
|
|
<span class="title"><a class="edit-slot" data-action="{% url "schedule_slot_edit" schedule.section.slug slot.pk %}" href="#">{{ slot.content.title }}</a></span>
|
2012-12-20 04:59:48 +00:00
|
|
|
<span class="speaker">{{ slot.content.speaker }}</span>
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{% if slot.content_override.raw %}
|
|
|
|
{{ slot.content_override.rendered|safe }}
|
|
|
|
{% else %}
|
|
|
|
{{ slot.kind.label }}
|
|
|
|
{% endif %}
|
2014-07-05 13:46:01 +00:00
|
|
|
— <a class="edit-slot" data-action="{% url "schedule_slot_edit" schedule.section.slug slot.pk %}" href="#">edit</a>
|
2012-12-20 04:59:48 +00:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
{% endfor %}
|
|
|
|
{% if forloop.last %}
|
|
|
|
<td colspan="{{ timetable.rooms|length }}"></td>
|
|
|
|
{% endif %}
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
2014-07-05 13:46:01 +00:00
|
|
|
</table>
|