Ticket# 1644 : add "last updated" timestamps on meeting materials page

Added UTC time to the tooltip of Agenda and slides and an new column of Updated. Updated column present the latest time stamp for agenda and slides.
 - Legacy-Id: 13908
This commit is contained in:
Alireza Mohammadi 2017-07-15 15:23:10 +00:00
parent 263551d3b7
commit 5b0555581f
3 changed files with 72 additions and 49 deletions

View file

@ -128,6 +128,13 @@ def materials(request, num=None):
training = sessions.filter(group__acronym__in=['edu','iaoc'], type_id__in=['session', 'other', ])
iab = sessions.filter(group__parent__acronym = 'iab')
for topic in [plenaries, ietf, training, irtf, iab]:
for event in topic:
date_list = []
for slide_event in event.all_meeting_slides(): date_list.append(slide_event.time)
for agenda_event in event.all_meeting_agendas(): date_list.append(agenda_event.time)
if date_list: setattr(event, 'last_update', sorted(date_list, reverse=True)[0])
return render(request, "meeting/materials.html", {
'meeting_num': meeting.number,
'plenaries': plenaries,

View file

@ -1,5 +1,6 @@
{# Copyright The IETF Trust 2015, All Rights Reserved #}{% load origin %}{% origin %}
{% load ietf_filters proceedings_filters managed_groups %}
{% load tz %}
<tr>
<td>
{% comment %}
@ -27,7 +28,7 @@
<td>
{% if session.all_meeting_agendas %}
{% if session.all_meeting_agendas|length == 1 %}
<a href="{{ session.all_meeting_agendas.0|meeting_href:session.meeting }}">Agenda</a><br>
<a title="Last Update: {{ session.all_meeting_agendas.0.time|utc|date:"Y-m-d H:i:s" }} UTC" href="{{ session.all_meeting_agendas.0|meeting_href:session.meeting }}">Agenda</a><br>
{% else %}
{% for agenda in session.all_meeting_agendas %}
<a href="{{agenda|meeting_href:session.meeting}}">Agenda {{agenda.sessionpresentation_set.first.session.official_timeslotassignment.timeslot.time|date:"D G:i"}}</a></br>
@ -57,7 +58,7 @@
<td>
{% with session.all_meeting_slides as slides %}
{% for slide in slides %}
<a href="{{ slide|meeting_href:session.meeting}}">{{ slide.title|clean_whitespace }}</a>
<a title="Last Update: {{ slide.time|utc|date:"Y-m-d H:i:s" }} UTC" href="{{ slide|meeting_href:session.meeting}}">{{ slide.title|clean_whitespace }}</a>
<br>
{% empty %}
<span class="label label-warning">No slides</span>
@ -67,12 +68,17 @@
<td>
{% with session.all_meeting_drafts as drafts %}
{% for draft in drafts %}
<a href="{{ draft.href }}">{{ draft.name }}</a><br>
<a title="Last Update: {{ draft.time|utc|date:"Y-m-d H:i:s" }} UTC" href="{{ draft.href }}">{{ draft.name }}</a><br>
{% empty %}
<span class="label label-warning">No drafts</span>
{% endfor %}
{% endwith %}
</td>
<td>
{% if session.last_update %}
{{ session.last_update|utc|date:"Y-m-d" }}<br><small>{{ session.last_update|utc|date:"H:i:s" }} UTC</small>
{% endif %}
</td>
{% if user|has_role:"Secretariat" or user|managed_groups %}
<td>
<div>{% include "meeting/edit_materials_button.html" %}</div>

View file

@ -40,20 +40,22 @@
<table class="table table-condensed table-striped tablesorter">
<thead>
<tr>
{% if user|has_role:"Secretariat" or user|managed_groups %}
{% if user|has_role:"Secretariat" or user|managed_groups %}
<th class="col-md-1">Group</th>
<th class="col-md-1">Agenda</th>
<th class="col-md-1">Minutes</th>
<th class="col-md-5">Slides</th>
<th class="col-md-2">Drafts</th>
<th class="col-md-2">&nbsp;</th>
{% else %}
<th class="col-md-3">Slides</th>
<th class="col-md-4">Drafts</th>
<th class="col-md-1">Updated</th>
<th class="col-md-1">&nbsp;</th>
{% else %}
<th class="col-md-1">Group</th>
<th class="col-md-1">Agenda</th>
<th class="col-md-1">Minutes</th>
<th class="col-md-6">Slides</th>
<th class="col-md-3">Drafts</th>
{% endif %}
<th class="col-md-4">Slides</th>
<th class="col-md-4">Drafts</th>
<th class="col-md-1">Updated</th>
{% endif %}
</tr>
</thead>
@ -72,20 +74,22 @@
<table class="table table-condensed table-striped tablesorter">
<thead>
<tr>
{% if user|has_role:"Secretariat" or user|managed_groups %}
{% if user|has_role:"Secretariat" or user|managed_groups %}
<th class="col-md-1">Group</th>
<th class="col-md-1">Agenda</th>
<th class="col-md-1">Minutes</th>
<th class="col-md-5">Slides</th>
<th class="col-md-2">Drafts</th>
<th class="col-md-2">&nbsp;</th>
{% else %}
<th class="col-md-3">Slides</th>
<th class="col-md-4">Drafts</th>
<th class="col-md-1">Updated</th>
<th class="col-md-1">&nbsp;</th>
{% else %}
<th class="col-md-1">Group</th>
<th class="col-md-1">Agenda</th>
<th class="col-md-1">Minutes</th>
<th class="col-md-6">Slides</th>
<th class="col-md-3">Drafts</th>
{% endif %}
<th class="col-md-4">Slides</th>
<th class="col-md-4">Drafts</th>
<th class="col-md-1">Updated</th>
{% endif %}
</tr>
</thead>
@ -106,20 +110,22 @@
<table class="table table-condensed table-striped tablesorter">
<thead>
<tr>
{% if user|has_role:"Secretariat" or user|managed_groups %}
<th class="col-md-1">Group</th>
<th class="col-md-1">Agenda</th>
<th class="col-md-1">Minutes</th>
<th class="col-md-5">Slides</th>
<th class="col-md-2">Drafts</th>
<th class="col-md-2">&nbsp;</th>
{% else %}
<th class="col-md-1">Group</th>
<th class="col-md-1">Agenda</th>
<th class="col-md-1">Minutes</th>
<th class="col-md-6">Slides</th>
<th class="col-md-3">Drafts</th>
{% endif %}
{% if user|has_role:"Secretariat" or user|managed_groups %}
<th class="col-md-1">Group</th>
<th class="col-md-1">Agenda</th>
<th class="col-md-1">Minutes</th>
<th class="col-md-3">Slides</th>
<th class="col-md-4">Drafts</th>
<th class="col-md-1">Updated</th>
<th class="col-md-1">&nbsp;</th>
{% else %}
<th class="col-md-1">Group</th>
<th class="col-md-1">Agenda</th>
<th class="col-md-1">Minutes</th>
<th class="col-md-4">Slides</th>
<th class="col-md-4">Drafts</th>
<th class="col-md-1">Updated</th>
{% endif %}
</tr>
</thead>
@ -140,20 +146,22 @@
<table class="table table-condensed table-striped tablesorter">
<thead>
<tr>
{% if user|has_role:"Secretariat" or user|managed_groups %}
{% if user|has_role:"Secretariat" or user|managed_groups %}
<th class="col-md-1">Group</th>
<th class="col-md-1">Agenda</th>
<th class="col-md-1">Minutes</th>
<th class="col-md-5">Slides</th>
<th class="col-md-2">Drafts</th>
<th class="col-md-2">&nbsp;</th>
{% else %}
<th class="col-md-3">Slides</th>
<th class="col-md-4">Drafts</th>
<th class="col-md-1">Updated</th>
<th class="col-md-1">&nbsp;</th>
{% else %}
<th class="col-md-1">Group</th>
<th class="col-md-1">Agenda</th>
<th class="col-md-1">Minutes</th>
<th class="col-md-6">Slides</th>
<th class="col-md-3">Drafts</th>
{% endif %}
<th class="col-md-4">Slides</th>
<th class="col-md-4">Drafts</th>
<th class="col-md-1">Updated</th>
{% endif %}
</tr>
</thead>
@ -173,20 +181,22 @@
<table class="table table-condensed table-striped tablesorter">
<thead>
<tr>
{% if user|has_role:"Secretariat" or user|managed_groups %}
{% if user|has_role:"Secretariat" or user|managed_groups %}
<th class="col-md-1">Group</th>
<th class="col-md-1">Agenda</th>
<th class="col-md-1">Minutes</th>
<th class="col-md-5">Slides</th>
<th class="col-md-2">Drafts</th>
<th class="col-md-2">&nbsp;</th>
{% else %}
<th class="col-md-3">Slides</th>
<th class="col-md-4">Drafts</th>
<th class="col-md-1">Updated</th>
<th class="col-md-1">&nbsp;</th>
{% else %}
<th class="col-md-1">Group</th>
<th class="col-md-1">Agenda</th>
<th class="col-md-1">Minutes</th>
<th class="col-md-6">Slides</th>
<th class="col-md-3">Drafts</th>
{% endif %}
<th class="col-md-4">Slides</th>
<th class="col-md-4">Drafts</th>
<th class="col-md-1">Updated</th>
{% endif %}
</tr>
</thead>