~summit-hackers/summit/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
{% extends "base.html" %}
{% load datetime qrcode %}

{% block page_name %}
{{ viewdate|strftime:"%Y-%m-%d" }} Schedule - {{ summit.title }}
{% endblock %}

{% block extrahead %}
<link rel="stylesheet" type="text/css" media="screen" href="/media/css/collapsible-tables.css" />
<script src="/media/js/collapsible-tables.js" type="text/javascript"></script>
{{ block.super }}
{% endblock %}

{% block sub_nav_links %}
{% if ical %}
<li><a class="sub-nav-item" href="{{ ical }}">iCal Feed</a></li>
{% endif %}
<li><a class="sub-nav-item mobile" href="{% url summit.schedule.views.mobile summit.name %}">Mobile</a></li>
<li><a class="sub-nav-item" href="display">Wide display</a></li>
{% endblock %}

{% block content %}
<div class="row">
<article class="span-8">

<div class="schedule-head">
{% qrhere %}
<span class="schedule-date"><a href="{% url summit.schedule.views.daily_schedule summit.name previousday|date:"Y-m-d" %}{% if is_popup %}?_popup=1{% endif %}" target="_self">&lt;</a> {{ viewdate.date|strftime:"%A" }} <a href="{% url summit.schedule.views.daily_schedule summit.name nextday|date:"Y-m-d" %}{% if is_popup %}?_popup=1{% endif %}" target="_self">&gt;</a></span>

{% if schedule.crew %}
<span class="schedule-crew">Crew: {% for c in crew %}<a href="https://launchpad.net/~{{crew.attendee.user.username}}">{{c.attendee.name}}</a>{% if forloop.last %}{% else %}, {% endif %}{% endfor %}
</span>
{% endif %}
</div>
<br class="clear" />
{% for slot, meetings in schedule.items %}
<table class="basic">
<thead><tr><th colspan="2">{{slot.start.time|strftime:"%H:%M"}} - {{slot.end.time|strftime:"%H:%M"}} {{summit.start|strftime:"%Z"}} {% ifequal slot.type 'plenary' %}[PLENARY]{% endifequal %} <a href="#" onclick="toggle(this); return false;"></a></th></tr></thead>
<tbody style="display: table-row-group;">
{% if slot.type == 'lunch' %}
<tr style="background-color: #AAFFAA;">
<td colspan="2" style="text-align: center;">
Lunch
</td>
</tr>
{% else %}
{% for room, agenda in meetings.items %}
<tr style="background-color: {% ifequal agenda.meeting.type 'plenary' %}#ffffe0{% else %}{{ agenda.meeting.track_color }}{% endifequal %}; {% if agenda.meeting.private %}border: 1px; border-style: solid; border-color: #FF0000;{% endif %}">
<td width="75%">
    <div class="meeting">
    {% if agenda.meeting.icon %}
    <img src="/media/img/{{agenda.meeting.icon}}" class="meeting_emblem" title="{{agenda.meeting.get_type_display}}" />
    {% endif %}
    <span onMouseOver="show_agenda_details({{agenda.id}}, {{slot.id}});" onMouseOut="hide_agenda_details({{agenda.id}}, {{slot.id}});">
    <a href="{% url summit.schedule.views.attend_meeting agenda.meeting.summit.name, agenda.meeting.id %}">
        {% if attendee in agenda.meeting.attendees %}
            <img class="icon" src="/media/img/attending.png" alt="Attending">
        {% else %}
            <img class="icon" src="/media/img/not_attending.png" alt="Not Attending">
        {% endif %}
    </a>
    <a href="{{agenda.meeting.meeting_page_url}}" style="color: #000000;" class="main-agenda-item-name">
        {{agenda.meeting.title}}
    </a>

    {% if agenda.meeting.tracks.count > 0 %}
        <span class="main-agenda-item-tracks">({% for track in agenda.meeting.tracks.all %}
            {% ifnotequal forloop.counter 1 %}, {% endifnotequal %}{{ track.title }}
        {% endfor %})</span>
    {% endif %}
    </div>
    <div id="agenda-{{agenda.id}}-{{slot.id}}-details" class="agenda-details">
    <div class="arrow"></div>
    <div class="meeting-description">{{agenda.meeting.description}}</div>
    {% if agenda.meeting.participant_set.count %}
    <br /><b>Participants:</b>
    <div>{% for participant in agenda.meeting.participant_set.all %}
        <div>
            {% if participant.participation == 'REQUIRED' %}
            <img class="icon" src="/media/img/required.png" title="required" alt="(required)">
            {% else %}
            <img class="icon" src="/media/img/attending.png" alt="attending">
            {% endif %}{{ participant.attendee.user }}</div>
    {% endfor %}</div>
    {% endif %}
    {% if agenda.meeting.tracks.count > 0 %}
    <br /><b>{{ TRACK_DISPLAY_NAME_PLURAL }}:</b>
    <ul>{% for track in agenda.meeting.tracks.all %}
        <li style="color: #{{track.color}};">{{ track.title }}</li>
    {% endfor %}</ul>
    {% endif %}
    </div>
    </span>
