aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/base/account/booking_list.html
diff options
context:
space:
mode:
authorGergely Csatari <gergely.csatari@nokia.com>2023-10-26 10:33:28 +0300
committerGergely Csatari <gergely.csatari@nokia.com>2023-10-26 10:34:28 +0300
commit2ec0d7b9f5c1354977b821c6b06c24a3ffa13142 (patch)
tree6e449d92ddfc880ed007e9d8a8f25bda8fc7cb0f /src/templates/base/account/booking_list.html
parent0d3dd290aa6e7f39e7b0b3cbe448b6622f924240 (diff)
Removing project content and adding a noteHEADmaster
that the development continues in GitHub Change-Id: I25c58a679dbf92b2367d826429b7cda936bf9f0e Signed-off-by: Gergely Csatari <gergely.csatari@nokia.com>
Diffstat (limited to 'src/templates/base/account/booking_list.html')
-rw-r--r--src/templates/base/account/booking_list.html146
1 files changed, 0 insertions, 146 deletions
diff --git a/src/templates/base/account/booking_list.html b/src/templates/base/account/booking_list.html
deleted file mode 100644
index f9234bc..0000000
--- a/src/templates/base/account/booking_list.html
+++ /dev/null
@@ -1,146 +0,0 @@
-{% extends "base.html" %}
-{% block content %}
-<h2>Bookings I Own</h2>
-<div class="row">
- {% for booking in bookings %}
- <div class="col-12 col-md-6 col-lg-4 col-xl-3 mb-3">
- <div class="card h-100">
- <div class="card-header">
- <h3>Booking {{booking.id}}</h3>
- </div>
- <ul class="list-group list-group-flush h-100">
- <li class="list-group-item">id: {{booking.id}}</li>
- <li class="list-group-item">lab: {{booking.lab}}</li>
- <li class="list-group-item">resource: {{booking.resource.template.name}}</li>
- <li class="list-group-item">start: {{booking.start}}</li>
- <li class="list-group-item">end: {{booking.end}}</li>
- <li class="list-group-item">purpose: {{booking.purpose}}</li>
- </ul>
- <div class="card-footer d-flex">
- <a class="btn btn-primary ml-auto mr-2" href="/booking/detail/{{booking.id}}/">Details</a>
- <button
- class="btn btn-danger"
- onclick='cancel_booking({{booking.id}});'
- data-toggle="modal"
- data-target="#resModal"
- >Cancel</button>
- </div>
- </div>
- </div>
- {% empty %}
- <div class="col">
- <p>You don't have any bookings. You can create a booking by booking a pod.</p>
- </div>
- {% endfor %}
-</div>
-
-<h2>Bookings I Collaborate On</h2>
-<div class="row">
-
- {% for booking in collab_bookings %}
- <div class="col-12 col-md-6 col-lg-4 col-xl-3 mb-3">
- <div class="card h-100">
- <div class="card-header">
- <h3>Booking {{booking.id}}</h3>
- </div>
- <ul class="list-group list-group-flush h-100">
- <li class="list-group-item">id: {{booking.id}}</li>
- <li class="list-group-item">lab: {{booking.lab}}</li>
- <li class="list-group-item">resource: {{booking.resource.template.name}}</li>
- <li class="list-group-item">start: {{booking.start}}</li>
- <li class="list-group-item">end: {{booking.end}}</li>
- <li class="list-group-item">purpose: {{booking.purpose}}</li>
- </ul>
- <div class="card-footer d-flex">
- <a class="btn btn-primary ml-auto" href="/booking/detail/{{booking.id}}/">Details</a>
- </div>
- </div>
- </div>
- {% empty %}
- <div class="col">
- <p>There are no collaborative bookings.</p>
- </div>
- {% endfor %}
-</div>
-
-<a href="#expired_bookings" data-toggle="collapse" class="h2 discrete-a">
- Expired Bookings
- <i class="fas fa-angle-down rotate"></i>
-</a>
-<div id="expired_bookings" class="row collapse">
- {% for booking in expired_bookings %}
- <div class="col-12 col-md-6 col-lg-4 col-xl-3 mb-3">
- <div class="card h-100">
- <div class="card-header">
- <h3>Booking {{booking.id}}</h3>
- </div>
- <ul class="list-group list-group-flush h-100">
- <li class="list-group-item">id: {{booking.id}}</li>
- <li class="list-group-item">lab: {{booking.lab}}</li>
- <li class="list-group-item">resource: {{booking.resource.template.name}}</li>
- <li class="list-group-item">start: {{booking.start}}</li>
- <li class="list-group-item">end: {{booking.end}}</li>
- <li class="list-group-item">purpose: {{booking.purpose}}</li>
- <li class="list-group-item">owner: {{booking.owner.userprofile.email_addr}}</li>
- </ul>
- <div class="card-footer d-flex">
- <a class="btn btn-primary ml-auto" href="/booking/detail/{{booking.id}}/">Details</a>
- </div>
- </div>
- </div>
- {% empty %}
- <div class="col">
- <p>There are no expired bookings.</p>
- </div>
- {% endfor %}
-</div>
-
-<script>
- var current_booking_id = -1;
- function cancel_booking(booking_id) {
- current_booking_id = booking_id;
- }
-
- function submit_cancel_form() {
- var ajaxForm = $("#booking_cancel_form");
- var formData = ajaxForm.serialize();
- req = new XMLHttpRequest();
- var url = "cancel/" + current_booking_id;
- req.open("POST", url, true);
- req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- req.onerror = function() { alert("problem submitting form"); }
- req.send(formData);
- }
-</script>
-
-<div class="modal fade" id="resModal" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h4 class="modal-title d-inline float-left">Cancel Booking?</h4>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <span aria-hidden="true">&times;</span>
- </button>
- </div>
- <form id="booking_cancel_form">
- {% csrf_token %}
- </form>
- <div class="modal-footer d-flex flex-column">
- <p>Everything on your machine(s) will be lost</p>
- <div class="mb-2">
- <button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Close</button>
- <button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#warning">Cancel Booking</button>
- </div>
- <div class="collapse w-100 text-center border-top" id="warning">
- <div class="p-4">
- <h3>Are You Sure?</h3>
- <p>This cannot be undone</p>
- <button class="btn btn-outline-secondary" data-dismiss="modal">Nevermind</button>
- <button class="btn btn-danger" id="confirm_cancel_button" data-dismiss="modal" onclick="submit_cancel_form();">I'm Sure</button>
- </div>
- </div>
- </div>
- </div>
- </div>
-</div>
-{% endblock %}