More agenda template fixes.

- Legacy-Id: 19656
This commit is contained in:
Lars Eggert 2021-11-12 17:47:17 +00:00
parent be3a8f71ce
commit 75b5fc158e
5 changed files with 155 additions and 208 deletions

View file

@ -2,7 +2,7 @@ module.exports = {
extends: ["eslint:recommended"],
rules: {
indent: ["error", 4],
quotes: ["error", "double", { avoidEscape: true, allowTemplateLiterals: true }],
quotes: "off",
"no-multiple-empty-lines": ["error", { max: 2, maxEOF: 0 }],
"quote-props": ["error", "as-needed"],
"brace-style": ["error", "1tbs", { allowSingleLine: true }],

View file

@ -73,7 +73,7 @@
</ul>
</div>
{% endif %}
<div class="col" id="content">
<div class="col mx-3" id="content">
{% comment %} {% bootstrap_messages %} {% endcomment %}
{% for message in messages %}
<div class="alert{% if message.level_tag %} alert-{% if message.level_tag == 'error' %}danger{% else %}{{ message.level_tag }}{% endif %}{% endif %}{% if message.extra_tags %} {{ message.extra_tags }}{% endif %} alert-dismissable fade show">

View file

@ -7,48 +7,14 @@
{% load htmlfilters agenda_custom_tags%}
{% block title %}
IETF {{ schedule.meeting.number }} meeting agenda
IETF {{ schedule.meeting.number }} Meeting Agenda
{% if "-utc" in request.path %}
(UTC)
{% endif %}
{% endblock %}
{% block morecss %}
iframe#weekview { height: 600px; width: 100%; }
tr:not(:first-child) th.gap {
height: 3em !important;
background-color: inherit !important;
border: none !important;
}
tr:first-child th.gap {
height: 0 !important;
background-color: inherit !important;
border: none !important;
}
.session-materials .agenda-frame,.minutes-frame {
white-space: normal;
}
div.tz-display {
margin-bottom: 0.5em;
margin-top: 1em;
text-align: right;
}
.tz-display a {
cursor: pointer;
}
.tz-display label {
font-weight: normal;
}
.tz-display select {
min-width: 15em;
}
#affix .nav li.tz-display {
padding: 4px 20px;
}
#affix .nav li.tz-display a {
display: inline;
padding: 0;
}
iframe#weekview { height: 25em; }
{% endblock %}
{% block bodyAttrs %}data-spy="scroll" data-target="#affix"{% endblock %}
@ -57,7 +23,6 @@
{% origin %}
<div class="row">
<div class="col-md-12">
{% if "-utc" in request.path %}
{% include "meeting/meeting_heading.html" with meeting=schedule.meeting updated=updated selected="agenda-utc" title_extra="(UTC)" %}
{% else %}
@ -65,29 +30,31 @@
{% endif %}
</div>
</div>
<div class="row">
<div class="col-md-10">
{# cache this part -- it takes 3-6 seconds to generate #}
{% load cache %}
{% cache cache_time ietf_meeting_agenda_utc schedule.meeting.number request.path %}
<div class="row">
<div class="col-xs-6"><h1>Agenda</h1></div>
<div class="col-xs-6">
<div class="tz-display">
<div><small>
<label for="timezone-select">Time zone:</label>
<a id="meeting-timezone" onclick="ietf_timezone.use('{{ timezone }}')">Meeting</a> |
<a id="local-timezone" onclick="ietf_timezone.use('local')">Local</a> |
<a id="utc-timezone" onclick="ietf_timezone.use('UTC')">UTC</a>
</small></div>
<select id="timezone-select" class="tz-select">
<div class="col-5">
<h2>Agenda</h2>
</div>
<div class="col float-end">
<div class="input-group input-group-sm">
<label class="input-group-text border-secondary">Time zone:</label>
<button class="btn btn-outline-secondary" type="button" id="meeting-timezone" onclick="ietf_timezone.use('{{ timezone }}')">Meeting</button>
<button class="btn btn-outline-secondary" type="button" id="local-timezone" onclick="ietf_timezone.use('local')">Local</button>
<button class="btn btn-outline-secondary" type="button" id="utc-timezone" onclick="ietf_timezone.use('UTC')">UTC</button>
<select id="timezone-select" class="tz-select form-select border-secondary">
{# Avoid blank while loading. JavaScript replaces the option list after init. #}
<option selected>{{ timezone }}</option>
</select>
</div>
</div>
</div>
{% if is_current_meeting %}
<p class="alert alert-info">
<b>Note:</b> IETF agendas are subject to change, up to and during a meeting.
@ -100,23 +67,22 @@
</p>
{% endif %}
<p>
{% include "meeting/agenda_filter.html" with filter_categories=filter_categories customize_button_text="Customize the agenda view..." %}
</p>
<h2>Download as .ics</h2>
<p class="buttonlist">
<p>
{% for fc in filter_categories %}
{% if not forloop.last %} {# skip the last group, it's the office hours/misc #}
<div style="display:inline-block;margin-right:1em">
{% for p in fc|dictsort:"label" %}
<a class="btn btn-default" href="{% url "ietf.meeting.views.agenda_ical" num=schedule.meeting.number %}?show={{p.keyword}}">{{p.label}}</a>
<a class="btn btn-primary btn-sm mb-3" href="{% url "ietf.meeting.views.agenda_ical" num=schedule.meeting.number %}?show={{p.keyword}}">{{p.label}}</a>
{% endfor %}
</div>
{% endif %}
{% endfor %}
<div style="display:inline-block">
<a class="btn btn-default" href="{% url "ietf.meeting.views.agenda_ical" num=schedule.meeting.number %}?show={{ non_area_keywords|join:',' }}">Non-area events</a>
<a id="ical-link" class="hidden btn btn-primary agenda-link filterable" href="{% url "ietf.meeting.views.agenda_ical" num=schedule.meeting.number %}">Customized schedule</a>
</div>
<a class="btn btn-primary btn-sm mb-3" href="{% url "ietf.meeting.views.agenda_ical" num=schedule.meeting.number %}?show={{ non_area_keywords|join:',' }}">Non-area events</a>
<a id="ical-link" class="hidden btn btn-primary btn-sm mb-3 agenda-link filterable" href="{% url "ietf.meeting.views.agenda_ical" num=schedule.meeting.number %}">Customized schedule</a>
</p>
<h2>
@ -127,18 +93,19 @@
{% endif %}
</h2>
<iframe class="hidden" id="weekview"></iframe>
<iframe class="hidden w-100" scrolling="no" id="weekview"></iframe>
<h2>Detailed Agenda</h2>
<table class="table table-sm table-striped">
{% for item in filtered_assignments %}
{% ifchanged item.timeslot.time|date:"Y-m-d" %}
<tr><th class="gap" colspan="7"></th></tr>
<tr class="table-warning">
<th colspan="7">
{# The anchor here needs to be in a div, not in the th, in order for the anchor-target margin hack to work #}
<div class="anchor-target" id="{{item.timeslot.time|slugify}}"></div>
{{ item.timeslot.time|date:"l, F j, Y" }}
<h6 class="mt-2">{{ item.timeslot.time|date:"l, F j, Y" }}</h6>
</th>
</tr>
{% endifchanged %}
@ -165,7 +132,7 @@
{% if item.timeslot.location.floorplan %}
<div class="hidden-xs">
<a href="{% url 'ietf.meeting.views.floor_plan' num=schedule.meeting.number %}#{{floor.name|xslugify}}"
class="float-end" title="{{floor.name}}"><span class="badge bg-blank label-wide">{{floor.short}}</span></a>
class="float-end" title="{{floor.name}}"><span class="badge bg-secondary label-wide">{{floor.short}}</span></a>
</div>
{% endif %}
{% endwith %}
@ -179,7 +146,7 @@
{% if item.session.current_status == 'canceled' %}
<span class="badge bg-danger float-end">CANCELLED</span>
{% else %}
<div class="float-end padded-left">
<div class="float-end ps-3">
{% if item.slot_type.slug == 'other' %}
{% if item.session.agenda or item.session.remote_instructions or item.session.agenda_note %}
{% include "meeting/session_buttons_include.html" with show_agenda=True item=item schedule=schedule %}
@ -249,7 +216,7 @@
{% if item.timeslot.location.floorplan %}
<div class="hidden-xs">
<a href="{% url 'ietf.meeting.views.floor_plan' num=schedule.meeting.number %}#{{floor.name|xslugify}}"
class="float-end" title="{{floor.name}}"><span class="badge bg-blank">{{floor.short}}</span></a>
class="float-end" title="{{floor.name}}"><span class="badge bg-secondary">{{floor.short}}</span></a>
</div>
{% endif %}
{% endwith %}
@ -285,7 +252,7 @@
{% endif %}
{% if item.session.historic_group.state_id == "bof" %}
<span class="badge bg-success float-end">BOF</span>
<span class="badge bg-success float-end me-2">BOF</span>
{% endif %}
{% if item.session.current_status == 'resched' %}

View file

@ -10,20 +10,20 @@ Optional parameters:
<div class="accordion" id="accordion">
<div class="accordion-item">
<h2 class="accordion-header" id="heading">
<button class="accordion-button {% if not always_show %}collapsed{% endif %}" type="button" data-bs-toggle="collapse" data-bs-target="#collapse" aria-expanded="{% if not always_show %}false{% else %}true{% endif %}" aria-controls="collapse">
<button class="accordion-button {% if not always_show %}collapsed{% endif %}" type="button" data-bs-toggle="collapse" data-bs-target="#customize" aria-expanded="{% if not always_show %}false{% else %}true{% endif %}" aria-controls="customize">
{% firstof customize_button_text "Customize..."%}
</button>
</h2>
<div id="customize" class="{% if not always_show %}panel-collapse collapse{% endif %}">
<div id="customize" class="accordion-collapse collapse{% if always_show %} show{% endif %}" aria-labelledby="heading" data-bs-parent="#accordion">
<div class="accordion-body">
<span hidden {# options to pass to the JS - correspond to keys in opts object #}
id="agenda-filter-options"
data-always-show="{% firstof always_show False %}">
</span>
<div id="collapse" class="accordion-collapse collapse" aria-labelledby="heading" data-bs-parent="#accordion">
<div class="accordion-body">
<p>
You can customize the agenda view to show only selected sessions,
by clicking on groups and areas in the table below.
@ -33,57 +33,37 @@ Optional parameters:
{% if filter_categories|length %}
<p>Groups displayed in <b><i>italics</i></b> are BOFs.</p>
{% with spacer_scale=5 %}
{% with width_scale=filter_categories|agenda_width_scale:spacer_scale %}
<table class="table table-sm">
<thead>
<tr>
<div class="row">
{% for fc in filter_categories %}
{% if not forloop.first %}
<th style="width:{% widthratio 1 width_scale 100 %}%"></th>
{% endif %}
{% for area in fc %}
<th style="width:{% widthratio spacer_scale width_scale 100 %}%">
{% if area.keyword %}
<button class="btn btn-primary btn-block pickview {{ area.keyword }}"
data-filter-item="{{ area.keyword }}">
<div class="col-1 ms-1">
<div class="row">
{% if area.label or area.keyword %}
<button type="button" class="btn btn-sm btn-outline-primary pickview {{ area.keyword }}" data-filter-item="{{ area.keyword }}">
{% firstof area.label area.keyword %}
</button>
{% endif %}
</th>
{% endfor %}
{% endfor %}
</tr>
</thead>
<tbody>
<tr>
{% for fc in filter_categories %}
{% if not forloop.first %} <td></td> {% endif %}
{% for p in fc %}
<td class="view{% if p.keyword %} {{ p.keyword }}{% endif %}">
<div class="btn-group-vertical btn-block">
{% for button in p.children %}
<div class="btn-group btn-group-xs btn-group-justified">
<button class="btn btn-primary pickview {{ button.keyword }}"
{% if button.toggled_by %}data-filter-keywords="{{ button.toggled_by|join:"," }}"{% endif %}
data-filter-item="{{ button.keyword }}">
{% if button.is_bof %}
<i>{{ button.label }}</i>
</div>
<div class="row view{% if p.keyword %} {{ p.keyword }}{% endif %}">
<div class="m-0 p-0 btn-group-vertical btn-group-sm " role="group" aria-label="{% firstof area.label area.keyword %}">
{% for group in area.children %}
<button type="button" class="overflow-hidden btn btn-outline-secondary pickview {{ group.keyword }}" {% if group.toggled_by %}data-filter-keywords="{{ group.toggled_by|join:"," }}"{% endif %} data-filter-item="{{ group.keyword }}">
<small>
{% if group.is_bof %}
<i>{{ group.label }}</i>
{% else %}
{{ button.label }}
{{ group.label }}
{% endif %}
</small>
</button>
</div>
{% endfor %}
</div>
</td>
</div>
</div>
{% endfor %}
{% endfor %}
</tr>
</tbody>
</table>
{% endwith %}
{% endwith %}
</div>
{% else %}
<blockquote><i>No WG / RG data available -- no WG / RG sessions have been scheduled yet.</i>
</blockquote>
@ -91,5 +71,4 @@ Optional parameters:
</div>
</div>
</div>
</div>
</div>

View file

@ -7,14 +7,14 @@
{% if schedule != meeting.schedule %}
<h3 class="alert alert-danger text-center">
This is schedule {{schedule.owner.email}}/{{ schedule.name }}, not the official schedule.
This is schedule {{ schedule.owner.email }}/{{ schedule.name }}, not the official schedule.
</h3>
{% endif %}
<h1>
IETF {{ meeting.number }} Meeting Agenda {{ title_extra }}
<br>
<small>
</h1>
<h4>
{{ meeting.city|default:"Location TBD" }}, {{ meeting.date|date:"F j" }} -
{% if meeting.date.month != meeting.end_date.month %}
{{ meeting.end_date|date:"F " }}
@ -22,14 +22,14 @@
{{ meeting.end_date|date:"j, Y" }}
{% if updated %}
<span class="float-end">
Updated {{ updated|date:"Y-m-d \a\t G:i:s (T)" }}
Updated: {{ updated|date:"Y-m-d \a\t G:i:s (T)" }}
</span>
{% endif %}
</small>
</h1>
</h4>
{# <a> tags with the agenda-link filterable classes will be updated with show/hide parameters #}
<ul class="nav nav-tabs">
<p>
{# a tags with the agenda-link filterable classes will be updated with show/hide parameters #}
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link {% if selected == "agenda" %}active{% endif %}" href="{% url 'ietf.meeting.views.agenda' num=meeting.number %}"
class="agenda-link filterable">
@ -78,4 +78,5 @@
Select Sessions
</a>
</li>
</ul>
</ul>
</p>