Added groups that did not meet to the proceedings. Commit ready for merge.

- Legacy-Id: 12329
This commit is contained in:
Robert Sparks 2016-11-12 07:09:01 +00:00
parent ca0980a8ea
commit 467ec82336
3 changed files with 62 additions and 25 deletions

View file

@ -996,6 +996,9 @@ class Session(models.Model):
unique_constraints_dict = None
def not_meeting(self):
return self.status_id == 'notmeet'
# Should work on how materials are captured so that deleted things are no longer associated with the session
# (We can keep the information about something being added to and removed from a session in the document's history)
def get_material(self, material_type, only_one):

View file

@ -21,7 +21,7 @@ from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden, Http404
from django.contrib import messages
from django.core.urlresolvers import reverse,reverse_lazy
from django.db.models import Min, Max
from django.db.models import Min, Max, Q
from django.conf import settings
from django.forms.models import modelform_factory, inlineformset_factory
from django.forms import ModelForm
@ -2026,12 +2026,12 @@ def proceedings(request, num=None):
now = datetime.date.today()
schedule = get_schedule(meeting, None)
sessions = Session.objects.filter(meeting__number=meeting.number, timeslotassignments__schedule=schedule).select_related()
plenaries = sessions.filter(name__icontains='plenary')
sessions = Session.objects.filter(meeting__number=meeting.number).filter(Q(timeslotassignments__schedule=schedule)|Q(status='notmeet')).select_related().order_by('-status_id')
plenaries = sessions.filter(name__icontains='plenary').exclude(status='notmeet')
ietf = sessions.filter(group__parent__type__slug = 'area').exclude(group__acronym='edu')
irtf = sessions.filter(group__parent__acronym = 'irtf')
training = sessions.filter(group__acronym__in=['edu','iaoc'], type_id__in=['session', 'other', ])
iab = sessions.filter(group__parent__acronym = 'iab')
training = sessions.filter(group__acronym__in=['edu','iaoc'], type_id__in=['session', 'other', ]).exclude(status='notmeet')
iab = sessions.filter(group__parent__acronym = 'iab').exclude(status='notmeet')
cache_version = Document.objects.filter(session__meeting__number=meeting.number).aggregate(Max('time'))["time__max"]
return render(request, "meeting/proceedings.html", {

View file

@ -69,26 +69,60 @@
<!-- Working groups -->
{% regroup ietf|dictsort:"group.parent.acronym" by group.parent.name as areas %}
{% for sessions in areas %}
<h2 class="anchor-target" id="{{sessions.list.0.group.parent.acronym}}">{{sessions.list.0.group.parent.acronym|upper}} <small>{{ sessions.grouper }}</small></h2>
<table class="table table-condensed table-striped tablesorter">
<thead>
<tr>
<th class="col-md-1">Group</th>
<th class="col-md-1">Artifacts</th>
<th class="col-md-2">Recordings</th>
<th class="col-md-4">Slides</th>
<th class="col-md-3">Drafts</th>
</tr>
</thead>
<tbody>
{% for session in sessions.list|dictsort:"group.acronym" %}
{% ifchanged session.group.acronym %}
{% include "meeting/group_proceedings.html" %}
{% endifchanged %}
{% endfor %}
</tbody>
</table>
{% for sessions in areas %}
<h2 class="anchor-target" id="{{sessions.list.0.group.parent.acronym}}">{{sessions.list.0.group.parent.acronym|upper}} <small>{{ sessions.grouper }}</small></h2>
{% regroup sessions.list by not_meeting as meet_or_not %}
{% for batch in meet_or_not %}
{% if not batch.grouper %}
<table class="table table-condensed table-striped tablesorter">
<thead>
<tr>
<th class="col-md-1">Group</th>
<th class="col-md-1">Artifacts</th>
<th class="col-md-2">Recordings</th>
<th class="col-md-4">Slides</th>
<th class="col-md-3">Drafts</th>
</tr>
</thead>
<tbody>
{% for session in batch.list|dictsort:"group.acronym" %}
{% ifchanged session.group.acronym %}
{% include "meeting/group_proceedings.html" %}
{% endifchanged %}
{% endfor %}
</tbody>
</table>
{% else %}
<p><small>{{sessions.grouper }} groups not meeting: </small>
{% for session in batch.list|dictsort:"group.acronym" %}
{% ifchanged session.group.acronym %}
<a href="{% url 'ietf.group.views.group_home' acronym=session.group.acronym %}">{{session.group.acronym}}</a>{% if not forloop.last %},{% endif %}
{% endifchanged %}
{% endfor %}
</p>
<table class="table table-condensed table-striped">
<thead>
<tr>
<th class="col-md-1">&nbsp;</th>
<th class="col-md-1">&nbsp;</th>
<th class="col-md-2">&nbsp;</th>
<th class="col-md-4">&nbsp;</th>
<th class="col-md-3">&nbsp;</th>
</tr>
</thead>
<tbody>
{% for session in batch.list|dictsort:"group.acronym" %}
{% ifchanged session.group.acronym %}
{% if session.sessionpresentation_set.exists %}
{% include "meeting/group_proceedings.html" %}
{% endif %}
{% endifchanged %}
{% endfor %}
</tbody>
</table>
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
<!-- Training Sessions -->