Changeset - 8dc8f5f34ab3
[Not reviewed]
0 2 2
James Tauber - 12 years ago 2012-09-21 02:02:02
jtauber@jtauber.com
moved _grid to _edit_grid and implemented read-only grid version
4 files changed with 75 insertions and 3 deletions:
0 comments (0 inline, 0 general)
symposion/templates/schedule/_edit_grid.html
Show inline comments
 
new file 100644
 
<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>
...
 
\ No newline at end of file
symposion/templates/schedule/_grid.html
Show inline comments
...
 
@@ -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 %}
symposion/templates/schedule/schedule_detail.html
Show inline comments
 
new file 100644
 
{% 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 %}
symposion/templates/schedule/schedule_edit.html
Show inline comments
...
 
@@ -43,7 +43,7 @@
 
            
 
            {% for timetable in days %}
 
                <h2>{{ timetable.day.date }}</h2>
 
                {% include "schedule/_grid.html" %}
 
                {% include "schedule/_edit_grid.html" %}
 
            {% endfor %}
 
        </div>
 
        
0 comments (0 inline, 0 general)