diff --git a/uber/menu.py b/uber/menu.py index 48a38becc..ad70e5caf 100644 --- a/uber/menu.py +++ b/uber/menu.py @@ -125,6 +125,7 @@ def get_external_schedule_menu_name(): MenuItem(name='Schedule', submenu=[ MenuItem(name=get_external_schedule_menu_name(), href='../schedule/'), MenuItem(name='Edit Schedule', href='../schedule/edit'), + MenuItem(name='Schedule Changes', href='../schedule_reports/'), ]), MenuItem(name='Statistics', submenu=[ diff --git a/uber/models/mits.py b/uber/models/mits.py index 171c3d1b7..67b3f7fe6 100644 --- a/uber/models/mits.py +++ b/uber/models/mits.py @@ -221,18 +221,8 @@ def guidebook_images(self): if not self.pictures: return ['', ''], ['', ''] - header = None - thumbnail = None - for image in self.pictures: - if image.is_header and not header: - header = image - if image.is_thumbnail and not thumbnail: - thumbnail = image - - if not header: - header = self.pictures[0] - if not thumbnail: - thumbnail = self.pictures[1] if len(self.pictures) > 1 else self.pictures[0] + header = self.guidebook_header + thumbnail = self.guidebook_thumbnail prepend = sluggify(self.name) + '_' diff --git a/uber/models/mivs.py b/uber/models/mivs.py index 2249f47d4..a080e173f 100644 --- a/uber/models/mivs.py +++ b/uber/models/mivs.py @@ -513,12 +513,6 @@ def guidebook_images(self): header = self.guidebook_header thumbnail = self.guidebook_thumbnail - - if not header: - header = self.images[0] - if not thumbnail: - thumbnail = self.images[1] if len(self.images) > 1 else self.images[0] - prepend = sluggify(self.title) + '_' return [prepend + header.filename, prepend + thumbnail.filename], [header, thumbnail] diff --git a/uber/tasks/panels.py b/uber/tasks/panels.py index 70724a35b..110f21325 100644 --- a/uber/tasks/panels.py +++ b/uber/tasks/panels.py @@ -45,7 +45,7 @@ def check_stale_guidebook_models(): body = render('emails/guidebook_updates.txt', { 'stale_models': stale_models, }, encoding=None) - send_email.delay(c.REPORTS_EMAIL, "guidebook@magfest.org", + send_email.delay(c.REPORTS_EMAIL, "gb-ops@magfest.org", f"Guidebook Updates: {localized_now().strftime("%A %-I:%M %p")}", body, ident="guidebook_updates" ) diff --git a/uber/templates/schedule_reports/index.html b/uber/templates/schedule_reports/index.html index c13235c68..fd1f56662 100644 --- a/uber/templates/schedule_reports/index.html +++ b/uber/templates/schedule_reports/index.html @@ -180,9 +180,12 @@

Guidebook Exports and Updates -- {{ now|datetime_local("%m/%d/%Y, %-I:%M%p") {{ current_data[key + 'time'] }} {% if current_data[key + 'time'] != synced_data[key + 'time'] %}{% endif %} {% else %} - {% if current_data[key] != synced_data[key] %}{% endif %} - {{ current_data[key] }} - {% if current_data[key] != synced_data[key] %}{% endif %} + {% if current_data[key] != synced_data[key] %} + {{ current_data[key]|linebreaksbr }} + {% if key == 'name' and synced_data[key] %}
(Previously: {{ synced_data[key]|linebreaksbr }}){% endif %} + {% else %} + {{ current_data[key]|linebreaksbr }} + {% endif %} {% endif %} {% endfor %} @@ -190,7 +193,9 @@

Guidebook Exports and Updates -- {{ now|datetime_local("%m/%d/%Y, %-I:%M%p") {{ result.last_synced_dt('guidebook')|datetime_local("%-I:%M %p %b %-d, %Y") if result.last_synced['guidebook'] else "Never" }}
+ {% if c.HAS_SCHEDULE_ACCESS %} View + {% endif %}
{{ csrf_token() }} @@ -248,9 +253,10 @@

Guidebook Exports and Updates -- {{ now|datetime_local("%m/%d/%Y, %-I:%M%p") {% endif %} {% else %} {% if current_data[key] != synced_data[key] %} - {{ current_data[key] }} + {{ current_data[key]|linebreaksbr }} + {% if key == 'name' and synced_data[key] %}
(Previously: {{ synced_data[key]|linebreaksbr }}){% endif %} {% else %} - {{ current_data[key] }} + {{ current_data[key]|linebreaksbr }} {% endif %} {% endif %} @@ -259,7 +265,9 @@

Guidebook Exports and Updates -- {{ now|datetime_local("%m/%d/%Y, %-I:%M%p") {{ result.last_synced_dt('guidebook')|datetime_local("%-I:%M %p %b %-d, %Y") if result.last_synced['guidebook'] else "Never" }}
- View + {% if result.guidebook_edit_link.split('/')[1] in (c.GETTABLE_SITE_PAGES[0] + c.ADMIN_ACCESS_SET|list) %} + View + {% endif %} {{ csrf_token() }}