Skip to content

Commit 70211df

Browse files
committed
Use new look for IETF meeting agenda; add color-coding support (like tools has)
- Legacy-Id: 2046
1 parent 4eb804f commit 70211df

4 files changed

Lines changed: 123 additions & 39 deletions

File tree

ietf/templates/meeting/agenda.html

Lines changed: 47 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,53 @@
1-
{% extends "base.html" %}
1+
{% extends "idrfc/base.html" %}
22
{# Copyright The IETF Trust 2007, All Rights Reserved #}
33
{% load humanize %}
4-
{% block title %} Meeting Agenda of the {{ meeting.num|ordinal }} IETF Meeting{% endblock %}
5-
{% block head %}
6-
<link href="http://tools.ietf.org/css/palette.css" rel="stylesheet" type="text/css" />
7-
<script language='javascript' src='http://tools.ietf.org/js/prototype-1.6.0.2.js'></script>
8-
<script language='javascript' src='/js/agenda.js'></script>
9-
{% endblock %}
10-
{% block body_attributes %}onload='set_cookie_colors()'{% endblock %}
4+
{% block title %}IETF {{ meeting.num }} Meeting Agenda{% endblock %}
5+
6+
{% block morecss %}
7+
table#agenda { border: 0; border-collapse:collapse; }
8+
tr.meeting-date td { padding-top:1em; }
9+
#agenda td { padding-right:2em; }
10+
.ietf-agenda-palette { border-collapse:collapse; border:2px solid black; background:white;}
11+
.ietf-agenda-palette td { border:1px solid black; }
12+
.ietf-agenda-palette td { padding: 4px; text-align:center;}
13+
.ietf-agenda-palette td a { text-decoration:none; }
14+
.bgnone {}
15+
.bgaqua, .bgaqua a { background-color: aqua; color: black; }
16+
.bgblue, .bgblue a { background-color: blue; color: black; }
17+
.bgfuchsia, .bgfuchsia a { background-color: fuchsia; color: black; }
18+
.bggray, .bggray a { background-color: gray; color: white; }
19+
.bggreen, .bggreen a { background-color: green; color: white; }
20+
.bglime, .bglime a { background-color: lime; color: black; }
21+
.bgmaroon, .bgmaroon a { background-color: maroon; color: white; }
22+
.bgnavy, .bgnavy a { background-color: navy; color: white; }
23+
.bgolive, .bgolive a { background-color: olive; color: white; }
24+
.bgpurple, .bgpurple a { background-color: purple; color: white; }
25+
.bgred, .bgred a { background-color: red; color: black; }
26+
.bgsilver, .bgsilver a { background-color: silver; color: black; }
27+
.bgteal, .bgteal a { background-color: teal; color: white; }
28+
.bgwhite, .bgwhite a { background-color: white; color: black; }
29+
.bgyellow, .bgyellow a { background-color: yellow; color: black; }
30+
.bgblack, .bgblack a { background-color: black; color: white; }
31+
{% endblock morecss %}
32+
33+
{% block pagehead %}
34+
<script language='javascript' src='/js/agenda2.js'></script>
35+
{% endblock pagehead %}
36+
{% block bodyAttrs %}onload='updateAgendaColors()'{% endblock %}
1137
{% block content %}
12-
<span id='colorpallet'></span>
13-
<p style="text-align: center">
14-
Agenda of the {{ meeting.num|ordinal }} IETF Meeting<br />
15-
{{ meeting.start_date|date:"F j" }}-{% ifnotequal meeting.start_date.month meeting.end_date.month %}{{ meeting.end_date|date:"F " }}{% endifnotequal %}{{ meeting.end_date|date:"j, Y" }}<br />
38+
<h1>IETF {{ meeting.num }} Meeting Agenda</h1>
39+
<p>{{ meeting.city }}, {{ meeting.start_date|date:"F j" }}-{% ifnotequal meeting.start_date.month meeting.end_date.month %}{{ meeting.end_date|date:"F " }}{% endifnotequal %}{{ meeting.end_date|date:"j, Y" }}<br />
1640
Updated {{ update.updated|date:"Y-m-d H:i:s T" }}<br />
17-
(There's also a <a href="/meeting/{{meeting.num}}/agenda.txt">plaintext agenda</a> and a <a href="http://tools.ietf.org/agenda/{{meeting.num}}/">tools-style agenda</a> available)<br />
18-
<br />
19-
IETF agendas are subject to change, up to and during the meeting.<br />
20-
</p>
41+
(There's also a <a href="/meeting/{{meeting.num}}/agenda.txt">plaintext agenda</a> and a <a href="http://tools.ietf.org/agenda/{{meeting.num}}/">tools-style agenda</a> available)</p>
42+
43+
<p><strong>IETF agendas are subject to change, up to and during the meeting.</strong></p>
2144

2245
<table id="agenda">
2346
{% for slot in timeslots %}
2447
{% ifchanged %}
25-
<tr>
48+
<tr class="meeting-date">
2649
<td colspan="4">
27-
<hr />
28-
<h4>{{ slot.meeting_date|date:"l"|upper }}, {{ slot.meeting_date|date:"F j, Y" }}</h4>
50+
<h2 class="ietf-divider">{{ slot.meeting_date|date:"l"|upper }}, {{ slot.meeting_date|date:"F j, Y" }}</h2>
2951
</td>
3052
</tr>
3153
{% if slot.reg_info %}
@@ -68,6 +90,7 @@ <h4>{{ slot.meeting_date|date:"l"|upper }}, {{ slot.meeting_date|date:"F j, Y" }
6890
<td>{{ session.info.area|upper}}</td>
6991
<td>{% if session.info.isWG %}<a href="http://www.ietf.org/dyn/wg/charter/{{ session.info.acronym|lower }}-charter.html">{{ session.info.acronym|lower }}</a>{% else %}{{ session.info.acronym|lower }}{% endif %}</td>
7092
<td>
93+
<img src="/images/color-palette-4x4.gif" alt="" onclick="pickAgendaColor('{{meeting.num}}-{{slot.meeting_date|date:"D"|lower}}-{{slot.time_desc|slice:":4"}}-{{session.info.acronym|lower}}',this);"/>
7194
{% if session.info.agenda_file %}<a href="http://www3.ietf.org/proceedings/{{ session.info.agenda_file }}">{{ session.info.acronym_name|escape }} {{ session.info.group_type_str }}</a>{% else %}{{ session.info.acronym_name|escape }} {{ session.info.group_type_str }}{% endif %}
7295
{% if session.info.special_agenda_note %}<br/> - {{ session.info.special_agenda_note }}{% endif %}
7396
</td>
@@ -85,23 +108,10 @@ <h4>{{ slot.meeting_date|date:"l"|upper }}, {{ slot.meeting_date|date:"F j, Y" }
85108
{% endfor %}
86109
{% endif %}
87110
{% endfor %}
88-
<tr><td colspan="4"><hr /></td></tr>
89-
<tr><td colspan="4" style="text-align: center"><b>AREA DIRECTORS</b></td></tr>
90-
<tr><td colspan="4">
91-
<table>
92-
{% regroup ads by area as grouped %}{% for ad in grouped %}
93-
<tr valign="top">
94-
<td>{{ ad.grouper|upper }}</td>
95-
<td>{{ ad.list.0.area.area_acronym.name }}</td>
96-
<td>
97-
{% for ad_person in ad.list %}
98-
{% ifequal forloop.counter 2 %} &amp; {% endifequal %}
99-
{{ ad_person.person }}/{{ ad_person.person.affiliation }}
100-
{% endfor %}
101-
</td>
102-
</tr>
103-
{% endfor %}
104-
</table>
105-
</td></tr>
106111
</table>
112+
113+
{% endblock %}
114+
{% block scripts %}
115+
116+
107117
{% endblock %}

static/css/base2.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ body { margin: 0; }
7272
#search_form_box {width: 99.5%; border: 0px solid #cccccc; background:#edf5ff;margin-top:8px; padding:4px; margin-bottom:1em; padding-left:8px;}
7373
form#search_form { padding-top: 4px; padding-bottom: 4px; }
7474
#search_form input { padding: 0; padding-left: 2px; border: 1px solid #89d;}
75+
#search_form input.radio { padding-left: 0; border: 0; }
7576
#search_form select { border: 1px solid #89d; }
76-
#search_form div.search_field { margin-top:2px; }
77-
#search_form label { width: 130px; float: left; }
77+
#search_form div.search_field { margin-top:2px; clear:both;}
78+
#search_form label { width: 170px; float: left; }
7879
/* checkboxes for document types */
7980
#search_form table#search_types { border-collapse:collapse;}
8081
#search_form #search_types td { padding:0; }
102 Bytes
Loading

static/js/agenda2.js

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// Based on agenda.js written by Tony Hansen.
2+
3+
// Portion Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4+
// All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
5+
//
6+
// Redistribution and use in source and binary forms, with or without
7+
// modification, are permitted provided that the following conditions
8+
// are met:
9+
//
10+
// * Redistributions of source code must retain the above copyright
11+
// notice, this list of conditions and the following disclaimer.
12+
//
13+
// * Redistributions in binary form must reproduce the above
14+
// copyright notice, this list of conditions and the following
15+
// disclaimer in the documentation and/or other materials provided
16+
// with the distribution.
17+
//
18+
// * Neither the name of the Nokia Corporation and/or its
19+
// subsidiary(-ies) nor the names of its contributors may be used
20+
// to endorse or promote products derived from this software
21+
// without specific prior written permission.
22+
//
23+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34+
35+
function setAgendaColor(color) {
36+
IETF.agendaPalette.hide();
37+
document.getElementById(IETF.agendaRow).className="bg"+color;
38+
if (color == 'none') {
39+
YAHOO.util.Cookie.removeSub("ietf-agenda-colors", IETF.agendaRow);
40+
} else {
41+
var twoMonths = new Date(new Date().getTime() + 60*24*60*60*1000);
42+
YAHOO.util.Cookie.setSub("ietf-agenda-colors", IETF.agendaRow, color, { expires:twoMonths });
43+
}
44+
}
45+
function createPalette() {
46+
IETF.agendaPalette = new YAHOO.widget.Overlay("ietf-agenda-palette", { constraintoviewport:true, visible:false } );
47+
var body = '<table class="ietf-agenda-palette"><tr><td colspan="4">Select a color for this line</td></tr>';
48+
var c = ['aqua', 'blue', 'fuchsia', 'gray', 'green', 'lime',
49+
'maroon', 'navy', 'olive', 'purple', 'red', 'silver',
50+
'teal', 'white', 'yellow', 'black'];
51+
for (var i = 0; i < c.length; i++) {
52+
if ((i%4) == 0) { body += "<tr>" }
53+
body += '<td class="bg'+c[i]+'"><a href=\'javascript:setAgendaColor("'+c[i]+'");\'>'+c[i]+'</a></td>';
54+
if ((i%4) == 3) { body += "</tr>" }
55+
}
56+
body += '<tr><td class="bgnone" colspan="4"><a href="javascript:setAgendaColor(\'none\');">none</a></td></tr></table>';
57+
IETF.agendaPalette.setBody(body);
58+
IETF.agendaPalette.render(document.body);
59+
}
60+
function pickAgendaColor(row, place) {
61+
if (!IETF.agendaPalette) {
62+
createPalette();
63+
}
64+
IETF.agendaRow = row;
65+
IETF.agendaPalette.cfg.setProperty("context", [place, "tl", "tl"]);
66+
IETF.agendaPalette.show();
67+
}
68+
function updateAgendaColors() {
69+
var colors = YAHOO.util.Cookie.getSubs("ietf-agenda-colors");
70+
for (var k in colors) {
71+
document.getElementById(k).className="bg"+colors[k];
72+
}
73+
}

0 commit comments

Comments
 (0)