feat: Improve links to meeting tools from group pages (#5130)
* chore: Remove unused template parameter from {%include%} * feat: Add "Meeting tools" section to group session details panel * feat: Use better label for recordings section after session has ended * feat: Define template tag to store timezone.now in the render context * fix: Use get_now tag in session_buttons_include.html * fix: Update session_details_panel.html to use get_now tag * refactor: Inject timezone_now from a context processor instead of tag * chore: Remove unused imports * chore: Remove unused {%load%} * chore: Revert renaming of dateformat.py
This commit is contained in:
parent
82e0940f2d
commit
6c31c73eab
|
@ -3,6 +3,7 @@
|
||||||
import sys
|
import sys
|
||||||
import django
|
import django
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.utils import timezone
|
||||||
from ietf import __version__, __patch__, __release_branch__, __release_hash__
|
from ietf import __version__, __patch__, __release_branch__, __release_hash__
|
||||||
|
|
||||||
def server_mode(request):
|
def server_mode(request):
|
||||||
|
@ -44,4 +45,9 @@ def sql_debug(request):
|
||||||
def settings_info(request):
|
def settings_info(request):
|
||||||
return {
|
return {
|
||||||
'settings': settings,
|
'settings': settings,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def timezone_now(request):
|
||||||
|
return {
|
||||||
|
'timezone_now': timezone.now(),
|
||||||
|
}
|
||||||
|
|
|
@ -2341,7 +2341,6 @@ def session_details(request, num, acronym):
|
||||||
'can_manage_materials' : can_manage,
|
'can_manage_materials' : can_manage,
|
||||||
'can_view_request': can_view_request,
|
'can_view_request': can_view_request,
|
||||||
'thisweek': datetime_today()-datetime.timedelta(days=7),
|
'thisweek': datetime_today()-datetime.timedelta(days=7),
|
||||||
'now': timezone.now(),
|
|
||||||
'use_notes': meeting.uses_notes(),
|
'use_notes': meeting.uses_notes(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -372,6 +372,7 @@ TEMPLATES = [
|
||||||
'ietf.context_processors.settings_info',
|
'ietf.context_processors.settings_info',
|
||||||
'ietf.secr.context_processors.secr_revision_info',
|
'ietf.secr.context_processors.secr_revision_info',
|
||||||
'ietf.context_processors.rfcdiff_base_url',
|
'ietf.context_processors.rfcdiff_base_url',
|
||||||
|
'ietf.context_processors.timezone_now',
|
||||||
],
|
],
|
||||||
'loaders': [
|
'loaders': [
|
||||||
('django.template.loaders.cached.Loader', (
|
('django.template.loaders.cached.Loader', (
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# show stream buttons up till end of session, then show archive buttons #}
|
{# show stream buttons up till end of session, then show archive buttons #}
|
||||||
{% if now < timeslot.end_time %}
|
{% if timezone_now < timeslot.end_time %}
|
||||||
{# chat #}
|
{# chat #}
|
||||||
<a class="btn btn-outline-primary"
|
<a class="btn btn-outline-primary"
|
||||||
role="button"
|
role="button"
|
||||||
|
@ -237,7 +237,7 @@
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# show stream buttons up till end of session, then show archive buttons #}
|
{# show stream buttons up till end of session, then show archive buttons #}
|
||||||
{% if now < timeslot.end_time %}
|
{% if timezone_now < timeslot.end_time %}
|
||||||
{# chat #}
|
{# chat #}
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item"
|
<a class="dropdown-item"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% load origin ietf_filters textfilters tz dateformat %}
|
{% load origin ietf_filters textfilters tz dateformat %}
|
||||||
{% origin %}
|
{% origin %}
|
||||||
{% for session in sessions %}
|
{% for session in sessions %}
|
||||||
{% with item=session.official_timeslotassignment %}
|
{% with item=session.official_timeslotassignment %} {% with timeslot=item.timeslot %}
|
||||||
<h3 class="mt-4" id="session_{{ session.pk }}">
|
<h3 class="mt-4" id="session_{{ session.pk }}">
|
||||||
{% if sessions|length > 1 %}Session {{ forloop.counter }} :{% endif %}
|
{% if sessions|length > 1 %}Session {{ forloop.counter }} :{% endif %}
|
||||||
{% for time in session.times %}
|
{% for time in session.times %}
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
{% if meeting.type.slug == 'interim' %}
|
{% if meeting.type.slug == 'interim' %}
|
||||||
{% include "meeting/interim_session_buttons.html" with show_agenda=False show_empty=False %}
|
{% include "meeting/interim_session_buttons.html" with show_agenda=False show_empty=False %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include "meeting/session_buttons_include.html" with show_agenda=False show_empty=False item=session.official_timeslotassignment use_notes=session.meeting.use_notes %}
|
{% include "meeting/session_buttons_include.html" with show_agenda=False item=session.official_timeslotassignment use_notes=session.meeting.use_notes %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -213,5 +213,149 @@
|
||||||
Link additional drafts to session
|
Link additional drafts to session
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% if timezone_now < timeslot.end_time %}{# show meeting tools until the session ends #}
|
||||||
|
<h3 class="mt-4">Meeting tools</h3>
|
||||||
|
<table class="table table-sm table-striped meeting-tools"
|
||||||
|
id="meeting_tools_{{ session.pk }}">
|
||||||
|
<tbody>
|
||||||
|
{% if use_notes %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ session.notes_url }}">
|
||||||
|
<i class="bi bi-journal-text"></i> Notepad for note-takers
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{# chat #}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ session.chat_room_url }}">
|
||||||
|
<i class="bi bi-chat"></i> Chat room
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{# Video stream (meetecho) #}
|
||||||
|
{% if timezone_now < timeslot.end_time %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ timeslot.location.video_stream_url|format:session }}">
|
||||||
|
<i class="bi bi-camera-video"></i> Video stream
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{# Onsite tool (meetecho_onsite) #}
|
||||||
|
{% if timeslot.location.onsite_tool_url %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ timeslot.location.onsite_tool_url|format:session }}">
|
||||||
|
<i class="bi bi-phone"></i> Onsite tool
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{# Audio stream #}
|
||||||
|
{% if timeslot.location.audio_stream_url %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ timeslot.location.audio_stream_url|format:session }}">
|
||||||
|
<i class="bi bi-headphones"></i> Audio stream
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{# Remote call-in #}
|
||||||
|
{% if session.agenda_note|first_url|conference_url %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ session.agenda_note|first_url }}">
|
||||||
|
<i class="bi bi-people"></i> Online conference
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% elif session.remote_instructions|first_url|conference_url %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ session.remote_instructions|first_url }}">
|
||||||
|
<i class="bi bi-people"></i> Online conference
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% elif timeslot.location.webex_url %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ timeslot.location.webex_url|format:session }}">
|
||||||
|
<i class="bi bi-people"></i> Webex session
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% else %}{# session is in the past #}
|
||||||
|
<h3 class="mt-4">Notes and recordings</h3>
|
||||||
|
<table class="table table-sm table-striped meeting-tools"
|
||||||
|
id="notes_and_recordings_{{ session.pk }}">
|
||||||
|
<tbody>
|
||||||
|
{% if use_notes %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ session.notes_url }}">
|
||||||
|
<i class="bi bi-journal-text"></i> Notepad for note-takers
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% 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 %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ r.get_href }}"><i class="bi bi-file-play"></i> {{ r.title }}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{# Then the youtube recordings #}
|
||||||
|
{% for r in recordings %}
|
||||||
|
{% if r.get_href and 'youtu' in r.get_href %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ r.get_href }}"><i class="bi bi-file-slides"></i> {{ r.title }}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% 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 %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ r.get_href }}"><i class="bi bi-file-play"></i> {{ r.title }}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endwith %}
|
||||||
|
{% if timeslot.location.video_stream_url %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="https://www.meetecho.com/ietf{{ meeting.number }}/recordings#{{ acronym.upper }}">
|
||||||
|
<i class="bi bi-file-slides"></i> Session recording
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endif %}
|
||||||
|
{% endwith %}{% endwith %}
|
||||||
{% endfor %}
|
{% endfor %}
|
Loading…
Reference in a new issue