diff --git a/uber/models/panels.py b/uber/models/panels.py index 84e5d2591..520af4cb2 100644 --- a/uber/models/panels.py +++ b/uber/models/panels.py @@ -158,6 +158,11 @@ def submitter(self): return a return None + @property + def group(self): + if self.submitter and self.submitter.attendee: + return self.submitter.attendee.group + @property def other_panelists(self): return [a for a in self.applicants if not a.submitter] diff --git a/uber/site_sections/panels.py b/uber/site_sections/panels.py index 780a286f0..de4b11292 100644 --- a/uber/site_sections/panels.py +++ b/uber/site_sections/panels.py @@ -99,7 +99,7 @@ def index(self, session, message='', **params): 'verify_unavailable': params.get('verify_unavailable') } - def guest(self, session, poc_id, return_to='', message='', **params): + def guest(self, session, attendee_id, return_to='', message='', **params): """ In some cases, we want pre-existing attendees (e.g., guests) to submit panel ideas. This submission form bypasses the need to enter in one's personal and contact info @@ -109,8 +109,7 @@ def guest(self, session, poc_id, return_to='', message='', **params): app = session.panel_application( params, checkgroups=PanelApplication.all_checkgroups, restricted=True, ignore_csrf=True) - app.poc_id = poc_id - attendee = session.attendee(id=poc_id) + attendee = session.attendee(id=attendee_id) if attendee.badge_type != c.GUEST_BADGE: add_opt(attendee.ribbon_ints, c.PANELIST_RIBBON) panelist = PanelApplicant( @@ -124,7 +123,7 @@ def guest(self, session, poc_id, return_to='', message='', **params): ) other_panelists = compile_other_panelists_from_params(session, app, **params) go_to = return_to if 'ignore_return_to' not in params and return_to \ - else 'guest?poc_id=' + poc_id + '&return_to=' + return_to + else 'guest?attendee_id=' + attendee_id + '&return_to=' + return_to if cherrypy.request.method == 'POST': message = process_panel_app(session, app, panelist, other_panelists, **params) @@ -135,7 +134,7 @@ def guest(self, session, poc_id, return_to='', message='', **params): 'app': app, 'message': message, 'attendee': attendee, - 'poc_id': poc_id, + 'attendee_id': attendee_id, 'other_panelists': other_panelists, 'return_to': return_to } diff --git a/uber/templates/guest_checklist/band_panel_deadline.html b/uber/templates/guest_checklist/band_panel_deadline.html index 4104d21cf..cada19a7e 100644 --- a/uber/templates/guest_checklist/band_panel_deadline.html +++ b/uber/templates/guest_checklist/band_panel_deadline.html @@ -13,7 +13,7 @@ {% endif %} {% endblock %} \ No newline at end of file diff --git a/uber/templates/guest_checklist/guest_panel_deadline.html b/uber/templates/guest_checklist/guest_panel_deadline.html index 821cb9e66..188576c72 100644 --- a/uber/templates/guest_checklist/guest_panel_deadline.html +++ b/uber/templates/guest_checklist/guest_panel_deadline.html @@ -14,7 +14,7 @@ {% endif %} {% endblock %} \ No newline at end of file diff --git a/uber/templates/guest_checklist/panel_deadline.html b/uber/templates/guest_checklist/panel_deadline.html index 18e17d400..6942c2685 100644 --- a/uber/templates/guest_checklist/panel_deadline.html +++ b/uber/templates/guest_checklist/panel_deadline.html @@ -18,7 +18,7 @@ {% endif %} {% endblock %} diff --git a/uber/templates/panels/guest.html b/uber/templates/panels/guest.html index 6ffcb7631..36dcdfc51 100644 --- a/uber/templates/panels/guest.html +++ b/uber/templates/panels/guest.html @@ -21,7 +21,7 @@ {% endif %}
- +

Panel Information

diff --git a/uber/templates/panels_admin/index.html b/uber/templates/panels_admin/index.html index 29bb40bf0..eca303f68 100644 --- a/uber/templates/panels_admin/index.html +++ b/uber/templates/panels_admin/index.html @@ -45,9 +45,9 @@

{{ app.poc.full_name }} {% endif %} - {% if app.poc and app.poc.guest_group %}{{ app.poc.guest_group.group_type_label }} "{{ app.poc.group|form_link }}"{% else %}No{% endif %} + {% if app.submitter and app.group.guest %}{{ app.group.guest.group_type_label }} "{{ app.group|form_link }}"{% else %}No{% endif %} {{ app.tabletop|yesno("Yes,No") }} - {% if c.PANEL_RATING_OPTS|length > 1 %}{{ app.rating }}{% endif %} + {% if c.PANEL_RATING_OPTS|length > 1 %}{{ app.rating_label }}{% endif %} {% if c.PANEL_CONTENT_OPTS|length > 1 %}{{ "N/A" if app.magscouts_opt_in == c.NO_CHOICE else app.magscouts_opt_in_label }}{% endif %} {% endfor %}