87 lines
5.1 KiB
HTML
87 lines
5.1 KiB
HTML
{% extends "base.html" %}
|
|
{# Copyright The IETF Trust 2015, All Rights Reserved #}
|
|
{% load origin %}
|
|
{% load ietf_filters %}
|
|
{% load textfilters %}
|
|
{% load static %}
|
|
{% block title %}
|
|
IETF {{ meeting.number }} meeting agenda
|
|
{% if "-utc" in request.path %}(UTC){% endif %}
|
|
{% endblock %}
|
|
{% block bodyAttrs %}onload="draw_calendar();" onresize="draw_calendar();"{% endblock %}
|
|
{% block content %}
|
|
{% origin %}
|
|
{# FIXME: patched this for some minimal functionality, this code needs to be replaced, ideally with fullcalendar #}
|
|
<div id="mtgheader">
|
|
{% include "meeting/meeting_heading.html" with updated=schedule.meeting.updated selected="room-view" title_extra="Room Grid" %}
|
|
</div>
|
|
<div id="daycontainer" role="tabpanel">
|
|
<ul id="daytabs" class="nav nav-tabs my-3" role="tablist">
|
|
{% for day in days %}
|
|
<li class="nav-item" role="presentation">
|
|
<button data-bs-target="#day{{ forloop.counter0 }}"
|
|
id="day{{ forloop.counter0 }}-tab"
|
|
role="tab" type="button"
|
|
class="nav-link {% if forloop.first %}active{% endif %}"
|
|
data-bs-toggle="tab"
|
|
aria-controls="day{{ forloop.counter0 }}">
|
|
{{ day|date:"D, M d" }}
|
|
</button>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<div class="tab-content">
|
|
{% for day in days %}
|
|
<div role="tabpanel"
|
|
class="tab-pane{% if forloop.first %} active{% endif %}"
|
|
id="day{{ forloop.counter0 }}">
|
|
Error loading calendar for {{ day|date:"D, M d" }}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
{% block js %}
|
|
<script>
|
|
{% autoescape off %}
|
|
var room_names = [{% for room in rooms %}"{{room.name}}"{% if not forloop.last %},{% endif %}{% endfor %}];
|
|
var room_functional_names = [{% for room in rooms %}"{{room.functional_name}}"{% if not forloop.last %},{% endif %}{% endfor %}];
|
|
var room_typelabels = [{% for room in rooms %}"{% for type in room.session_types.all %}{{type.name}}{% if not forloop.last %},{% endif %}{% endfor %}"{% if not forloop.last %},{% endif %}{% endfor %}];
|
|
var num_days = {{days|length}};
|
|
var rooms_count = {{ rooms.count }};
|
|
|
|
|
|
var items = new Array();
|
|
|
|
{% for slot in unavailable %}
|
|
if (room_names.indexOf("{{slot.get_hidden_location}}") >= 0 )
|
|
{
|
|
items.push({room_index:room_names.indexOf("{{slot.get_hidden_location}}"),day:{{slot.day}}, delta_from_beginning:{{slot.delta_from_beginning}},time:"{{slot.time|date:"Hi"}}-{{slot.end_time|date:"Hi"}}", verbose_time:"{{slot.time|date:"D, M d Hi"}}-{{slot.end_time|date:"Hi"}}",duration:{{slot.duration.total_seconds}}, type:"{{slot.type}}", name:"Unavailable", dayname:"{{ slot.time|date:"l"|upper }}, {{ slot.time|date:"F j, Y" }}" });
|
|
}
|
|
{% endfor %}
|
|
{% for ss in assignments %}
|
|
if (room_names.indexOf("{{ss.timeslot.get_hidden_location}}") >= 0 )
|
|
{
|
|
items.push({room_index:room_names.indexOf("{{ss.timeslot.get_hidden_location}}"),day:{{ss.day}}, delta_from_beginning:{{ss.delta_from_beginning}},time:"{{ss.timeslot.time|date:"Hi"}}-{{ss.timeslot.end_time|date:"Hi"}}", verbose_time:"{{ss.timeslot.time|date:"D, M d Hi"}}-{{ss.timeslot.end_time|date:"Hi"}}",duration:{{ss.timeslot.duration.total_seconds}}, type:"{{ss.slot_type}}", {% if ss.session.name %}name:"{{ss.session.name|escapejs}}",{% if ss.session.group.acronym %} wg:"{{ss.session.group.acronym}}",{%endif%}{% else %}{% if ss.slot_type.name == "Break" %}name:"{{ss.timeslot.name|escapejs}}", area:"break", wg:"break",{% elif ss.slot_type.slug == "unavail" %}name:"Unavailable",{% else %}name:"{{ss.session.group.name|escapejs}}{%if ss.session.group.state.name == "BOF"%} BOF{%endif%}",wg:"{{ss.session.group.acronym}}",state:"{{ss.session.group.state}}",area:"{{ss.session.group.parent.acronym}}",{% endif %}{% endif %} dayname:"{{ ss.timeslot.time|date:"l"|upper }}, {{ ss.timeslot.time|date:"F j, Y" }}"{% if ss.session.agenda %}, agenda:"{{ss.session.agenda.get_href}}"{% endif %}, from_base_schedule: {% if ss.schedule_id != meeting.schedule_id %}true{% else %}false{% endif %} });
|
|
}
|
|
{% endfor %}
|
|
{% endautoescape %}
|
|
</script>
|
|
<script src="{% static "ietf/js/room-view.js" %}"></script>
|
|
<script>
|
|
$(document)
|
|
.ready(function () {
|
|
// Javascript to enable link to tab
|
|
var url = document.location.toString();
|
|
if (url.match('#')) {
|
|
$('.nav-tabs button[data-bs-target="#' + url.split('#')[1] + '"]')
|
|
.tab('show');
|
|
}
|
|
// Change hash for page-reload
|
|
$('.nav-tabs button')
|
|
.on('shown.bs.tab', function (e) {
|
|
history.replaceState(null, null, e.currentTarget.dataset.bsTarget);
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %} |