From 0420fa6b1aa521c159de14b97d301a0a56bc22f9 Mon Sep 17 00:00:00 2001 From: Joel Addison Date: Tue, 17 Dec 2019 22:40:21 +1000 Subject: [PATCH] Hide unpublished talks from schedule Use the unpublish flag on presentations to hide them from the schedule grid/mobile view as well as the schedule lists. Show unpublished indicator for staff. --- pinaxcon/templates/symposion/schedule/_grid.html | 7 ++++++- pinaxcon/templates/symposion/schedule/_mobile.html | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pinaxcon/templates/symposion/schedule/_grid.html b/pinaxcon/templates/symposion/schedule/_grid.html index eeeb2b9d..c3d80dee 100644 --- a/pinaxcon/templates/symposion/schedule/_grid.html +++ b/pinaxcon/templates/symposion/schedule/_grid.html @@ -31,12 +31,17 @@ {% with slot.kind.label.lower as label %} {% if label == "talk" or label == "tutorial" %} - {% if slot.content %} + {% if slot.content.unpublish and not request.user.is_staff %} +

To be announced

+ {% elif slot.content %}

{{ slot.content.title }}
{{ slot.content.speakers|join:", " }}

+ {% if slot.content.unpublish %} + Unpublished + {% endif %} {% flag "session_chair" %} {% if slot.sessions and not edit_schedule %}
diff --git a/pinaxcon/templates/symposion/schedule/_mobile.html b/pinaxcon/templates/symposion/schedule/_mobile.html index 9e40c13c..c38ad6c4 100644 --- a/pinaxcon/templates/symposion/schedule/_mobile.html +++ b/pinaxcon/templates/symposion/schedule/_mobile.html @@ -13,12 +13,17 @@ {% endif %} {% with slot.kind.label.lower as label %} {% if label == "talk" or label == "tutorial" %} - {% if slot.content %} + {% if slot.content.unpublish and not request.user.is_staff %} +

To be announced

+ {% elif slot.content %}

{{ slot.content.title }}
{{ slot.content.speakers|join:", "}}

+ {% if slot.content.unpublish %} + Unpublished + {% endif %} {% endif %} {% elif label == "shortbreak" %} {% else %}