Skip to content

Commit b74ce87

Browse files
committed
Added links to agenda/materials pop-up, materials download, etherpad, jabber room, and webex call-in session for interims on the upcoming meetings page. With the earlier changes from [17555], this fixes issue ietf-tools#2937.
- Legacy-Id: 17576 Note: SVN reference [17555] has been migrated to Git commit e9756d8
1 parent d2ba857 commit b74ce87

6 files changed

Lines changed: 90 additions & 8 deletions

File tree

ietf/meeting/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,13 +783,15 @@ def slug(self):
783783
"""Return sensible id string for session, e.g. suitable for use as HTML anchor."""
784784
components = []
785785

786+
components.append(self.schedule.meeting.number)
787+
786788
if not self.timeslot:
787789
components.append("unknown")
788790

789791
if not self.session or not (getattr(self.session, "historic_group") or self.session.group):
790792
components.append("unknown")
791793
else:
792-
components.append(self.timeslot.time.strftime("%a-%H%M"))
794+
components.append(self.timeslot.time.strftime("%Y-%m-%d-%a-%H%M"))
793795

794796
g = getattr(self.session, "historic_group", None) or self.session.group
795797

ietf/meeting/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666

6767
# This is a limited subset of the list above -- many of the views above won't work for interim meetings
6868
type_interim_patterns = [
69-
url(r'^agenda/(?P<session>[A-Za-z0-9-]+)-drafts.pdf$', views.session_draft_pdf),
70-
url(r'^agenda/(?P<session>[A-Za-z0-9-]+)-drafts.tgz$', views.session_draft_tarfile),
69+
url(r'^agenda/(?P<acronym>[A-Za-z0-9-]+)-drafts.pdf$', views.session_draft_pdf),
70+
url(r'^agenda/(?P<acronym>[A-Za-z0-9-]+)-drafts.tgz$', views.session_draft_tarfile),
7171
url(r'^materials/%(document)s((?P<ext>\.[a-z0-9]+)|/)?$' % settings.URL_REGEXPS, views.materials_document),
7272
url(r'^agenda.json$', views.json_agenda)
7373
]

ietf/meeting/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2246,6 +2246,8 @@ def upcoming(request):
22462246
timeslotassignments__timeslot__time__gte=today
22472247
)
22482248
).filter(current_status__in=('sched','canceled'))
2249+
for session in interim_sessions:
2250+
session.historic_group = session.group
22492251

