summaryrefslogtreecommitdiff
path: root/templates/slot/index.html
blob: a8cdaef86d72e132dc9fa2dd7eae5bdb0e5c9ea0 (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>url
                {% 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 'slot_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 %}