</td>
<td width="25%">
    {{agenda.room.title}}
    {% if agenda.room.icecast_url %}
        <a href="{{agenda.room.icecast_url}}"><img class="icon" src="/media/img/audio.png" title="Audio Feed" alt="(Audio Feed)"></a>
    {% endif %}
    {% if agenda.room.irc_channel %}
        {% if summit.state == 'public' %}
        <a href="http://ubottu.com/uds-logs/archives/{{summit.name}}/%23{{agenda.room.irc_channel}}.log"><img class="icon" src="/media/img/chat.png" title="IRC Logs: #{{agenda.room.irc_channel}}" alt="(IRC Logs)" /></a>
        {% else %}
        <a href="{{agenda.room.webchat_url}}"><img class="icon" src="/media/img/chat.png" title="IRC Channel: #{{agenda.room.irc_channel}}" alt="(IRC Channel)" /></a>
        {% endif %}
    {% endif %}
    {% if agenda.meeting.spec_url %}<a href="{{ agenda.meeting.spec_url }}"><img class="icon" src="{{ MEDIA_URL }}img/gem-sm.png" title="Go to Blueprint" alt="Go to Blueprint" /></a>{% endif %}
</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
{% endfor %}
<div class="schedule-head">
<span class="schedule-date"><a href="{% url summit.schedule.views.daily_schedule summit.name previousday|date:"Y-m-d" %}{% if is_popup %}?_popup=1{% endif %}" target="_self">&lt;</a> {{ viewdate.date|strftime:"%A" }} <a href="{% url summit.schedule.views.daily_schedule summit.name nextday|date:"Y-m-d" %}{% if is_popup %}?_popup=1{% endif %}" target="_self">&gt;</a></span>
</div>

</article>
<article class="span-4 last">
    {% include "schedule/actions.html" %}
</article>
</div>

{% block closure %}
<style>
/* Mobile-friendly styles */
@media screen and (max-width: 960px) {
    .span-4, footer, #main-nav, footer .logo-ubuntu, .nav-secondary, .schedule-qrcode { display: none; }
    #page-header { text-align: center; }
    #page-header a { height: 24px; line-height: 1; float: none; display: inline; }
    .span-8, .span-9, .span-3, .span-12 { width: 100%; }
    table.schedule { width: 100%; margin: 0; padding: 0; border-width: 0; }
    table.column { width: 100%; margin: 0; padding: 0; border-width: 0; }
    table.column td { display: block; width: 100%; margin: 0; padding: 0; border-width: 0; }
    table.column td ul {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    table.column td ul li {
        background: #efefef;
        border-bottom: 1px solid black;
        list-style: none;
        text-align: center;
        font-size: 24px;
        line-height: 24px;
        min-height: 24px;
        width: 100%;
        display: block;
        padding: 4px 0;
        margin: 0;
    }
    #fb-root * { width: auto; }
        .schedule-head > a { display: none; } /* qr code */
    div.schedule-head .schedule-date a:nth-child(1) {
        float: left;
    }
    div.schedule-head .schedule-date {
        font-weight: normal;
        font-size: 24px;
        margin: 0;
        display: block;
        text-align: center;
    }
    div.schedule-head .schedule-date a {
        display: block;
        float: right;
        background: #eee;
        width: 25%;
        text-align: center;
    }

    div.schedule-head .qrcode {
        display: none;
    }

    #sub-nav-container {
        margin-bottom: 0px;
    }

}
</style>

<script language="JavaScript">

function show_agenda_details(agenda_id, index_id) {
    var elem_id = 'agenda-'+agenda_id+'-'+index_id+'-details'
    var details = document.getElementById(elem_id)
    details.style.display='block';
}

function hide_agenda_details(agenda_id, index_id) {
    var elem_id = 'agenda-'+agenda_id+'-'+index_id+'-details'
    var details = document.getElementById(elem_id)
    details.style.display='none';
}

</script>
<script>
/* Mobile handler for clicking a link */
/* put at the bottom of the page so that the relevant elements exist */
document.querySelector("article.main-content").addEventListener("click", function(e) {
    /* Only handle clicking on the main links in the table */
    if (e.target.nodeName.toLowerCase() == "a" && e.target.className == "main-agenda-item-name") {
        /* only override links if we're in mobile mode */
        if (document.documentElement.clientWidth > 481) return;
        e.stopPropagation();
        e.preventDefault();
        /* toggle display of the details div */
        var details_div = e.target.parentNode.getElementsByTagName("div")[0];
        details_div.style.display = details_div.style.display == "block" ? "none" : "block";
        /* and add a link to the specific page to the top of the details div, if
           we haven't already */
        var links = details_div.getElementsByClassName("real-link");
        if (links.length == 0) {
            var a = document.createElement("a");
            a.href = e.target.href;
            a.appendChild(document.createTextNode("View details of this session"));
            a.className = "real-link";
            details_div.insertBefore(a, details_div.firstChild);
        }
    }
});

/* override the mouseover/mouseout functions in mobile mode */
var old_show_agenda_details = show_agenda_details;
var old_hide_agenda_details = hide_agenda_details;
show_agenda_details = function(agenda_id, slot_id) {
    if (document.documentElement.clientWidth > 481) {
        return old_show_agenda_details(agenda_id, slot_id);
    }
};
hide_agenda_details = function(agenda_id, slot_id) {
    if (document.documentElement.clientWidth > 481) {
        return old_hide_agenda_details(agenda_id, slot_id);
    }
};

</script>
<script type="text/javascript">
$(document).ready(function() {
 // Allow hiding of agenda details with click
 $('.agenda-details').bind('click', function() {
  $(this).hide();
 });
});
</script>
{% endblock %}

{% endblock %}