feat: Mobile agenda improvements (#3655)
* fix: Improve agenda page for mobile (narrow) screens * Remove unrelated change * Remove FIXME
This commit is contained in:
parent
1771d6ea77
commit
52969aefca
|
@ -162,7 +162,7 @@ class MeetingTests(BaseMeetingTestCase):
|
|||
registration_text = "Registration"
|
||||
|
||||
# utc
|
||||
time_interval = "%s-%s" % (slot.utc_start_time().strftime("%H:%M").lstrip("0"), (slot.utc_start_time() + slot.duration).strftime("%H:%M").lstrip("0"))
|
||||
time_interval = r"%s<span.*/span>-%s" % (slot.utc_start_time().strftime("%H:%M").lstrip("0"), (slot.utc_start_time() + slot.duration).strftime("%H:%M").lstrip("0"))
|
||||
|
||||
r = self.client.get(urlreverse("ietf.meeting.views.agenda", kwargs=dict(num=meeting.number,utc='-utc')))
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
@ -172,14 +172,14 @@ class MeetingTests(BaseMeetingTestCase):
|
|||
self.assertIn(session.group.name, agenda_content)
|
||||
self.assertIn(session.group.parent.acronym.upper(), agenda_content)
|
||||
self.assertIn(slot.location.name, agenda_content)
|
||||
self.assertIn(time_interval, agenda_content)
|
||||
self.assertRegex(agenda_content, time_interval)
|
||||
self.assertIsNotNone(q(':input[value="%s"]' % meeting.time_zone),
|
||||
'Time zone selector should show meeting timezone')
|
||||
self.assertIsNotNone(q('.nav *:contains("%s")' % meeting.time_zone),
|
||||
'Time zone indicator should be in nav sidebar')
|
||||
|
||||
# plain
|
||||
time_interval = "%s-%s" % (slot.time.strftime("%H:%M").lstrip("0"), (slot.time + slot.duration).strftime("%H:%M").lstrip("0"))
|
||||
time_interval = r"%s<span.*/span>-%s" % (slot.time.strftime("%H:%M").lstrip("0"), (slot.time + slot.duration).strftime("%H:%M").lstrip("0"))
|
||||
|
||||
r = self.client.get(urlreverse("ietf.meeting.views.agenda", kwargs=dict(num=meeting.number)))
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
@ -189,7 +189,7 @@ class MeetingTests(BaseMeetingTestCase):
|
|||
self.assertIn(session.group.name, agenda_content)
|
||||
self.assertIn(session.group.parent.acronym.upper(), agenda_content)
|
||||
self.assertIn(slot.location.name, agenda_content)
|
||||
self.assertIn(time_interval, agenda_content)
|
||||
self.assertRegex(agenda_content, time_interval)
|
||||
self.assertIn(registration_text, agenda_content)
|
||||
|
||||
# Make sure there's a frame for the session agenda and it points to the right place
|
||||
|
@ -208,7 +208,7 @@ class MeetingTests(BaseMeetingTestCase):
|
|||
|
||||
# text
|
||||
# the rest of the results don't have as nicely formatted times
|
||||
time_interval = time_interval.replace(":", "")
|
||||
time_interval = "%s-%s" % (slot.time.strftime("%H%M").lstrip("0"), (slot.time + slot.duration).strftime("%H%M").lstrip("0"))
|
||||
|
||||
r = self.client.get(urlreverse("ietf.meeting.views.agenda", kwargs=dict(num=meeting.number, ext=".txt")))
|
||||
self.assertContains(r, session.group.acronym)
|
||||
|
|
|
@ -191,16 +191,16 @@ window.update_times = function (newtz) {
|
|||
.dayOfYear()) {
|
||||
$(this)
|
||||
.html(format_time(this.start_ts, newtz, this.format) +
|
||||
'-' + format_time(this.end_ts, newtz, 5) + tz);
|
||||
'<span class="d-lg-none"><br></span>-' + format_time(this.end_ts, newtz, 5) + tz);
|
||||
} else {
|
||||
$(this)
|
||||
.html(format_time(this.start_ts, newtz, this.format) +
|
||||
'-' +
|
||||
'<span class="d-lg-none"><br></span>-' +
|
||||
format_time(this.end_ts, newtz, this.format) + tz);
|
||||
}
|
||||
} else {
|
||||
$(this)
|
||||
.html(format_time(this.start_ts, newtz, this.format) + '-' +
|
||||
.html(format_time(this.start_ts, newtz, this.format) + '<span class="d-lg-none"><br></span>-' +
|
||||
format_time(this.end_ts, newtz, this.format));
|
||||
}
|
||||
});
|
||||
|
|
|
@ -138,7 +138,7 @@ $(function () {
|
|||
.attr("data-bs-offset", 0)
|
||||
.attr("tabindex", 0)
|
||||
.after($(`
|
||||
<div class="col-xl-2 small">
|
||||
<div class="col-xl-2 ps-0 small">
|
||||
<nav id="righthand-nav" class="position-fixed navbar navbar-light bg-light overflow-auto flex-fill" style="height: 70vh; width: inherit;">
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col overflow-hidden mx-3 ietf-auto-nav" id="content">
|
||||
<div class="col overflow-hidden mx-lg-3 ietf-auto-nav" id="content">
|
||||
<noscript>
|
||||
<div class="alert alert-danger alert-ignore my-3">
|
||||
<b>Javascript disabled?</b> Like other modern websites, the IETF Datatracker relies on Javascript.
|
||||
|
|
|
@ -143,11 +143,11 @@
|
|||
{% if item.timeslot.show_location and item.timeslot.get_html_location %}
|
||||
{% with item.timeslot.location.floorplan as floor %}
|
||||
{% if item.timeslot.location.floorplan %}
|
||||
<div class="d-none d-sm-block">
|
||||
<div class="d-none d-sm-block float-end">
|
||||
<a href="{% url 'ietf.meeting.views.floor_plan' num=schedule.meeting.number %}#floor-{{ floor.name|xslugify }}"
|
||||
class="float-end"
|
||||
title="{{ floor.name }}">
|
||||
<span class="badge bg-secondary label-wide">{{ floor.short }}</span>
|
||||
<span class="badge bg-secondary">{{ floor.short }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -161,7 +161,7 @@
|
|||
{% if item.session.current_status == 'canceled' %}
|
||||
<span class="badge bg-danger float-end">CANCELLED</span>
|
||||
{% else %}
|
||||
<div class="float-end ps-3">
|
||||
<div class="float-end ps-2">
|
||||
{% 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 %}
|
||||
|
@ -260,7 +260,7 @@
|
|||
{% if item.session.current_status == 'canceled' %}
|
||||
<span class="badge bg-danger float-end">Cancelled</span>
|
||||
{% else %}
|
||||
<div class="float-end ps-3">
|
||||
<div class="float-end ps-2">
|
||||
{% include "meeting/session_buttons_include.html" with show_agenda=True session=item.session meeting=schedule.meeting %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
{% endif %}
|
||||
<div id="session-buttons-{{ session.pk }}"
|
||||
role="group"
|
||||
class="btn-group btn-group-sm">
|
||||
class="btn-group btn-group-sm d-none d-lg-flex">
|
||||
{% with acronym=session.historic_group.acronym %}
|
||||
{% if session.agenda and show_agenda %}
|
||||
{# agenda pop-up button #}
|
||||
|
@ -57,7 +57,7 @@
|
|||
role="button"
|
||||
href="xmpp:{{ session.jabber_room_name }}@jabber.ietf.org?join"
|
||||
title="Chat room for {{ session.jabber_room_name }}">
|
||||
<i class="bi bi-lightbulb"></i>
|
||||
<i class="bi bi-chat"></i>
|
||||
</a>
|
||||
{# Video stream (meetecho) #}
|
||||
{% if timeslot.location.video_stream_url %}
|
||||
|
@ -72,7 +72,7 @@
|
|||
{% if timeslot.location.onsite_tool_url %}
|
||||
<a class="btn btn-outline-primary"
|
||||
role="button"
|
||||
href="{{timeslot.location.onsite_tool_url|format:session }}"
|
||||
href="{{ timeslot.location.onsite_tool_url|format:session }}"
|
||||
title="Onsite tool">
|
||||
<i class="bi bi-phone"></i>
|
||||
</a>
|
||||
|
@ -169,7 +169,7 @@
|
|||
{% if timeslot.location.video_stream_url %}
|
||||
<a class="btn btn-outline-primary"
|
||||
role="button"
|
||||
href="http://www.meetecho.com/ietf{{ meeting.number }}/recordings#{{ acronym.upper }}"
|
||||
href="https://www.meetecho.com/ietf{{ meeting.number }}/recordings#{{ acronym.upper }}"
|
||||
title="Session recording">
|
||||
<i class="bi bi-file-slides"></i>
|
||||
</a>
|
||||
|
@ -178,6 +178,175 @@
|
|||
{% endif %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="dropdown d-lg-none">
|
||||
<button class="btn btn-outline-primary btn-sm dropdown-toggle"
|
||||
type="button"
|
||||
id="session-buttons-dropdown-{{ session.pk }}"
|
||||
data-bs-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
<i class="bi bi-info-lg"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu"
|
||||
aria-labelledby="session-buttons-dropdown-{{ session.pk }}">
|
||||
{% with acronym=session.historic_group.acronym %}
|
||||
{% if session.agenda and show_agenda %}
|
||||
{# agenda pop-up button #}
|
||||
<li>
|
||||
<button class="dropdown-item"
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#modal-{{ slug }}">
|
||||
<i class="bi bi-arrows-fullscreen"></i> Show meeting materials
|
||||
</button>
|
||||
</li>
|
||||
{# materials tar file #}
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="/meeting/{{ meeting.number }}/agenda/{{ acronym }}-drafts.tgz">
|
||||
<i class="bi bi-file-zip"></i> Meeting materials archive
|
||||
</a>
|
||||
</li>
|
||||
{# materials PDF file #}
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="/meeting/{{ meeting.number }}/agenda/{{ acronym }}-drafts.pdf">
|
||||
<i class="bi bi-file-pdf"></i> Meeting materials PDF
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# HedgeDoc #}
|
||||
{% if use_codimd %}
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ session.notes_url }}">
|
||||
<i class="bi bi-journal-text"></i> Notepad for note-takers
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# show stream buttons up till end of session, then show archive buttons #}
|
||||
{% if now < timeslot.utc_end_time %}
|
||||
{# Jabber #}
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="xmpp:{{ session.jabber_room_name }}@jabber.ietf.org?join">
|
||||
<i class="bi bi-chat"></i> Chat room
|
||||
</a>
|
||||
</li>
|
||||
{# Video stream (meetecho) #}
|
||||
{% if timeslot.location.video_stream_url %}
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="{{ timeslot.location.video_stream_url|format:session }}">
|
||||
<i class="bi bi-camera-video"></i> Video stream
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# Onsite tool (meetecho_onsite) #}
|
||||
{% if timeslot.location.onsite_tool_url %}
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="{{ timeslot.location.onsite_tool_url|format:session }}">
|
||||
<i class="bi bi-phone"></i> Onsite tool
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# Audio stream #}
|
||||
{% if timeslot.location.audio_stream_url %}
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="{{ timeslot.location.audio_stream_url|format:session }}">
|
||||
<i class="bi bi-headphones"></i> Audio stream
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# Remote call-in #}
|
||||
{% if session.agenda_note|first_url|conference_url %}
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ session.agenda_note|first_url }}">
|
||||
<i class="bi bi-people"></i> Online conference
|
||||
</a>
|
||||
</li>
|
||||
{% elif session.remote_instructions|first_url|conference_url %}
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="{{ session.remote_instructions|first_url }}">
|
||||
<i class="bi bi-people"></i> Online conference
|
||||
</a>
|
||||
</li>
|
||||
{% elif timeslot.location.webex_url %}
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="{{ timeslot.location.webex_url|format:session }}">
|
||||
<i class="bi bi-people"></i> Webex session
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# iCalendar item #}
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="{% url 'ietf.meeting.views.agenda_ical' num=meeting.number session_id=session.id %}">
|
||||
<i class="bi bi-calendar"></i> Add to calendar
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
{# Jabber logs #}
|
||||
{% if meeting.number|add:"0" >= 60 %}
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="https://www.ietf.org/jabber/logs/{{ session.jabber_room_name }}?C=M;O=D">
|
||||
<i class="bi bi-file-text"></i> Chat logs
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# Recordings #}
|
||||
{% if meeting.number|add:"0" >= 80 %}
|
||||
{% with session.recordings as recordings %}
|
||||
{% if recordings %}
|
||||
{# There's no guaranteed order, so this is a bit messy: #}
|
||||
{# First, the audio recordings, if any #}
|
||||
{% for r in recordings %}
|
||||
{% if r.get_href and 'audio' in r.get_href %}
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ r.get_href }}">
|
||||
<i class="bi bi-file-play"></i> {{ r.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{# Then the youtube recordings #}
|
||||
{% for r in recordings %}
|
||||
{% if r.get_href and 'youtu' in r.get_href %}
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ r.get_href }}">
|
||||
<i class="bi bi-file-slides"></i> {{ r.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{# Finally, any other recordings #}
|
||||
{% for r in recordings %}
|
||||
{% if r.get_href and not 'audio' in r.get_href and not 'youtu' in r.get_href %}
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ r.get_href }}">
|
||||
<i class="bi bi-file-play"></i> {{ r.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% if timeslot.location.video_stream_url %}
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="https://www.meetecho.com/ietf{{ meeting.number }}/recordings#{{ acronym.upper }}">
|
||||
<i class="bi bi-file-slides"></i> Session recording
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
data-start-time="{{ item.start_timestamp }}"
|
||||
data-end-time="{{ item.end_timestamp }}">
|
||||
{% if "-utc" in request.path %}
|
||||
{{ item.timeslot.utc_start_time|date:"H:i" }}-{{ item.timeslot.utc_end_time|date:"H:i" }}
|
||||
{{ item.timeslot.utc_start_time|date:"H:i" }}<span class="d-lg-none"><br></span>-{{ item.timeslot.utc_end_time|date:"H:i" }}
|
||||
{% else %}
|
||||
{{ item.timeslot.time|date:"H:i" }}-{{ item.timeslot.end_time|date:"H:i" }}
|
||||
{{ item.timeslot.time|date:"H:i" }}<span class="d-lg-none"><br></span>-{{ item.timeslot.end_time|date:"H:i" }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in a new issue