update schedule templates

This commit is contained in:
Luke Hatcher 2012-12-19 23:59:48 -05:00
parent 4c3b01c9a8
commit 50fa632127
3 changed files with 125 additions and 55 deletions

View file

@ -1,21 +1,24 @@
<table class="table table-bordered table-condensed">
<table class="calendar table table-bordered">
<thead>
<tr>
<th>&nbsp;</th>
<th class="time">&nbsp;</th>
{% for room in timetable.rooms %}
<th>{{ room.name }}</th>
{% endfor %}
</tr>
</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" %}
{% if slot.kind.label == "talk" or slot.kind.label == "tutorial" %}
{% if not slot.content %}
<a class="btn btn-mini edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">+</a>
{% else %}
<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>
<span class="title"><a class="edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">{{ slot.content.title }}</a></span>
<span class="speaker">{{ slot.content.speaker }}</span>
{% endif %}
{% else %}
{% if slot.content_override.raw %}
@ -27,6 +30,10 @@
{% endif %}
</td>
{% endfor %}
{% if forloop.last %}
<td colspan="{{ timetable.rooms|length }}"></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>

View file

@ -1,20 +1,27 @@
<table class="table table-bordered table-condensed">
<table class="calendar table table-bordered">
<thead>
<tr>
<th>&nbsp;</th>
<th class="time">&nbsp;</th>
{% for room in timetable.rooms %}
<th>{{ room.name }}</th>
{% endfor %}
</tr>
</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" %}
{% if slot.kind.label == "talk" or slot.kind.label == "tutorial" %}
{% if not slot.content %}
{% else %}
<div class="title"><a href="{% url schedule_presentation_detail slot.content.pk %}">{{ slot.content.title }}</a></div>
<div class="speaker">{{ slot.content.speaker }}</div>
<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>
{% endif %}
{% else %}
{% if slot.content_override.raw %}
@ -25,6 +32,10 @@
{% endif %}
</td>
{% endfor %}
{% if forloop.last %}
<td colspan="{{ timetable.rooms|length }}"></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>

View file

@ -0,0 +1,52 @@
table.calendar {
background-color: #fffff;
table-layout: fixed;
font-size: 12px;
tr {
min-height: 36px;
}
th {
text-align: center;
&.time {
width: 40px;
}
}
td {
text-align: center;
vertical-align: middle;
&.time {
vertical-align: top;
padding-top: 0;
margin-top: 0;
color: #444;
font-size: 11px;
}
&.slot {
font-weight: bold;
text-shadow: #fff 0px 1px 0px;
// Customize for slot types per site
&.slot-break { background-color: #ECFFFF; }
&.slot-plenary { background-color: lighten(#DCDCFF, 3%); }
p {
padding: 0;
margin: 0;
}
}
span.title {
font-weight: bold;
display: block;
}
span.speaker {
font-weight: normal;
display:block;
}
}
}