summaryrefslogtreecommitdiff
path: root/sbhs/templates/dashboard/all_bookings.html
diff options
context:
space:
mode:
authorCruiseDevice2018-10-24 16:55:02 +0530
committerCruiseDevice2018-10-24 16:55:02 +0530
commit841289742d6c89b8a2eb30cea721f46b2389b862 (patch)
tree7e054353b721d0907b6afac957d65a03876d73c9 /sbhs/templates/dashboard/all_bookings.html
parent794aa51ff511a53623592dd6e72918099e2167ad (diff)
downloadsbhs_server-841289742d6c89b8a2eb30cea721f46b2389b862.tar.gz
sbhs_server-841289742d6c89b8a2eb30cea721f46b2389b862.tar.bz2
sbhs_server-841289742d6c89b8a2eb30cea721f46b2389b862.zip
Sbhs templates
Diffstat (limited to 'sbhs/templates/dashboard/all_bookings.html')
-rw-r--r--sbhs/templates/dashboard/all_bookings.html53
1 files changed, 53 insertions, 0 deletions
diff --git a/sbhs/templates/dashboard/all_bookings.html b/sbhs/templates/dashboard/all_bookings.html
new file mode 100644
index 0000000..810a506
--- /dev/null
+++ b/sbhs/templates/dashboard/all_bookings.html
@@ -0,0 +1,53 @@
+{% extends 'dashboard/dashboard_index.html' %}
+{% block title %}
+ All Bookings
+{% endblock %}
+{% block main %}
+ <div>
+ <h4>All Bookings</h4>
+
+ {% if slots %}
+ <table class="table table-bordered">
+ <thead>
+ <tr>
+ <th>Date</th>
+ <th>Slot</th>
+ <th>Board</th>
+ <th>User</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for slot in slots %}
+ <tr>
+ <td>{{slot.start_time|date:"d M Y"}}</td>
+ <td>{{slot.start_time|time:"H:i"}} to {{slot.end_time|time:"H:i"}}</td>
+ <td>{{slot.user.userboard_set.get.board.mid}}</td>
+ <td>{{slot.user}}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% else %}
+ <p>No slots have been booked. </p>
+ {% endif %}
+
+
+<center>
+<div class="pagination">
+ <span class="step-links">
+ {% if slots.has_previous %}
+ <a href="?page={{ slots.previous_page_number }}"class="btn btn-primary">< Previous</a>
+ {% endif %}
+
+ <span class="current">
+ Page {{ slots.number }} of {{ slots.paginator.num_pages }}
+ </span>
+
+ {% if slots.has_next %}
+ <a href="?page={{ slots.next_page_number }}" class="btn btn-primary">Next ></a>
+ {% endif %}
+ </span>
+</div>
+</center>
+</div>
+{% endblock %} \ No newline at end of file