diff --git a/ietf/context_processors.py b/ietf/context_processors.py index 618a896ac..baa8d7a5d 100644 --- a/ietf/context_processors.py +++ b/ietf/context_processors.py @@ -3,6 +3,7 @@ import sys import django from django.conf import settings +from django.utils import timezone from ietf import __version__, __patch__, __release_branch__, __release_hash__ def server_mode(request): @@ -44,4 +45,9 @@ def sql_debug(request): def settings_info(request): return { 'settings': settings, - } \ No newline at end of file + } + +def timezone_now(request): + return { + 'timezone_now': timezone.now(), + } diff --git a/ietf/meeting/views.py b/ietf/meeting/views.py index 6c3d37d02..49d6c0af5 100644 --- a/ietf/meeting/views.py +++ b/ietf/meeting/views.py @@ -2341,7 +2341,6 @@ def session_details(request, num, acronym): 'can_manage_materials' : can_manage, 'can_view_request': can_view_request, 'thisweek': datetime_today()-datetime.timedelta(days=7), - 'now': timezone.now(), 'use_notes': meeting.uses_notes(), }) diff --git a/ietf/settings.py b/ietf/settings.py index 144f321cc..f16a36f5c 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -372,6 +372,7 @@ TEMPLATES = [ 'ietf.context_processors.settings_info', 'ietf.secr.context_processors.secr_revision_info', 'ietf.context_processors.rfcdiff_base_url', + 'ietf.context_processors.timezone_now', ], 'loaders': [ ('django.template.loaders.cached.Loader', ( diff --git a/ietf/templates/meeting/session_buttons_include.html b/ietf/templates/meeting/session_buttons_include.html index 1472e6a50..933786676 100644 --- a/ietf/templates/meeting/session_buttons_include.html +++ b/ietf/templates/meeting/session_buttons_include.html @@ -51,7 +51,7 @@ {% endif %} {# show stream buttons up till end of session, then show archive buttons #} - {% if now < timeslot.end_time %} + {% if timezone_now < timeslot.end_time %} {# chat #} {% endif %} {# show stream buttons up till end of session, then show archive buttons #} - {% if now < timeslot.end_time %} + {% if timezone_now < timeslot.end_time %} {# chat #}
  • {% if sessions|length > 1 %}Session {{ forloop.counter }} :{% endif %} {% for time in session.times %} @@ -22,7 +22,7 @@ {% if meeting.type.slug == 'interim' %} {% include "meeting/interim_session_buttons.html" with show_agenda=False show_empty=False %} {% 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 %} @@ -213,5 +213,149 @@ Link additional drafts to session {% endif %} -{% endwith %} + {% if timezone_now < timeslot.end_time %}{# show meeting tools until the session ends #} +

    Meeting tools

    + + + {% if use_notes %} + + + + {% endif %} + {# chat #} + + + + {# Video stream (meetecho) #} + {% if timezone_now < timeslot.end_time %} + + + + {% endif %} + {# Onsite tool (meetecho_onsite) #} + {% if timeslot.location.onsite_tool_url %} + + + + {% endif %} + {# Audio stream #} + {% if timeslot.location.audio_stream_url %} + + + + {% endif %} + {# Remote call-in #} + {% if session.agenda_note|first_url|conference_url %} + + + + {% elif session.remote_instructions|first_url|conference_url %} + + + + {% elif timeslot.location.webex_url %} + + + + {% endif %} + +
    + + Notepad for note-takers + +
    + + Chat room + +
    + + Video stream + +
    + + Onsite tool + +
    + + Audio stream + +
    + + Online conference + +
    + + Online conference + +
    + + Webex session + +
    + {% else %}{# session is in the past #} +

    Notes and recordings

    + + + {% if use_notes %} + + + + {% 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 %} + + + + {% endif %} + {% endfor %} + {# Then the youtube recordings #} + {% for r in recordings %} + {% if r.get_href and 'youtu' in r.get_href %} + + + + {% 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 %} + + + + {% endif %} + {% endfor %} + {% endif %} + {% endwith %} + {% if timeslot.location.video_stream_url %} + + + + {% endif %} + {% endif %} + +
    + + Notepad for note-takers + +
    + {{ r.title }} +
    + {{ r.title }} +
    + {{ r.title }} +
    + + Session recording + +
    + {% endif %} +{% endwith %}{% endwith %} {% endfor %} \ No newline at end of file