Get the leadership timeslots to show in the secr pages
- Legacy-Id: 8931
This commit is contained in:
parent
47901e8555
commit
3f6503722c
|
@ -180,6 +180,7 @@ class TimeSlotForm(forms.Form):
|
|||
class NonSessionForm(TimeSlotForm):
|
||||
short = forms.CharField(max_length=32,label='Short Name',help_text='Enter an abbreviated session name (used for material file names)',required=False)
|
||||
type = forms.ModelChoiceField(queryset=TimeSlotTypeName.objects.filter(slug__in=('other','reg','break','plenary')),empty_label=None)
|
||||
type = forms.ModelChoiceField(queryset=TimeSlotTypeName.objects.filter(used=True).exclude(slug__in=('session',)),empty_label=None)
|
||||
group = forms.ModelChoiceField(queryset=Group.objects.filter(acronym__in=('edu','ietf','iepg','tools','iesg','iab','iaoc')),help_text='Required for Session types: other, plenary',required=False)
|
||||
show_location = forms.BooleanField(required=False)
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ def build_nonsession(meeting,schedule):
|
|||
system = Person.objects.get(name='(system)')
|
||||
secretariat = Group.objects.get(acronym='secretariat')
|
||||
|
||||
for slot in TimeSlot.objects.filter(meeting=last_meeting,type__in=('break','reg','other','plenary')):
|
||||
for slot in TimeSlot.objects.filter(meeting=last_meeting,type__in=('break','reg','other','plenary','lead')):
|
||||
new_time = slot.time + delta
|
||||
session = None
|
||||
# create Session object for Tutorials to hold materials
|
||||
|
@ -128,7 +128,7 @@ def check_nonsession(meeting,schedule):
|
|||
Ensure non-session timeslots exist and have appropriate ScheduledSession objects
|
||||
for the specified schedule.
|
||||
'''
|
||||
slots = TimeSlot.objects.filter(meeting=meeting,type__in=('break','reg','other','plenary'))
|
||||
slots = TimeSlot.objects.filter(meeting=meeting,type__in=('break','reg','other','plenary','lead'))
|
||||
if not slots:
|
||||
build_nonsession(meeting,schedule)
|
||||
return None
|
||||
|
@ -435,7 +435,7 @@ def non_session(request, meeting_id, schedule_name):
|
|||
|
||||
check_nonsession(meeting,schedule)
|
||||
|
||||
slots = TimeSlot.objects.filter(meeting=meeting,type__in=('break','reg','other','plenary')).order_by('-type__name','time')
|
||||
slots = TimeSlot.objects.filter(meeting=meeting,type__in=('break','reg','other','plenary','lead')).order_by('-type__name','time')
|
||||
|
||||
if request.method == 'POST':
|
||||
form = NonSessionForm(request.POST)
|
||||
|
@ -458,7 +458,7 @@ def non_session(request, meeting_id, schedule_name):
|
|||
duration=duration,
|
||||
show_location=form.cleaned_data['show_location'])
|
||||
|
||||
if timeslot.type.slug not in ('other','plenary'):
|
||||
if timeslot.type.slug not in ('other','plenary','lead'):
|
||||
group = Group.objects.get(acronym='secretariat')
|
||||
|
||||
# create associated Session object
|
||||
|
@ -501,7 +501,7 @@ def non_session_delete(request, meeting_id, schedule_name, slot_id):
|
|||
meeting = get_object_or_404(Meeting, number=meeting_id)
|
||||
# schedule = get_object_or_404(Schedule, meeting=meeting, name=schedule_name)
|
||||
slot = get_object_or_404(TimeSlot, id=slot_id)
|
||||
if slot.type_id in ('other','plenary'):
|
||||
if slot.type_id in ('other','plenary','lead'):
|
||||
scheduledsessions = slot.scheduledsession_set.filter(schedule__meeting=meeting)
|
||||
session_objects = [ x.session for x in scheduledsessions ]
|
||||
for session in session_objects:
|
||||
|
|
Loading…
Reference in a new issue