summaryrefslogtreecommitdiff
path: root/templates/slot/index.html
blob: 1a25a1f80aea80fa40678cfa9393398388186e7d (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
{% extends "layout.html" %}

{% block content %}
<div class="container">
    <div class="row">
        {% include "account/sub_nav.html" %}
        <script>
        document.getElementById("view-slot-nav").classList.add("active");
        </script>
        <div class="span12">
        <h3>Your booked slots</h3>
        <table class="table table-condensed">
            <thead>
                <tr>
                    <th>Date</th>
                    <th>Slot timings</th>
                    <th>Delete</th>
                </tr>
            </thead>
            <tbody>
                {% for b in bookings %}
                <tr>
                    <td>{{ b.booking_date|date:"M d, Y" }}</td>
                    <td>{{ b.slot }}</td>
                    {% if now_time < b.start_time %}
                    <td><a class="btn btn-danger" href="{% url 'sbhs_server.slot.views.delete' b.id %}" onclick="return confirm('Are you sure you want to delete booking for slot {{b.slot}} ?');">Delete</a></td>
                    {% else %}
                    <td><a class="btn btn-disabled" disabled="disabled">Delete</a></td>
                    {% endif %}
                </tr>
                {% endfor %}
            </tbody>
        </table>
        </div>
    </div>
</div>
{% endblock %}