{# Shared quarantine banner partial. Surfaces submission status (under review / quarantined / hidden / override-applied) to the entity owner + admins. Self-guarded so it's safe to {% include %} from any detail page — renders nothing when the entity is approved or the viewer isn't owner/admin. Required scope: entity — store_entities row (must carry visibility_status, visibility_status; entity.id surfaces in admin detail link) quarantine_sub — latest store_submissions row for entity, or None is_owner — bool, viewer == entity.owner_user_id is_admin — bool, viewer is in Admin group Mirror of the version that previously lived in store_detail.html. Wording stays consistent with the per-status messaging the user approved earlier — only the rendering location changed. #} {% if entity.visibility_status != 'approved' and (is_owner or is_admin) %} {% set sub = quarantine_sub %} {% set st = sub.status if sub else entity.visibility_status %} {% set bcls = 'pending' if st in ['pending_inline','pending_llm','pending'] else ('blocked' if st in ['blocked_inline','blocked_llm','review_error'] else 'hidden') %}
{# Auto-refresh while the verdict is pending. Banner copy promises "page refreshes automatically when the verdict lands" — this is what does it. Polls the owner-accessible flea detail endpoint and reloads when EITHER visibility flips off 'pending' OR the submission verdict flips off 'pending_inline' / 'pending_llm'. Both signals are needed because `blocked_llm` keeps the entity at `visibility_status='pending'` (admin can override → publish), so visibility alone doesn't fire. Only emits the script while the verdict itself is still pending; terminal states render the final banner copy and don't need to reload. #} {% if quarantine_sub and quarantine_sub.status in ['pending_inline', 'pending_llm'] %} {% endif %} {% endif %}