symposion_app/pinaxcon/templates/symposion/schedule/_grid.html
2018-09-29 17:14:21 +12:00

78 lines
No EOL
2.9 KiB
HTML

{% load lca2018_tags %}
{% load waffle_tags %}
<table class="calendar table table-bordered">
<thead>
<tr>
<th class="time">&nbsp;</th>
{% for room in timetable.rooms %}
<th>{{ room.name }}</th>
{% endfor %}
</tr>
{% with timetable|day_has_tracks:timetable.day as has_tracks %}
{% if has_tracks %}
<tr>
<th class="time">&nbsp;</th>
{% for room in timetable.rooms %}
{% with room|trackname:timetable.day as track_name %}
<th class="track-name">{% if track_name %}<p>{{ track_name }}{% endif %}</th>
{% endwith %}
{% endfor %}
</tr>
{% endif %}
{% endwith %}
</thead>
<tbody>
{% for row in timetable %}
<tr>
<td class="time"><h4>{{ row.time|date:"h:iA" }}</h4></td>
{% for slot in row.slots %}
<td class="slot slot-{{ slot.kind.label }}" colspan="{{ slot.colspan }}" rowspan="{{ slot.rowspan }}">
{% with slot.kind.label.lower as label %}
{% if label == "talk" or label == "tutorial" %}
{% if slot.content %}
<span class="title">
<a href="{% url "schedule_presentation_detail" slot.content.pk %}">{{ slot.content.title }}</a>
</span>
<span class="speaker">
{{ slot.content.speakers|join:", " }}
</span>
{% flag "session_chair" %}
{% if slot.sessions %}
<div>
{% for session in slot.sessions.all %}
<em>Session chair:
{% if not session.chair %}
<a href="{% url "schedule_session_detail" session.id %}">Volunteer! 🙋</a>
{% else %}
<a href="{% url "schedule_session_detail" session.id %}">{{ session.chair.user.attendee.attendeeprofilebase.attendeeprofile.name }}</a>
{% endif %}</em>
{% endfor %}
</div>
{% endif %}
{% endflag %}
{% endif %}
{% elif label == "shortbreak" %}
{% else %}
{% if slot.content_override %}
{{ slot.content_override_html|safe }}
{% else %}
{{ slot.kind.label }}
{% endif %}
{% endif %}
{% if "break" in label %}
{% else %}
<span class="room">
{{ slot.rooms|join:", "}}<span class="endtime"> ends {{ slot.end|date:"h:iA" }}</span>
</span>
{% endif %}
{% endwith %}
</td>
{% endfor %}
{% if forloop.last %}
<td colspan="{{ timetable.rooms|length }}"></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>