moved _grid to _edit_grid and implemented read-only grid version

This commit is contained in:
James Tauber 2012-09-20 22:02:02 -04:00
parent 6a1e59812a
commit 8dc8f5f34a
4 changed files with 75 additions and 3 deletions

View file

@ -0,0 +1,27 @@
<table class="table table-bordered table-condensed">
<tr>
<th>&nbsp;</th>
{% for room in timetable.rooms %}
<th>{{ room.name }}</th>
{% endfor %}
</tr>
{% 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="{{ slow.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 %}
{{ slot.kind.label }}
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
</table>

View file

@ -12,9 +12,8 @@
<td class="slot slot-{{ slot.kind.label }}" colspan="{{ slot.colspan }}" rowspan="{{ slow.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="title"><a class="edit-slot" href="#">{{ slot.content.title }}</a></div>
<div class="speaker">{{ slot.content.speaker }}</div>
{% endif %}
{% else %}

View file

@ -0,0 +1,46 @@
{% extends "site_base.html" %}
{% load i18n %}
{% load bootstrap_tags %}
{% block head_title %}Conference Schedule Edit{% endblock %}
{% block body_class %}full{% endblock %}
{% block right %}
{% endblock %}
{% block extra_head %}
<style>
.table td {
font-size: 9pt;
}
.table th, td.slot {
text-align: center;
vertical-align: middle;
}
td.time {
vertical-align: top;
width: 50px;
font-size: 8pt;
padding-top: 0;
}
td.slot .title {
font-weight: bold;
line-height: 10pt;
}
</style>
{% endblock %}
{% block body_outer %}
<div class="row">
<div class="span12">
<h1>Schedule</h1>
{% for timetable in days %}
<h2>{{ timetable.day.date }}</h2>
{% include "schedule/_grid.html" %}
{% endfor %}
</div>
</div>
{% endblock %}

View file

@ -43,7 +43,7 @@
{% for timetable in days %}
<h2>{{ timetable.day.date }}</h2>
{% include "schedule/_grid.html" %}
{% include "schedule/_edit_grid.html" %}
{% endfor %}
</div>