Changeset - 0420fa6b1aa5
[Not reviewed]
0 2 0
Joel Addison - 4 years ago 2019-12-17 12:40:21
joel@addison.net.au
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.
2 files changed with 12 insertions and 2 deletions:
0 comments (0 inline, 0 general)
pinaxcon/templates/symposion/schedule/_grid.html
Show inline comments
...
 
@@ -28,18 +28,23 @@
 
    <tr class="calendar-row">
 
      <th scope="row" class="time"><p>{{ row.time|date:"h:iA" }}</p></th>
 
      {% for slot in row.slots %}
 
      <td class="slot slot-{{ slot.kind.label }}" colspan="{{ slot.colspan }}" rowspan="{{ slot.rowspan }}">
 
        {% 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 %}
 
          <p><em>To be announced</em></p>
 
          {% elif slot.content %}
 
          <p>
 
            <a href="{% url "schedule_presentation_detail" slot.content.pk %}">{{ slot.content.title }}</a>
 
            <br />
 
            {{ slot.content.speakers|join:", " }}
 
          </p>
 
          {% if slot.content.unpublish %}
 
          <span class="badge badge-pill badge-warning">Unpublished</span>
 
          {% endif %}
 
          {% flag "session_chair" %}
 
          {% if slot.sessions and not edit_schedule %}
 
          <div>
 
            {% for session in slot.sessions.all %}
 
            <em>Session chair:
 
              {% if not session.chair %}
pinaxcon/templates/symposion/schedule/_mobile.html
Show inline comments
...
 
@@ -10,18 +10,23 @@
 
<div class="mobile-slot my-3">
 
  {% if forloop.first %}
 
    <h3>{{ row.time|date:"h:iA" }}&ndash;{{ row.end|date:"h:iA" }}</h3>
 
  {% 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 %}
 
    <p><em>To be announced</em></p>
 
    {% elif slot.content %}
 
    <p>
 
      <a href="{% url "schedule_presentation_detail" slot.content.pk %}">{{ slot.content.title }}</a>
 
      <br>
 
      {{ slot.content.speakers|join:", "}}
 
    </p>
 
    {% if slot.content.unpublish %}
 
    <span class="badge badge-pill badge-warning">Unpublished</span>
 
    {% endif %}
 
    {% endif %}
 
  {% elif label == "shortbreak" %}
 
  {% else %}
 
    {% if slot.content_override %}
 
      {{ slot.content_override_html|safe }}
 
    {% else %}
0 comments (0 inline, 0 general)