blob: d144bb8396a450de99a66237c54b667c63b823d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
{% extends "dashboard/table.html" %}
{% load staticfiles %}
{% load bootstrap3 %}
{% block extrahead %}
<link href="{% static "bower_components/fullcalendar/dist/fullcalendar.css" %}"
rel='stylesheet'/>
<link href="{% static "bower_components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" %}"
rel='stylesheet'/>
{% endblock extrahead %}
{% block content %}
<div class="row">
<div class="col-lg-8">
<div class="container-fluid">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-calendar fa-fw"></i>Calendar
</div>
<div class="panel-body">
<div id='calendar'>
</div>
</div>
<!-- /.panel-body -->
</div>
<!-- /.panel -->
</div>
</div>
<div class="col-lg-4">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-edit fa-fw"></i>Booking
</div>
<div class="panel-body">
<div id="booking_form_div">
{% bootstrap_form_errors form type='non_fields' %}
<form method="post" action="" class="form" id="bookingform">
{% csrf_token %}
<div class='input-group' id='starttimepicker'>
{% bootstrap_field form.start addon_after='<span class="glyphicon glyphicon-calendar"></span>' %}
</div>
<div class='input-group' id='endtimepicker'>
{% bootstrap_field form.end addon_after='<span class="glyphicon glyphicon-calendar"></span>' %}
</div>
{% bootstrap_field form.purpose %}
{% buttons %}
<button type="submit" class="btn btn btn-success">
Book
</button>
{% endbuttons %}
</form>
</div>
</div>
</div>
</div>
{% endblock content %}
{% block extrajs %}
<script type="text/javascript">
var bookings_url = "{% url 'booking:bookings_json' resource_id=resource.id %}"
var user_timezone = "{{ request.user.userprofile.timezone }}"
</script>
<script src={% static "bower_components/moment/moment.js" %}></script>
<script src={% static "bower_components/fullcalendar/dist/fullcalendar.js" %}></script>
<script type="text/javascript"
src={% static "bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js" %}></script>
<script src={% static "js/fullcalendar-options.js" %}></script>
<script src={% static "js/datetimepicker-options.js" %}></script>
<script src={% static "js/booking-calendar.js" %}></script>
{% endblock extrajs %}
|