diff --git a/gracedb/events/views.py b/gracedb/events/views.py index bc3ceab2bf75d8c68880f9c7278ad34cf2c5e8d2..338d5d1e8dcb237226fe7a61cf4de861910edf11 100644 --- a/gracedb/events/views.py +++ b/gracedb/events/views.py @@ -119,10 +119,10 @@ def index(request): context['new_signoff_graceids'] = [e.graceid for e in new_events] context['older_signoff_graceids'] = [e.graceid for e in older_events] - # TODO: ensure not test or MDC types once those are implemented # Superevent signoffs context['signoff_superevent_ids'] = [s.superevent_id for s in - Superevent.objects.filter(labelling__label__name=label_name)] + Superevent.objects.filter(labelling__label__name=label_name, + category=Superevent.SUPEREVENT_CATEGORY_PRODUCTION)] recent_events = '' if request.user and not is_external(request.user) and settings.SHOW_RECENT_EVENTS_ON_HOME: diff --git a/gracedb/templates/gracedb/index.html b/gracedb/templates/gracedb/index.html index 3fa7618f6cf83a9392d4d5b1048af73bee1d8798..e3d4bef110dd51a371c918cf44f2dce4da5a31cc 100644 --- a/gracedb/templates/gracedb/index.html +++ b/gracedb/templates/gracedb/index.html @@ -91,10 +91,11 @@ follow-ups. </p> <!--XXX Infrastructure for human signoffs. Hopefully this will not be permanent. --> {% if signoff_authorized %} - {% if new_signoff_graceids|length or older_signoff_graceids|length %} + {% if signoff_superevent_ids|length or new_signoff_graceids|length or older_signoff_graceids|length %} <div class="signoff-area"> - <h2>Attention {{signoff_instrument}} Operator</h2> - <br /> + <h2>Attention {{signoff_instrument}} Operator</h2> + <br /> + {% if signoff_superevent_ids|length %} <h3>The following superevents require your signoff:</h3> {% if signoff_superevent_ids|length %} <ul> @@ -103,6 +104,8 @@ follow-ups. </p> {% endfor %} </ul> {% endif %} + {% endif %} + {% if new_signoff_graceids|length or older_signoff_graceids|length %} <h3>The following events require your sign-off:</h3> {% if new_signoff_graceids|length %} <p>Events submitted within the last 24 hours:</p> @@ -120,7 +123,8 @@ follow-ups. </p> {% endfor %} </ul> {% endif %} - <p>Please click on the link(s) above and use the form at the top of the page.</p> + {% endif %} + <p>Please click on the link(s) above and use the form at the top of the page.</p> </div> {% endif %} {% endif %}