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.
This commit is contained in:
		
							parent
							
								
									bc6e0d7675
								
							
						
					
					
						commit
						0420fa6b1a
					
				
					 2 changed files with 12 additions and 2 deletions
				
			
		| 
						 | 
					@ -31,12 +31,17 @@
 | 
				
			||||||
      <td class="slot slot-{{ slot.kind.label }}" colspan="{{ slot.colspan }}" rowspan="{{ slot.rowspan }}">
 | 
					      <td class="slot slot-{{ slot.kind.label }}" colspan="{{ slot.colspan }}" rowspan="{{ slot.rowspan }}">
 | 
				
			||||||
        {% with slot.kind.label.lower as label %}
 | 
					        {% with slot.kind.label.lower as label %}
 | 
				
			||||||
        {% if label == "talk" or label == "tutorial" %}
 | 
					        {% 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>
 | 
					          <p>
 | 
				
			||||||
            <a href="{% url "schedule_presentation_detail" slot.content.pk %}">{{ slot.content.title }}</a>
 | 
					            <a href="{% url "schedule_presentation_detail" slot.content.pk %}">{{ slot.content.title }}</a>
 | 
				
			||||||
            <br />
 | 
					            <br />
 | 
				
			||||||
            {{ slot.content.speakers|join:", " }}
 | 
					            {{ slot.content.speakers|join:", " }}
 | 
				
			||||||
          </p>
 | 
					          </p>
 | 
				
			||||||
 | 
					          {% if slot.content.unpublish %}
 | 
				
			||||||
 | 
					          <span class="badge badge-pill badge-warning">Unpublished</span>
 | 
				
			||||||
 | 
					          {% endif %}
 | 
				
			||||||
          {% flag "session_chair" %}
 | 
					          {% flag "session_chair" %}
 | 
				
			||||||
          {% if slot.sessions and not edit_schedule %}
 | 
					          {% if slot.sessions and not edit_schedule %}
 | 
				
			||||||
          <div>
 | 
					          <div>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,12 +13,17 @@
 | 
				
			||||||
  {% endif %}
 | 
					  {% endif %}
 | 
				
			||||||
  {% with slot.kind.label.lower as label %}
 | 
					  {% with slot.kind.label.lower as label %}
 | 
				
			||||||
  {% if label == "talk" or label == "tutorial" %}
 | 
					  {% 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>
 | 
					    <p>
 | 
				
			||||||
      <a href="{% url "schedule_presentation_detail" slot.content.pk %}">{{ slot.content.title }}</a>
 | 
					      <a href="{% url "schedule_presentation_detail" slot.content.pk %}">{{ slot.content.title }}</a>
 | 
				
			||||||
      <br>
 | 
					      <br>
 | 
				
			||||||
      {{ slot.content.speakers|join:", "}}
 | 
					      {{ slot.content.speakers|join:", "}}
 | 
				
			||||||
    </p>
 | 
					    </p>
 | 
				
			||||||
 | 
					    {% if slot.content.unpublish %}
 | 
				
			||||||
 | 
					    <span class="badge badge-pill badge-warning">Unpublished</span>
 | 
				
			||||||
 | 
					    {% endif %}
 | 
				
			||||||
    {% endif %}
 | 
					    {% endif %}
 | 
				
			||||||
  {% elif label == "shortbreak" %}
 | 
					  {% elif label == "shortbreak" %}
 | 
				
			||||||
  {% else %}
 | 
					  {% else %}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue