update schedule templates
This commit is contained in:
parent
4c3b01c9a8
commit
50fa632127
3 changed files with 125 additions and 55 deletions
|
@ -1,32 +1,39 @@
|
|||
<table class="table table-bordered table-condensed">
|
||||
<tr>
|
||||
<th> </th>
|
||||
{% for room in timetable.rooms %}
|
||||
<th>{{ room.name }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% for row in timetable %}
|
||||
<table class="calendar table table-bordered">
|
||||
<thead>
|
||||
<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 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>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if slot.content_override.raw %}
|
||||
{{ slot.content_override.rendered|safe }}
|
||||
{% else %}
|
||||
{{ slot.kind.label }}
|
||||
{% endif %}
|
||||
— <a class="edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">edit</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<th class="time"> </th>
|
||||
{% for room in timetable.rooms %}
|
||||
<th>{{ room.name }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</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 %}
|
||||
<a class="btn btn-mini edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">+</a>
|
||||
{% else %}
|
||||
<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 %}
|
||||
{{ slot.content_override.rendered|safe }}
|
||||
{% else %}
|
||||
{{ slot.kind.label }}
|
||||
{% endif %}
|
||||
— <a class="edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">edit</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
{% if forloop.last %}
|
||||
<td colspan="{{ timetable.rooms|length }}"></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
|
@ -1,30 +1,41 @@
|
|||
<table class="table table-bordered table-condensed">
|
||||
<tr>
|
||||
<th> </th>
|
||||
{% for room in timetable.rooms %}
|
||||
<th>{{ room.name }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% for row in timetable %}
|
||||
<table class="calendar table table-bordered">
|
||||
<thead>
|
||||
<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 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>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if slot.content_override.raw %}
|
||||
{{ slot.content_override.rendered|safe }}
|
||||
{% else %}
|
||||
{{ slot.kind.label }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<th class="time"> </th>
|
||||
{% for room in timetable.rooms %}
|
||||
<th>{{ room.name }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</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 %}
|
||||
{% else %}
|
||||
<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 %}
|
||||
{{ slot.content_override.rendered|safe }}
|
||||
{% else %}
|
||||
{{ slot.kind.label }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
{% if forloop.last %}
|
||||
<td colspan="{{ timetable.rooms|length }}"></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue