Changed the date/datetime at the top of meeting session pages to indicate timezone, and be given in UTC for virtual interim meetings, but meeting timezone with UTC in parentheses for in-person meetings. Fixes issue #2963.
- Legacy-Id: 17687
This commit is contained in:
parent
59df536958
commit
48562d131b
|
@ -1134,15 +1134,17 @@ def session_details(request, num, acronym):
|
|||
session.type_counter = Counter()
|
||||
ss = session.timeslotassignments.filter(schedule=meeting.schedule).order_by('timeslot__time')
|
||||
if ss:
|
||||
session.time = ', '.join(x.timeslot.time.strftime("%A %b-%d-%Y %H%M") for x in ss)
|
||||
if session.current_status == 'canceled':
|
||||
session.time += " CANCELLED"
|
||||
elif session.meeting.type_id=='interim':
|
||||
session.time = session.meeting.date.strftime("%A %b-%d-%Y")
|
||||
if session.current_status == 'canceled':
|
||||
session.time += " CANCELLED"
|
||||
if meeting.type_id == 'interim' and not (meeting.city or meeting.country):
|
||||
session.times = [ x.timeslot.utc_start_time() for x in ss ]
|
||||
else:
|
||||
session.times = [ x.timeslot.local_start_time() for x in ss ]
|
||||
session.cancelled = session.current_status == 'canceled'
|
||||
elif meeting.type_id=='interim':
|
||||
session.times = [ meeting.date ]
|
||||
session.cancelled = session.current_status == 'canceled'
|
||||
else:
|
||||
session.time = status_names.get(session.current_status, session.current_status)
|
||||
session.times = []
|
||||
session.cancelled = session.current_status == 'canceled'
|
||||
|
||||
session.filtered_artifacts = list(session.sessionpresentation_set.filter(document__type__slug__in=['agenda','minutes','bluesheets']))
|
||||
session.filtered_artifacts.sort(key=lambda d:['agenda','minutes','bluesheets'].index(d.document.type.slug))
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{% load origin ietf_filters textfilters %}{% origin %}
|
||||
{% load origin ietf_filters textfilters tz dateformat %}{% origin %}
|
||||
|
||||
{% for session in sessions %}
|
||||
<h2 class="anchor-target" id="session_{{session.pk}}">{% if sessions|length > 1 %}Session {{ forloop.counter }} : {% endif %}{{ session.time }}{% if session.name %} : {{ session.name }}{% endif %}
|
||||
<h2 class="anchor-target" id="session_{{session.pk}}">{% if sessions|length > 1 %}Session {{ forloop.counter }} : {% endif %}
|
||||
{% for time in session.times %}{% if not forloop.first %}, {% endif %} {{time|dateformat:"l Y-m-d H:i T"}} {% if time.tzinfo.zone != "UTC" %}<span class="small">({{time|utc|dateformat:"H:i T"}})</span>{% endif %}{% endfor %}
|
||||
{% if session.cancelled %}<span class="error">CANCELLED</span>{% endif %}
|
||||
{% if session.name %} : {{ session.name }}{% endif %}
|
||||
{% if meeting.date >= thisweek %}
|
||||
<a class="regular pull-right" title="icalendar entry for {{acronym}} session {{ forloop.counter }}" href="{% url 'ietf.meeting.views.ical_agenda' num=meeting.number session_id=session.id %}"><span class="fa fa-calendar"></span></a>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue