Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add remote instructions and date/time to interim agenda page #6442

Merged
merged 11 commits into from
Oct 12, 2023
10 changes: 8 additions & 2 deletions ietf/static/js/upcoming.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function filter_calendar_events(filter_params, event_list) {
}

// format a moment in a tz
var moment_formats = { time: 'HH:mm', date: 'YYYY-MM-DD', datetime: 'YYYY-MM-DD HH:mm' };
var moment_formats = { time: 'HH:mm', date: 'YYYY-MM-DD', datetime: 'YYYY-MM-DD HH:mm' , timezone: 'z'};

function format_moment(t_moment, tz, fmt_type) {
return t_moment.tz(tz)
Expand All @@ -43,6 +43,9 @@ function format_moment(t_moment, tz, fmt_type) {

function make_display_events(event_data, tz) {
var calendarEl = document.getElementById('calendar');
if (!calendarEl) {
return;
}
var glue = calendarEl.clientWidth > 720 ? ' ' : '\n';
return $.map(event_data, function (src_event) {
var title;
Expand Down Expand Up @@ -83,6 +86,9 @@ function update_calendar(tz, filter_params) {
* filtered events.
*/
var calendarEl = document.getElementById('calendar');
if (!calendarEl) {
return;
}
event_calendar = new FullCalendar(calendarEl, {
plugins: [dayGridPlugin, bootstrap5Plugin],
initialView: 'dayGridMonth',
Expand Down Expand Up @@ -136,7 +142,7 @@ function format_session_time(session_elt, tz) {
.attr('data-start-utc'));
var end = moment.utc($(session_elt)
.attr('data-end-utc'));
return format_moment(start, tz, 'datetime') + '-' + format_moment(end, tz, 'time');
return format_moment(start, tz, 'datetime') + '-' + format_moment(end, tz, 'time') + ' ' + format_moment(start, tz, 'timezone');
}

function format_meeting_time(meeting_elt, tz) {
Expand Down
48 changes: 46 additions & 2 deletions ietf/templates/doc/document_material.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load static %}
{% load ietf_filters textfilters %}
{% load ietf_filters textfilters tz %}
{% block title %}{{ doc.title|default:"Untitled" }}{% endblock %}
{% block content %}
{% origin %}
Expand All @@ -29,6 +29,24 @@
{% if snapshot %}<span class="badge rounded-pill text-bg-warning">Snapshot</span>{% endif %}
</td>
</tr>
{% if doc.meeting_related %}
<tr>
<th scope="row">
Date and time
</th>
<td></td>
<td>
{% with session=doc.get_related_session %}
{% with timeslot=session.official_timeslotassignment.timeslot %}
{% if session.meeting %}
<span class="session-time date me-3" data-start-utc="{{ timeslot.time|utc|date:'Y-m-d H:i' }}" data-end-utc="{{ timeslot.end_time|utc|date:'Y-m-d H:i' }}"></span>
{% include "meeting/tz-display.html" with meeting_timezone=session.meeting.time_zone id_suffix="" minimal=True only %}
{% endif %}
{% endwith %}
{% endwith %}
</td>
</tr>
{% endif %}
<tr>
<th scope="row">Title</th>
<td class="edit">
Expand Down Expand Up @@ -97,7 +115,21 @@
{% if presentations %}
{% for pres in presentations %}
{{ pres.session.short_name }} at {{ pres.session.meeting }}
{% if pres.rev != doc.rev %}(version -{{ pres.rev }}){% endif %}{% if not forloop.last %},{% endif %}
{% if pres.rev != doc.rev %}(version -{{ pres.rev }}){% endif %}
<br>
<b>Remote instructions:</b>
{% if pres.session.agenda_note|first_url|conference_url %}
<a href="{{ pres.session.agenda_note|first_url }}" title="Online conference">
<i class="bi bi-beople"></i>
</a>
{% elif pres.session.remote_instructions|first_url|conference_url %}
<a href="{{ pres.session.remote_instructions|first_url }}"
title="Online conference">
<i class="bi bi-people"></i>
</a>
{% endif %}
{{ pres.session.remote_instructions|linkify }}
{% if not forloop.last %}<br>{% endif %}
{% endfor %}
{% else %}
<span class="text-body-secondary">(None)</span>
Expand Down Expand Up @@ -142,4 +174,16 @@
{% block js %}
<script src="{% static 'ietf/js/d3.js' %}"></script>
<script src="{% static 'ietf/js/document_timeline.js' %}"></script>
{% if doc.meeting_related %}
<script src="{% static 'ietf/js/moment.js' %}"></script>
<script src="{% static 'ietf/js/upcoming.js' %}"></script>
<script src="{% static 'ietf/js/timezone.js' %}"></script>
<script>
$(function () {
// Init with best guess at local timezone.
ietf_timezone.set_tz_change_callback(timezone_changed);
ietf_timezone.initialize('local');
});
</script>
{% endif %}
{% endblock %}
11 changes: 4 additions & 7 deletions ietf/templates/group/meetings-row.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% load origin tz %}
{% origin %}
{% for s in sessions %}
{% timezone s.meeting.time_zone %}
<tr>
<td>
{% if s.meeting.type.slug == 'ietf' %}
Expand All @@ -12,9 +11,11 @@
</td>
<td>
{% if s.current_status == "sched" %}
{{ s.time|date:"Y-m-d" }}
{% with timeslot=s.official_timeslotassignment.timeslot %}
<span class="session-time date me-3" data-start-utc="{{ timeslot.time|utc|date:'Y-m-d H:i' }}" data-end-utc="{{ timeslot.end_time|utc|date:'Y-m-d H:i' }}"></span>
{% endwith %}
{% else %}
<i>{{ s.current_status_name }}</i>
<div class="badge rounded-pill text-bg-secondary">{{ s.current_status_name }}</div>
{% endif %}
{% if show_request and s.meeting.type_id == 'ietf' %}
{% if can_edit %}
Expand All @@ -28,9 +29,6 @@
<td>
{% if s.name %}{{ s.name }}{% endif %}
</td>
<td>
{% if s.current_status == "sched" %}{{ s.time|date:"D" }}{% endif %}
</td>
<td>
{% if show_ical and s.current_status == "sched" %}
{% if s.meeting.type_id == 'ietf' %}
Expand Down Expand Up @@ -78,5 +76,4 @@
{% endif %}
</td>
</tr>
{% endtimezone %}
{% endfor %}
45 changes: 27 additions & 18 deletions ietf/templates/group/meetings.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends "group/group_base.html" %}
{# Copyright The IETF Trust 2015-2022, All Rights Reserved #}
{% load origin %}
{% load origin static %}
{% block title %}
Meetings
{% if group %}for {{ group.acronym }}{% endif %}
Expand All @@ -19,15 +18,15 @@
{% endblock %}
{% block group_content %}
{% origin %}
{% include "meeting/tz-display.html" with meeting_timezone=None id_suffix="" minimal=False only %}
{% if in_progress %}
<h2 class="mt-3" id="inprogressmeets">Meetings in progress</h2>
<h2 class="mt-5" id="inprogressmeets">Meetings in progress</h2>
{% with sessions=in_progress show_request=True show_ical=True can_edit_materials=can_edit %}
<table class="table table-sm table-striped tablesorter">
<thead>
<tr>
<th scope="col" data-sort="meeting">Meeting</th>
<th scope="col" data-sort="date">Date</th>
<th scope="col"></th>
<th class="col-3" scope="col" data-sort="meeting">Meeting</th>
<th class="col-3" scope="col" data-sort="date">Date</th>
<th scope="col"></th>
<th scope="col">Materials</th>
</tr>
Expand All @@ -39,7 +38,7 @@ <h2 class="mt-3" id="inprogressmeets">Meetings in progress</h2>
{% endwith %}
{% endif %}
{% if future %}
<h2 class="mt-3" id="futuremeets">
<h2 class="mt-5" id="futuremeets">
Future Meetings
<a class="float-end"
aria-label="icalendar entry for all scheduled future {{ group.acronym }} meetings"
Expand All @@ -51,9 +50,8 @@ <h2 class="mt-3" id="futuremeets">
<table class="table table-sm table-striped tablesorter">
<thead>
<tr>
<th scope="col" data-sort="meeting">Meeting</th>
<th scope="col" data-sort="date">Date</th>
<th scope="col"></th>
<th class="col-3" scope="col" data-sort="meeting">Meeting</th>
<th class="col-3" scope="col" data-sort="date">Date</th>
<th scope="col"></th>
<th scope="col">Materials</th>
</tr>
Expand All @@ -66,13 +64,12 @@ <h2 class="mt-3" id="futuremeets">
</table>
{% endif %}
{% if past or recent %}
<h2 class="mt-3" id="pastmeets">Past Meetings (within the last four years)</h2>
<h2 class="mt-5" id="pastmeets">Past Meetings (within the last four years)</h2>
<table class="table table-sm table-striped tablesorter">
<thead>
<tr>
<th scope="col" data-sort="meeting">Meeting</th>
<th scope="col" data-sort="date">Date</th>
<th scope="col"></th>
<th class="col-3" scope="col" data-sort="meeting">Meeting</th>
<th class="col-3" scope="col" data-sort="date">Date</th>
<th scope="col"></th>
<th scope="col">Materials</th>
</tr>
Expand Down Expand Up @@ -100,13 +97,12 @@ <h2 class="mt-3" id="pastmeets">Past Meetings (within the last four years)</h2>
older_sessions value, this block will need to be adjusted.
{% endcomment %}
{% if far_past %}
<h2 class="mt-3" id="farpastmeets">Meetings more than four years ago</h2>
<h2 class="mt-5" id="farpastmeets">Meetings more than four years ago</h2>
<table class="table table-sm table-striped tablesorter">
<thead>
<tr>
<th scope="col" data-sort="meeting">Meeting</th>
<th scope="col" data-sort="date">Date</th>
<th scope="col"></th>
<th class="col-3" scope="col" data-sort="meeting">Meeting</th>
<th class="col-3" scope="col" data-sort="date">Date</th>
<th scope="col"></th>
<th scope="col">Materials</th>
</tr>
Expand Down Expand Up @@ -160,3 +156,16 @@ <h2 class="mt-3" id="farpastmeets">Meetings more than four years ago</h2>
{% endif %}
{% endif %}
{% endblock %}
{% block js %}
<script src="{% static 'ietf/js/list.js' %}"></script>
<script src="{% static 'ietf/js/moment.js' %}"></script>
<script src="{% static 'ietf/js/upcoming.js' %}"></script>
<script src="{% static 'ietf/js/timezone.js' %}"></script>
<script>
$(function () {
// Init with best guess at local timezone.
ietf_timezone.set_tz_change_callback(timezone_changed);
ietf_timezone.initialize('local');
});
</script>
{% endblock %}
11 changes: 11 additions & 0 deletions ietf/templates/meeting/session_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ <h2 class="mt-3">
{% endif %}
{% endblock %}
{% block js %}
<script src="{% static 'ietf/js/list.js' %}"></script>
<script src="{% static 'ietf/js/moment.js' %}"></script>
<script src="{% static 'ietf/js/upcoming.js' %}"></script>
<script src="{% static 'ietf/js/timezone.js' %}"></script>
<script>
$(function () {
// Init with best guess at local timezone.
ietf_timezone.set_tz_change_callback(timezone_changed);
ietf_timezone.initialize('local');
});
</script>
{% if can_manage_materials %}
<script src="{% static 'ietf/js/sortable.js' %}"></script>
<script>
Expand Down
4 changes: 2 additions & 2 deletions ietf/templates/meeting/session_details_panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ <h3 class="" id="session_{{ session.pk }}">
{% if sessions|length > 1 %}Session {{ forloop.counter }} :{% endif %}
{% for time in session.times %}
{% if not forloop.first %},{% endif %}
{{ time|timezone:session.meeting.time_zone|dateformat:"l Y-m-d H:i T" }}
{% if time.tzinfo.zone != "UTC" %}<span class="small">({{ time|utc|dateformat:"H:i T" }})</span>{% endif %}
<span class="session-time date me-3" data-start-utc="{{ timeslot.time|utc|date:'Y-m-d H:i' }}" data-end-utc="{{ timeslot.end_time|utc|date:'Y-m-d H:i' }}"></span>
{% include "meeting/tz-display.html" with meeting_timezone=session.meeting.time_zone id_suffix=session.pk minimal=True only %}
{% endfor %}
{% if session.cancelled %}
<small class="badge rounded-pill text-bg-warning">Cancelled</small>
Expand Down
6 changes: 3 additions & 3 deletions ietf/templates/meeting/tz-display.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
{% load origin %}
{% origin %}
{% firstof id_suffix "" as suffix %}
<div class="tz-display flex-fill {% if minimal %}btn-group btn-group-sm my-2{% else %}input-group my-3{% endif %} flex-wrap">
{% if not minimal %}<label class="input-group-text border-primary bg-white fw-bold">Time zone:</label>{% endif %}
<span class="tz-display flex-fill {% if minimal %}btn-group btn-group-sm my-2{% else %}input-group my-3{% endif %} flex-wrap">
{% if not minimal %}<label class="input-group-text border-primary bg-transparent fw-bold">Time zone:</label>{% endif %}
{% if meeting_timezone is not None %}
<input type="radio"
name="tzradio{{ suffix }}"
Expand Down Expand Up @@ -46,4 +46,4 @@
</option>
</select>
{% endif %}
</div>
</span>
Loading