datatracker/ietf/templates/meeting/session_buttons_include.html
2022-08-02 10:20:26 -05:00

379 lines
24 KiB
HTML

{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load static %}
{% load textfilters %}
{% load ietf_filters %}
{% origin %}
{% if item and item|should_show_agenda_session_buttons %}
{% with slug=item.slug %}
{% with session=item.session %}
{% with timeslot=item.timeslot %}
{% with meeting=schedule.meeting %}
{% if session.agenda and show_agenda %}
{# Note: if called with show_agenda=True, calling template must load agenda_materials.js, needed by session_agenda_include.html #}
{% include "meeting/session_agenda_include.html" with slug=slug session=session timeslot=timeslot only %}
{% endif %}
<div class="d-flex">
{% if timeslot.location.video_stream_url or timeslot.location.onsite_tool_url %}
<div id="session-meetecho-buttons-{{ session.pk }}"
role="group"
class="btn-group btn-group-sm d-none d-lg-flex me-1">
{# Video stream (meetecho) #}
{% if timeslot.location.video_stream_url %}
<a class="btn btn-outline-primary"
role="button"
href="{{ timeslot.location.video_stream_url|format:session }}"
aria-label="Full Client with Video"
title="Full Client with Video">
<i class="bi bi-camera-video"></i>
</a>
{% endif %}
{# Onsite tool (meetecho_onsite) #}
{% if timeslot.location.onsite_tool_url %}
<a class="btn btn-outline-primary"
role="button"
href="{{ timeslot.location.onsite_tool_url|format:session }}"
aria-label="Onsite tool"
title="Onsite tool">
<i class="bi bi-phone"></i>
</a>
{% endif %}
</div>
{% endif %}
<div id="session-buttons-{{ session.pk }}"
role="group"
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 #}
<button class="btn btn-outline-primary"
data-bs-toggle="modal" type="button"
data-bs-target="#modal-{{ slug }}"
aria-label="Show meeting materials"
title="Show meeting materials">
<i class="bi bi-arrows-fullscreen"></i>
</button>
{# materials tar file #}
<a class="btn btn-outline-primary"
role="button"
href="{% url 'ietf.meeting.views.session_draft_tarfile' num=meeting.number acronym=acronym %}"
aria-label="Download meeting materials as .tar archive"
title="Download meeting materials as .tar archive">
<i class="bi bi-file-zip"></i>
</a>
{# materials PDF file #}
<a class="btn btn-outline-primary"
role="button"
href="{% url 'ietf.meeting.views.session_draft_pdf' num=meeting.number acronym=acronym %}"
aria-label="Download meeting materials as PDF file"
title="Download meeting materials as PDF file">
<i class="bi bi-file-pdf"></i>
</a>
{% endif %}
{# HedgeDoc #}
{% if use_codimd %}
<a class="btn btn-outline-primary"
role="button"
href="{{ session.notes_url }}"
aria-label="Notepad for note-takers"
title="Notepad for note-takers">
<i class="bi bi-journal-text"></i>
</a>
{% endif %}
{# show stream buttons up till end of session, then show archive buttons #}
{% if now < timeslot.utc_end_time %}
{# Chat #}
<a class="btn btn-outline-primary"
role="button"
href="{{ session.chat_room_url }}"
aria-label="Chat room for {{ session.chat_room_name }}"
title="Chat room for {{ session.chat_room_name }}">
<i class="bi bi-chat"></i>
</a>
{# Audio stream #}
{% if timeslot.location.audio_stream_url %}
<a class="btn btn-outline-primary"
role="button"
href="{{ timeslot.location.audio_stream_url|format:session }}"
aria-label="Audio stream"
title="Audio stream">
<i class="bi bi-headphones"></i>
</a>
{% endif %}
{# Remote call-in #}
{% if session.agenda_note|first_url|conference_url %}
<a class="btn btn-outline-primary"
role="button"
href="{{ session.agenda_note|first_url }}"
aria-label="Online conference"
title="Online conference">
<i class="bi bi-people"></i>
</a>
{% elif session.remote_instructions|first_url|conference_url %}
<a class="btn btn-outline-primary"
role="button"
href="{{ session.remote_instructions|first_url }}"
aria-label="Online conference"
title="Online conference">
<i class="bi bi-people"></i>
</a>
{% elif timeslot.location.webex_url %}
<a class="btn btn-outline-primary"
role="button"
href="{{ timeslot.location.webex_url|format:session }}"
aria-label="Webex session"
title="Webex session">
<i class="bi bi-people"></i>
</a>
{% endif %}
{# iCalendar item #}
<a class="btn btn-outline-primary"
role="button"
href="{% url 'ietf.meeting.views.agenda_ical' num=meeting.number session_id=session.id %}"
aria-label="icalendar entry for {{ acronym }} session on {{ timeslot.utc_start_time|date:'Y-m-d H:i' }} UTC"
title="icalendar entry for {{ acronym }} session on {{ timeslot.utc_start_time|date:'Y-m-d H:i' }} UTC">
<i class="bi bi-calendar"></i>
</a>
{% else %}
{# Chat logs #}
{% if meeting.number|add:"0" >= 60 %}
<a class="btn btn-outline-primary"
role="button"
href="{{ session.chat_archive_url }}"
aria-label="Chat logs for {{ session.chat_room_name }}"
title="Chat logs for {{ session.chat_room_name }}">
<i class="bi bi-file-text"></i>
</a>
{% 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 %}
<a class="btn btn-outline-primary"
role="button"
href="{{ r.get_href }}"
aria-label="{{ r.title }}"
title="{{ r.title }}">
<i class="bi bi-file-play"></i>
</a>
{% endif %}
{% endfor %}
{# Then the youtube recordings #}
{% for r in recordings %}
{% if r.get_href and 'youtu' in r.get_href %}
<a class="btn btn-outline-primary"
role="button"
href="{{ r.get_href }}"
aria-label="{{ r.title }}"
title="{{ r.title }}">
<i class="bi bi-file-slides"></i>
</a>
{% 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 %}
<a class="btn btn-outline-primary"
role="button"
href="{{ r.get_href }}"
aria-label="{{ r.title }}"
title="{{ r.title }}">
<i class="bi bi-file-play"></i>
</a>
{% endif %}
{% endfor %}
{% endif %}
{% endwith %}
{% if timeslot.location.video_stream_url %}
<a class="btn btn-outline-primary"
role="button"
href="https://www.meetecho.com/ietf{{ meeting.number }}/recordings#{{ acronym.upper }}"
aria-label="Session recording"
title="Session recording">
<i class="bi bi-file-slides"></i>
</a>
{% endif %}
{% endif %}
{% endif %}
{% endwith %}
</div>
<div class="dropdown d-lg-none">
<button class="btn btn-outline-primary btn-sm dropdown-toggle"
type="button"
aria-label="Info"
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" type="button"
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="{% url 'ietf.meeting.views.session_draft_tarfile' num=meeting.number acronym=acronym %}">
<i class="bi bi-file-zip"></i> Meeting materials archive
</a>
</li>
{# materials PDF file #}
<li>
<a class="dropdown-item"
href="{% url 'ietf.meeting.views.session_draft_pdf' num=meeting.number acronym=acronym %}">
<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 %}
{# Chat #}
<li>
<a class="dropdown-item"
href="{{ session.chat_room_url }}">
<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 %}
{# Chat logs #}
{% if meeting.number|add:"0" >= 60 %}
<li>
<a class="dropdown-item"
href="{{ session.chat_archive_url }}">
<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>
</div>
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endif %}