datatracker/ietf/templates/meeting/floor-plan.html

109 lines
3.7 KiB
HTML

{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters %}
{% load staticfiles %}
{% block title %}
IETF {{ schedule.meeting.number }} meeting agenda
{% if "-utc" in request.path %}
(UTC)
{% endif %}
{% endblock %}
{% block morecss %}
.floor-plan {
position: relative;
top: 0;
left: 0;
}
.floor-plan img {
padding: 0;
}
.rooms a {
text-decoration: underline;
}
{% endblock %}
{% block bodyAttrs %}onload="automaticarrow(); checkParams();" data-spy="scroll" data-target="#affix"{% endblock %}
{% block content %}
{% origin %}
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12" >
{% include "meeting/meeting_heading.html" with meeting=schedule.meeting selected="floor-plan" title_extra="Floor Plan" %}
</div>
</div>
<div class="row">
<div class="col-md-10">
{% for floor in floors %}
<div class="anchor-target" id="{{floor.name|slugify}}"></div>
<h3>{{ floor.name }}</h3>
<div class="floor-plan">
<img id="{{floor.name|slugify}}-image" class="col-md-12 col-sm-12 col-xs-12" src="{{ floor.image.url }}" >
<!-- We need as many of these as we can have individual rooms combining into one -->
<div id="{{floor.name|slugify}}-arrowdiv0" style="position: absolute; left: 0; top: 67.5px; visibility: hidden;"><img id="arrow" src="{% static 'ietf/images/arrow-ani.gif' %}"></div>
<div id="{{floor.name|slugify}}-arrowdiv1" style="position: absolute; left: 0; top: 67.5px; visibility: hidden;"><img id="arrow" src="{% static 'ietf/images/arrow-ani.gif' %}"></div>
<div id="{{floor.name|slugify}}-arrowdiv2" style="position: absolute; left: 0; top: 67.5px; visibility: hidden;"><img id="arrow" src="{% static 'ietf/images/arrow-ani.gif' %}"></div>
<div id="{{floor.name|slugify}}-arrowdiv3" style="position: absolute; left: 0; top: 67.5px; visibility: hidden;"><img id="arrow" src="{% static 'ietf/images/arrow-ani.gif' %}"></div>
</div>
<div class="rooms">
{% for room in floor.room_set.all %}
<a href="javascript: setarrow('{{room.name|slugify}}')">{{ room.name|nbsp }}</a>
{% endfor %}
</div>
<div class="row"></div>
{% endfor %}
</div>
<div class="col-md-2 hidden-print bs-docs-sidebar" id="affix">
<ul class="nav nav-pills nav-stacked small" data-spy="affix">
{% for floor in floors %}
<li><a href="#{{floor.name|slugify}}">{{ floor.name }}</a></li>
{% endfor %}
</ul>
</div>
</div>
{% endblock %}
{% block js %}
{% with meeting=schedule.meeting %}
<script src="{% static 'ietf/js/room_params.js' %}"></script>
<script>
// These must match the 'arrowdiv' divs above
var arrowsuffixlist = [ '', '1', '2', '3' ];
function roommap(nm)
{
var c = findroom(nm);
if (c) return nm;
var m = suffixmap(nm);
// alert("m=" + m);
return m;
}
function findroom(nm)
{
var left = 0, top = 0, right = 0, bottom = 0, floor="", width=0;
if (0) { }
{% for room in meeting.room_set.all %}
else if (nm == '{{room.name|slugify}}') { left = {{room.left}}; top = {{room.top}}; right = {{room.right}}; bottom = {{room.bottom}}; floor='{{room.floorplan.name|slugify}}'; width={{room.floorplan.image.width}}; }{% endfor %}
{% for room in meeting.room_set.all %}{% if room.functional_display_name %}
else if (nm == '{{room.functional_name|slugify}}') { left = {{room.left}}; top = {{room.top}}; right = {{room.right}}; bottom = {{room.bottom}}; floor='{{room.floorplan.name|slugify}}'; width={{room.floorplan.image.width}}; }{% endif %}{% endfor %}
else return null;
// alert("nm=" + nm + ",left=" + left + ",top=" + top + ",r=" + right + ",b=" + bottom);
return [left, top, right, bottom, floor, width];
}
</script>
{% endwith %}
{% endblock %}