symposion_app/pinaxcon/templates/symposion/schedule/schedule_conference.html
Joel Addison 734a0b713d Improve printed schedule
Show each day on a new page when printed.
Hide elements that do not assist with printed copy (current time, etc).
2021-01-24 12:03:00 +10:00

92 lines
3.4 KiB
HTML

{% extends "symposion/schedule/base.html" %}
{% load i18n %}
{% load cache %}
{% load lca2018_tags %}
{% block head_title %}Conference Schedule{% endblock %}
{% block page_title %}Conference Schedule{% endblock %}
{% block content %}
<div class="float-right d-print-none">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="downloadMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Download
</button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="downloadMenuButton">
<h6 class="dropdown-header">Format</h6>
<a class="dropdown-item" href="{% url "ical_feed" %}">iCal (ICS)</a>
<a class="dropdown-item" href="{% url "schedule_json" %}">JSON</a>
</div>
</div>
</div>
<div class="row d-print-none">
<div class="col">
<ul class="nav nav-pills flex-column flex-md-row" id="schedule-tabs" role="tablist">
{% for section in sections %}
{% for timetable in section.days %}
<li class="nav-item flex-md-fill text-md-center">
{% include "symposion/schedule/_schedule_nav_link.html" with active=forloop.first label=timetable.day.date|date:"l" date=timetable.day.date|date:"Y-m-d" %}
</li>
{% endfor %}
{% endfor %}
</ul>
</div>
</div>
<div class="tab-content d-print-block my-3" id="schedule-tabContent">
{% for section in sections %}
{% cache 600 "schedule-table" section.schedule.section %}
{% for timetable in section.days %}
<div class="row tab-pane fade {% if forloop.first %}show active{% endif %} d-print-block" id="{{ timetable.day.date|date:"l"|lower}}" role="tabpanel" aria-labelledby="schedule_day_{{ timetable.day.date|date:"l"|lower}}-tab">
<div class="col-12">
<h2 class="my-4">
{{ section.schedule.section.name }}
<span class="clearfix d-sm-block d-md-none"></span>
<small class="text-muted">{{ timetable.day.date|date:"l" }}, {{ timetable.day.date }}</small>
</h2>
<p class="timezone-info small">Conference times are in {{ settings.LCA_START|date:'T' }} (UTC{{ settings.LCA_START|date:'O' }}). <span class="d-print-none">Current talks will be highlighted.</span></p>
<div class="table-responsive d-none d-md-block">
{% include "symposion/schedule/_grid.html" %}
</div>
<div class="mobile-schedule d-sm-block d-md-none">
{% include "symposion/schedule/_mobile.html" %}
</div>
</div>
</div>
{% endfor %}
{% endcache %}
{% endfor %}
</div>
{% endblock %}
{% block scripts_extra %}
<script type="text/javascript">
window.addEventListener("hashchange", function(event) {
var fragment = window.location.hash.toLowerCase().substring(1);
if (!fragment) {
return;
};
var tab_id = "#schedule_day_" + fragment + "-tab";
$(tab_id).tab('show');
}, false);
$(".nav-item").click(function(event) {
// This updates the window location fragment so that
// the URL bar is updated, and so that when you go
// back, it loads the right page.
// len("schedule_day_") == 13
var day_tab = event.target.id.substring(13);
var day = day_tab.substr(0, day_tab.length-4);
if (history.pushState) {
history.pushState(null, null, "#" + day);
}
});
</script>
{{ block.super }}
{% endblock %}