fix: Add remote instructions and date/time to interim agenda page (#6442)
* fix: Add remote instructions to interim agenda page Fixes #6433 Fixes #6249 * Also add date and time * Fix HTML * Fix CI fail * Address code review comments * More suggestions from @rjsparks * Fix HTML * Add suffix
This commit is contained in:
parent
0f6b403904
commit
fa00abf9de
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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',
|
||||
|
@ -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) {
|
||||
|
|
|
@ -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 %}
|
||||
|
@ -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">
|
||||
|
@ -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>
|
||||
|
@ -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 %}
|
|
@ -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' %}
|
||||
|
@ -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 %}
|
||||
|
@ -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' %}
|
||||
|
@ -78,5 +76,4 @@
|
|||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endtimezone %}
|
||||
{% endfor %}
|
|
@ -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 %}
|
||||
|
@ -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>
|
||||
|
@ -39,7 +38,7 @@
|
|||
{% 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"
|
||||
|
@ -51,9 +50,8 @@
|
|||
<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>
|
||||
|
@ -66,13 +64,12 @@
|
|||
</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>
|
||||
|
@ -100,13 +97,12 @@
|
|||
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>
|
||||
|
@ -160,3 +156,16 @@
|
|||
{% 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 %}
|
|
@ -57,6 +57,17 @@
|
|||
{% 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>
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
{% 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>
|
||||
|
|
|
@ -12,8 +12,8 @@ As long as id_suffix is different, should allow for as many copies of the widget
|
|||
{% 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 }}"
|
||||
|
@ -46,4 +46,4 @@ As long as id_suffix is different, should allow for as many copies of the widget
|
|||
</option>
|
||||
</select>
|
||||
{% endif %}
|
||||
</div>
|
||||
</span>
|
Loading…
Reference in a new issue