aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/booking/booking_detail.html
blob: 4628a62d2174db2b2d924cfc23c76d482c777a53 (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
{% load jira_filters %}

<script type="text/javascript">
    function deleteClick(id) {
        var booking_delete_url = booking_delete_prefix + id
        $.ajax({
            url: booking_delete_url,
            type: 'get',
            success: function (data) {
                $('#booking_delete_content').html(data);
            },
            failure: function (data) {
                alert('Error finding that booking');
            }
        });
        $('#booking_delete_modal').modal('show');
    }
</script>

<p>
    <b>Resource: </b>
    <a href="{{ booking.resource.url }}">
        {{ booking.resource.name }}
    </a>
</p>
<p>
    <b>User: </b> {{ booking.user.username }}
</p>
<p>
    <b>Start: </b> {{ booking.start }}
</p>
<p>
    <b>End: </b> {{ booking.end }}
</p>
<p>
    <b>Purpose: </b> {{ booking.purpose }}
</p>
<p>
    <b>Operating System: </b> {{ booking.opsys }}
</p>
<p>
    <b>Installer: </b> {{ booking.installer }}
</p>
<p>
    <b>Scenario: </b> {{ booking.scenario }}
</p>
<p>
    <b>Extensions Remaining: </b> {{ booking.ext_count }}
</p>

{% if user.is_authenticated %}
{% if user.get_username == booking.user.username %}
<p>
    <a href="{% url 'booking:edit' booking_id=booking.id resource_id=booking.resource.id  %}" class="btn btn btn-success">
        Edit Booking
    </a>
    <a href="javascript:deleteClick({{ booking.id }})" class="btn btn btn-danger">
        Delete Booking
    </a>
    <div id="booking_delete_modal" class="modal fade" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <h4 class="modal-title">Delete Booking</h4>
                </div>
                <div class="modal-body" id="booking_delete_content">
                </div>
            </div>
        </div>
    </div>
</p>
{% endif %}
{% endif %}