Update session purposes and group type -> purpose map to match notes page, change 'session' purpose to 'regular'

- Legacy-Id: 19433
This commit is contained in:
Jennifer Richards 2021-10-18 14:48:36 +00:00
parent 7a2530a0a6
commit 3be50d6e39
6 changed files with 22 additions and 17 deletions

View file

@ -6,12 +6,21 @@ from django.db import migrations
default_purposes = dict(
dir=['presentation', 'social', 'tutorial'],
ietf=['admin', 'presentation', 'social'],
nomcom=['closed', 'officehours'],
rg=['session'],
adhoc=['presentation'],
adm=['closed_meeting', 'officehours'],
ag=['regular'],
area=['regular'],
dir=['presentation', 'social', 'tutorial', 'regular'],
iab=['closed_meeting', 'regular'],
iabasg=['open_meeting', 'closed_meeting'],
ietf=['admin', 'plenary', 'presentation', 'social'],
nomcom=['closed_meeting', 'officehours'],
program=['regular', 'tutorial'],
rag=['regular'],
review=['open_meeting', 'social'],
rg=['regular'],
team=['coding', 'presentation', 'social', 'tutorial'],
wg=['session'],
wg=['regular'],
)

View file

@ -597,7 +597,7 @@ def edit_meeting_schedule(request, num=None, owner=None, name=None):
s.scheduling_label = "???"
s.purpose_label = None
if (s.purpose is None or s.purpose.slug == 'session') and s.group:
if (s.purpose is None or s.purpose.slug == 'regular') and s.group:
s.scheduling_label = s.group.acronym
s.purpose_label = 'BoF' if s.group.is_bof() else s.group.type.name
else:

View file

@ -10,14 +10,16 @@ def forward(apps, schema_editor):
TimeSlotTypeName = apps.get_model('name', 'TimeSlotTypeName')
for order, (slug, name, desc, tstypes) in enumerate((
('session', 'Session', 'Group session', ['regular']),
('regular', 'Regular', 'Regular group session', ['regular']),
('tutorial', 'Tutorial', 'Tutorial or training session', ['other']),
('officehours', 'Office hours', 'Office hours session', ['other']),
('coding', 'Coding', 'Coding session', ['other']),
('admin', 'Administrative', 'Meeting administration', ['other', 'reg']),
('social', 'Social', 'Social event or activity', ['other']),
('social', 'Social', 'Social event or activity', ['break', 'other']),
('plenary', 'Plenary', 'Plenary session', ['plenary']),
('presentation', 'Presentation', 'Presentation session', ['other', 'regular']),
('closed', 'Closed meeting', 'Closed meeting', ['other',]),
('open_meeting', 'Open meeting', 'Open meeting', ['other']),
('closed_meeting', 'Closed meeting', 'Closed meeting', ['other', 'regular']),
)):
# verify that we're not about to use an invalid purpose
for ts_type in tstypes:

View file

@ -9,7 +9,7 @@
<dl>
<dt>Length</dt><dd>{{ sess_form.cleaned_data.requested_duration.total_seconds|display_duration }}</dd>
{% if sess_form.cleaned_data.name %}<dt>Name</dt><dd>{{ sess_form.cleaned_data.name }}</dd>{% endif %}
{% if sess_form.cleaned_data.purpose.slug != 'session' %}
{% if sess_form.cleaned_data.purpose.slug != 'regular' %}
<dt>Purpose</dt>
<dd>
{{ sess_form.cleaned_data.purpose }}

View file

@ -195,12 +195,6 @@
{% endfor %}
</span>
<span class="timeslot-type-toggles">
{% for purpose in session_purposes %}
<label class="purpose-{{ purpose.slug }}"><input type="checkbox" checked value="{{ purpose.slug }}"> {{ purpose }}</label>
{% endfor %}
</span>
<span class="timeslot-group-toggles">
<button class="btn btn-default" data-toggle="modal" data-target="#timeslot-group-toggles-modal"><input type="checkbox" checked="checked" disabled> Timeslots</button>
</span>

View file

@ -1,5 +1,5 @@
<div id="session{{ session.pk }}"
class="session {% if not session.group.parent.scheduling_color %}untoggleable-by-parent{% endif %} {% if session.parent_acronym %}parent-{{ session.parent_acronym }} {% endif %}{% if session.purpose %}purpose-{{ session.purpose.slug }} {% else %} purpose-session {% endif %}{% if session.readonly %}readonly {% endif %}"
class="session {% if not session.group.parent.scheduling_color %}untoggleable-by-parent{% endif %} {% if session.parent_acronym %}parent-{{ session.parent_acronym }}{% endif %} purpose-{% firstof session.purpose.slug 'regular' %} {% if session.readonly %}readonly{% endif %}"
style="width:{{ session.layout_width }}em;"
data-duration="{{ session.requested_duration.total_seconds }}" {% if session.attendees != None %}
data-attendees="{{ session.attendees }}"{% endif %}