22502252
entries = list(ietf_meetings)
22512253
entries.extend(list(interim_sessions))
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{# Copyright The IETF Trust 2015, All Rights Reserved #}
2+
{% load textfilters %}
3+
{% load origin %}
4+
{% origin %}
5+
{% if session.agenda %}
6+
{% with session.official_timeslotassignment as item %}
7+
{% include "meeting/session_agenda_include.html" %}
8+
<!-- agenda pop-up button -->
9+
<button class="btn btn-default btn-xs" data-toggle="modal" data-target="#modal-{{item.slug}}" title="Show meeting materials"><span class="fa fa-arrows-alt"></span></button>
10+
<!-- materials tar file -->
11+
<a class="btn btn-default btn-xs" href="/meeting/{{meeting.number}}/agenda/{{session.group.acronym}}-drafts.tgz" title="Download meeting materials as .tar archive"><span class="fa fa-file-archive-o"></span></a>
12+
<!-- materials PDF file -->
13+
<a class="btn btn-default btn-xs" href="/meeting/{{ meeting.number }}/agenda/{{session.group.acronym}}-drafts.pdf" title="Download meeting materials as PDF file"><span class="fa fa-file-pdf-o"></span></a>
14+
{% endwith %}
15+
{% endif %}
16+
<!-- etherpad -->
17+
<a class="btn btn-default btn-xs" href="https://etherpad.ietf.org/p/notes-ietf-{{ meeting.number }}?useMonospaceFont=true" title="Etherpad for note-takers"><span class="fa fa-edit"></span></a>
18+
<!-- Jabber -->
19+
<a class="btn btn-default btn-xs" href="xmpp:{{session.jabber_room_name}}@jabber.ietf.org?join" title="Jabber room for {{session.jabber_room_name}}"><span class="fa fa-lightbulb-o"></span></a>
20+
<!-- webex -->
21+
{% if "https://ietf.webex.com" in session.agenda_note|first_url %}
22+
<a class="btn btn-default btn-xs"
23+
href="{{ session.agenda_note|first_url }}"
24+
title="Webex session"><span class="fa fa-phone"></span>
25+
</a>
26+
{% elif "https://ietf.webex.com" in session.remote_instructions|first_url %}
27+
<a class="btn btn-default btn-xs"
28+
href="{{ session.remote_instructions|first_url }}"
29+
title="Webex session"><span class="fa fa-phone"></span>
30+
</a>
31+
{% elif item.timeslot.location.webex_url %}
32+
<a class="btn btn-default btn-xs"
33+
href="{{item.timeslot.location.webex_url|format:session }}"
34+
title="Webex session"><span class="fa fa-phone"></span>
35+
</a>
36+
{% else %}
37+
<span class="btn btn-default btn-xs">
38+
<span class="fa fa-phone" style="color: #ddd;"
39+
title="No webex info found in remote instructions or agenda note"></span>
40+
</span>
41+
{% endif %}
42+

ietf/templates/meeting/session_agenda_include.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{# Copyright The IETF Trust 2015, All Rights Reserved #}
2-
{% load origin %}
2+
{% load origin %}{% origin %}
33
{% load staticfiles %}
44
{% load textfilters %}
55
{% load ietf_filters %}
6-
<div class="modal fade" id="modal-{{ item.slug }}" tabindex="-1" role="dialog" aria-labelledby="label-{{ item.slug }}" aria-hidden="true">
6+
<div class="modal fade text-left" id="modal-{{ item.slug }}" tabindex="-1" role="dialog" aria-labelledby="label-{{ item.slug }}" aria-hidden="true">
77
<div class="modal-dialog modal-lg">
88
<div class="modal-content">
99
<div class="modal-header">

ietf/templates/meeting/upcoming.html

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ <h1>Upcoming Meetings</h1>
4848
<tr>
4949
<th>Date</th>
5050
<th>Group</th>
51-
<th>Name</th>
51+
<th>Meeting</th>
52+
<th class="sorter-false text-right">&nbsp;</th>
5253
</tr>
5354
</thead>
5455
<tbody>
@@ -59,19 +60,24 @@ <h1>Upcoming Meetings</h1>
5960
<td>{{ meeting.date }} - {{ meeting.end }}</td>
6061
<td>ietf</td>
6162
<td><a href="{% url 'ietf.meeting.views.agenda' num=meeting.number %}">IETF {{ meeting.number }}</a></td>
63+
<td></td>
6264
{% endwith %}
6365
{% elif entry|classname == 'Session' %}
64-
{% with session=entry %}
66+
{% with session=entry meeting=entry.meeting%}
6567
<td>{{ session.official_timeslotassignment.timeslot.utc_start_time | date:"Y-m-d H:i"}} - {{ session.official_timeslotassignment.timeslot.utc_end_time | date:"H:i e" }}</td>
66-
<td>{{ session.group.acronym }}</td>
68+
<td><a href="{% url 'ietf.group.views.group_about' acronym=session.group.acronym %}">{{ session.group.acronym }}</a></td>
6769
<td>
6870
<a href="{% url 'ietf.meeting.views.session_details' num=session.meeting.number acronym=session.group.acronym %}">{{ session.meeting.number }}{% if session.current_status == 'canceled' %}&nbsp;&nbsp;<span class="label label-warning">CANCELLED</span>{% endif %}</a>
6971
</td>
72+
<td class='text-right'>
73+
{% include "meeting/interim_session_buttons.html" %}
74+
</td>
7075
{% endwith %}
7176
{% else %}
7277
<td><span class="label-warning">Unexpected entry type: {{entry|classname}}</span></td>
7378
<td></td>
7479
<td></td>
80+
<td></td>
7581
{% endif %}
7682
</tr>
7783
{% endfor %}
@@ -132,5 +138,35 @@ <h3>No upcoming meetings</h3>
132138
calendar.render();
133139
});
134140

141+
$(".modal").on("show.bs.modal", function () {
142+
var i = $(this).find(".frame");
143+
if ($(i).data("src")) {
144+
$.get($(i).data("src"), function (data, status, xhr) {
145+
var t = xhr.getResponseHeader("content-type");
146+
if (t.indexOf("text/plain") > -1) {
147+
data = "<pre class='agenda'>" + data + "</pre>";
148+
} else if(t.indexOf("text/html") > -1) {
149+
// nothing to do here
150+
} else {
151+
data = "<p>Unknown type: " + xhr.getResponseHeader("content-type") + "</p>";
152+
}
153+
$(i).html(data);
154+
});
155+
}
156+
var j = $(this).find(".frame2");
157+
if ($(j).data("src")) {
158+
$.get($(j).data("src"), function (data, status, xhr) {
159+
var t = xhr.getResponseHeader("content-type");
160+
if (t.indexOf("text/plain") > -1) {
161+
data = "<pre class='agenda'>" + data + "</pre>";
162+
} else if(t.indexOf("text/html") > -1) {
163+
// nothing to do here
164+
} else {
165+
data = "<p>Unknown type: " + xhr.getResponseHeader("content-type") + "</p>";
166+
}
167+
$(j).html(data);
168+
});
169+
}
170+
});
135171
</script>
136172
{% endblock %}

0 commit comments

Comments
 (0)