206 lines
8.2 KiB
HTML
206 lines
8.2 KiB
HTML
{% extends "ietf.html" %}
|
|
{% load ietf_filters %}
|
|
{# Copyright The IETF Trust 2007, All Rights Reserved #}
|
|
{% load humanize %}
|
|
|
|
{% block title %}IETF {{ meeting.number }} Meeting Agenda: Timeslot/Room Availability{% endblock %}
|
|
{% load agenda_custom_tags %}
|
|
{% block pagehead %}
|
|
<link rel='stylesheet' type='text/css' href='/facelift/css/agenda/jquery-ui-themes/jquery-ui-1.8.11.custom.css' />
|
|
<link rel='stylesheet' type='text/css' href='/facelift/css/agenda/base2.css' />
|
|
<link rel='stylesheet' type='text/css' href='/facelift/css/agenda/agenda.css' />
|
|
{% endblock pagehead %}
|
|
|
|
{% block js %}
|
|
<script type="text/javascript" src="/facelift/js/agenda/jquery-1.8.2.min.js"></script>
|
|
<script>
|
|
function getCookie(name) {
|
|
var cookieValue = null;
|
|
if (document.cookie && document.cookie != '') {
|
|
var cookies = document.cookie.split(';');
|
|
for (var i = 0; i < cookies.length; i++) {
|
|
var cookie = jQuery.trim(cookies[i]);
|
|
// Does this cookie string begin with the name we want?
|
|
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
|
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return cookieValue;
|
|
}
|
|
|
|
jQuery.ajaxSetup({
|
|
crossDomain: false, // obviates need for sameOrigin test
|
|
beforeSend: function(xhr, settings) {
|
|
if (!csrfSafeMethod(settings.type)) {
|
|
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
<script type='text/javascript' src='/facelift/js/agenda/jquery-ui-1.9.0.custom/jquery-ui.custom.js'></script>
|
|
<script type='text/javascript' src='/facelift/js/agenda/jquery-ui-1.9.0.custom/jquery.ui.widget.js'></script>
|
|
<script type='text/javascript' src='/facelift/js/agenda/jquery-ui-1.9.0.custom/jquery.ui.droppable.js'></script>
|
|
<script type='text/javascript' src='/facelift/js/agenda/jquery-ui-1.9.0.custom/jquery.ui.sortable.js'></script>
|
|
<script type='text/javascript' src='/facelift/js/agenda/jquery-ui-1.9.0.custom/jquery.ui.accordion.js'></script>
|
|
<script type='text/javascript' src='/facelift/js/agenda/jquery-ui-1.9.0.custom/jquery.ui.draggable.js'></script>
|
|
<script type='text/javascript' src='/facelift/js/agenda/jquery-ui-1.9.0.custom/jquery.ui.datetime.js'></script>
|
|
|
|
<!-- source (MIT License) http://momentjs.com/ https://github.com/moment/moment/ -->
|
|
<script type='text/javascript' src='/facelift/js/agenda/moment.min.js'></script>
|
|
|
|
<!-- source (MIT License) : https://github.com/trentrichardson/jQuery-Timepicker-Addon -->
|
|
<script type='text/javascript' src='/facelift/js/agenda/jquery-ui-timepicker/jquery-ui-timepicker-addon.js'></script>
|
|
<script type='text/javascript' src='/facelift/js/agenda/jquery-ui-timepicker/jquery-ui-sliderAccess.js.js'></script>
|
|
<link rel='stylesheet' type='text/css' href='/facelift/css/agenda/jquery-ui-timepicker-addon.css' />
|
|
|
|
<script type='text/javascript' src='/facelift/js/agenda/spin/dist/spin.min.js'></script>
|
|
<script type='text/javascript' src='/facelift/js/agenda/timeslot_edit.js'></script>
|
|
<script type='text/javascript' src='/facelift/js/agenda/agenda_objects.js'></script>
|
|
<script type='text/javascript' src='/facelift/js/agenda/agenda_helpers.js'></script>
|
|
<script type='text/javascript' src='/facelift/js/agenda/agenda_listeners.js'></script>
|
|
|
|
|
|
<script type='text/javascript'>
|
|
|
|
var meeting_number = "{{ meeting.number }}";
|
|
var meeting_base_url = "{{ meeting_base_url }}";
|
|
var site_base_url = "{{ site_base_url }}";
|
|
var meeting_slots_href = "{% url "ietf.meeting.ajax.timeslot_slotsurl" meeting.number %}";
|
|
total_days = {{time_slices|length}};
|
|
total_rooms = {{rooms|length}};
|
|
|
|
first_day = new Date("{% with timeslots|first as day %} {{ day.time }} {% endwith %}"); /* needed for the datepicker */
|
|
|
|
function setup_slots(promiselist){
|
|
var ts_promise = load_timeslots(meeting_slots_href);
|
|
promiselist.push(ts_promise);
|
|
|
|
{% for day in time_slices %}
|
|
days.push("{{day}}");
|
|
{% endfor %}
|
|
console.log("setup_slots run");
|
|
}
|
|
|
|
</script>
|
|
{% endblock js %}
|
|
|
|
|
|
{% block start_content_table %}{% endblock %}
|
|
{% block end_content_table %}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="wrapper custom_text_stuff">
|
|
<div style="ui-icon ui-icon-arrow-1-w" id="close_ietf_menubar">
|
|
<
|
|
</div>
|
|
|
|
<div class="agenda_div">
|
|
|
|
<table id="meetings" class="ietf-navbar" style="width:100%">
|
|
<th class="schedule_title"><div id="pageloaded" style="display:none"><span id="schedule_name">name: {{meeting.number}}</span></div>
|
|
<div id="spinner"><!-- spinney goes here --></div>
|
|
</th>
|
|
<th><!-- resources --></th>
|
|
{% for day in time_slices %}
|
|
<th colspan="{{date_slices|colWidth:day}}" id="{{day|date:'Y-m-d'}}-btn" class=" day_{{day}} agenda_slot_title">
|
|
<div style="display: none;" class="delete delete_day bottom_left" id="delete_{{day|date:'Y-m-d'}}">X</div>
|
|
{{day|date:'D'}} ({{day}})
|
|
|
|
</th>
|
|
<th class="day_{{day}} spacer {{day|date:'Y-m-d'}}-spacer" id="">
|
|
<div class="ui-widget-content ui-resizable" id="resize-{{day|date:'Y-m-d'}}-spacer">
|
|
<div class="spacer_grip ui-resizable-handle ui-resizable-e"></div>
|
|
</div>
|
|
</th>
|
|
{% endfor %}
|
|
<tr>
|
|
<th>
|
|
<div class="addbutton" id="add_room">+ROOM</div>
|
|
<div class="addbutton" id="add_day">+DAY</div>
|
|
</th>
|
|
<th><!-- resources --></th>
|
|
{% for day in time_slices %}
|
|
{% for slot in slot_slices|lookup:day %}
|
|
<th class="day_{{day}} room_title">
|
|
<div
|
|
href="{{slot.json_url}}"
|
|
timeslot_id="{{slot.pk}}"
|
|
class="delete delete_slot bottom_left"
|
|
id="delete_{{day|date:'Y-m-d'}}_{{slot.time|date:'Hi'}}">X</div>
|
|
{{slot.time|date:'Hi'}}-{{slot.end_time|date:'Hi'}}
|
|
</th>
|
|
|
|
{% endfor %}
|
|
<th class="day_{{day}} spacer {{day|date:'Y-m-d'}}-spacer">
|
|
</div></th>
|
|
|
|
{% endfor %}
|
|
|
|
{% for r in rooms %}
|
|
<tr id="{{r.name|to_acceptable_id}}" class="agenda_slot_row">
|
|
<th class="vert_time">
|
|
<div class="delete delete_room bottom_left"
|
|
id="delete_{{r.name|to_acceptable_id}}"
|
|
href="{{r.json_url}}"
|
|
roomid="{{r.pk}}">X</div>
|
|
<div class="right room_name"><a class="edit_room editlink"
|
|
href="/meeting/{{ meeting.number }}/room/{{r.pk}}.html" >{{r.name}} <span class="capacity">({{r.capacity}})</span></a></div>
|
|
|
|
<!-- <span class="hide_room light_blue_border">X</span><span class="left">{{r.name}}</span></th> -->
|
|
<th class="room_features">
|
|
<div class="resource_list">
|
|
{% for resource in r.resources.all %}
|
|
<span class="resource_image">
|
|
<img src="/images/{{ resource.icon }}" height=24 alt="{{resource.desc}}" title="{{resource.desc}}"/>
|
|
</span>
|
|
{% endfor %}
|
|
</div>
|
|
</th>
|
|
{% for day in time_slices %}
|
|
{% for slot in date_slices|lookup:day %}
|
|
<td slot_time="{{day}} {{slot.0|date:'H:i:s'}}" slot_duration="{{slot.2}}" slot_room="{{r.pk}}" id="{{r.dom_id}}_{{day}}_{{slot.0|date:'Hi'}}" class="day_{{day}} agenda-column-{{day}}-{{slot.0|date:'Hi'}} agenda_slot {% cycle 'agenda_slot_alt' '' %} agenda_slot_unavailable" ></td>
|
|
{% endfor %}
|
|
<td class="day_{{day}} spacer {{day|date:'Y-m-d'}}-spacer"></td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
|
|
</div>
|
|
<div class="dialog" id="add_room_dialog">
|
|
<form action="{{roomsurl}}" method="post">{% csrf_token %}
|
|
<table>
|
|
{{ addroom.as_table }}
|
|
<tr><td><input type="submit" name="addroom" value="addroom"></td></tr>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
<div class="dialog" id="add_day_dialog">
|
|
<table>
|
|
<form action="{{adddayurl}}" method="post">{% csrf_token %}
|
|
{{ addday }}
|
|
<tr><th><label>Duration</label></th><td><input type="text" id="duration_time"></td></tr>
|
|
<tr><th></th><td><div id="timespan"></div></td></tr>
|
|
<tr><td><input type="submit" name="addday" value="addday"></td></tr>
|
|
</form>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="dialog" id="room_delete_dialog">
|
|
Are you sure you want to delete this room?
|
|
</div>
|
|
|
|
<div class="dialog" id="slot_delete_dialog">
|
|
Are you sure you want to delete this entire timeslot?
|
|
</div>
|
|
|
|
{% if server_mode %}
|
|
{% if server_mode != "production" %}
|
|
<button onclick="TowTruck(this); return false;">Start TowTruck</button>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% endblock %}
|