odds-ends-changes #3

Merged
softwareshinobi merged 5 commits from odds-ends-changes into main 2026-02-19 00:47:33 -05:00
Showing only changes of commit 7e93b14012 - Show all commits

View File

@@ -1,177 +1,112 @@
{% load static %} {% load static %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Manage Rental Bikes | Robert's Bike Rentals</title>
<title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootswatch@5.3.2/dist/lux/bootstrap.min.css">
Manage Tournaments / Card Players Unite Admin
</title>
<!-- head / css / begin -->
<link rel="stylesheet" href="{% static 'styling/custom.css' %}"> <link rel="stylesheet" href="{% static 'styling/custom.css' %}">
<link rel="stylesheet" href="{% static 'styling/sketchy.css' %}">
<!-- head / css / end -->
</head> </head>
<body> <body class="bg-light">
<nav class="navbar navbar-expand-lg navbar-dark bg-primary mb-4">
<div class="container">
<a class="navbar-brand" href="/home">Robert's Rentals</a>
<div class="d-flex border-start ps-3">
<a href="/home" class="btn btn-outline-light btn-sm me-2">Home</a>
<a href="/about-roberts-rentals" class="btn btn-outline-light btn-sm me-2">About</a>
<a href="/bike-accessories" class="btn btn-outline-light btn-sm me-2">Accessories</a>
<a href="/bike/" class="btn btn-outline-light btn-sm me-2">Reserve</a>
<a href="/accounts/login/" class="btn btn-secondary btn-sm">Log In</a>
</div>
</div>
</nav>
<div> <div class="container">
<header class="pb-3 mb-4 border-bottom">
<a href="/home"> <h1 class="display-5 fw-bold text-dark">Manage Rental Bikes <small class="text-muted fs-6">[admin]</small></h1>
<button type="button" class="btn btn-primary"> </header>
Home
</button>
</a>
<a href="/about-roberts-rentals">
<button type="button" class="btn btn-primary">
About
</button>
</a>
<a href="/bike-accessories">
<button type="button" class="btn btn-primary">
Bike Accessories
</button>
</a>
<a href="/bike/">
<button type="button" class="btn btn-primary">
Reserve Bike
</button>
</a>
<a href="/accounts/login/">
<button type="button" class="btn btn-secondary">
Log In
</button>
</a>
<div class="row align-items-md-stretch">
<div class="col-md-5">
<div class="card border-0 shadow-sm mb-4">
<img src="{% static 'img/close-up-bicycle-gears.jpg' %}" class="card-img-top img-fluid rounded" alt="Bicycle Gears">
</div>
</div>
<div class="col-md-7">
<div class="h-100 p-5 bg-white border rounded-3 shadow-sm">
<h2>Fleet Overview</h2>
<p>Use this administrative dashboard to monitor the status of our rental fleet. You can process returns for bikes currently checked out by customers.</p>
{% if status_message %}
<div class="alert alert-info">{{ status_message }}</div>
{% endif %}
</div>
</div>
</div> </div>
<div class="card shadow-sm mt-4">
<h1> <div class="card-body p-0">
<div class="table-responsive">
Robert's Bike Rentals > Manage Rental Bikes <i>[admin]</i> <table class="table table-hover mb-0">
<thead class="table-dark">
</h1>
<div>
<img src="{% static 'img/close-up-bicycle-gears.jpg' %}" height=480 width=640>
</div>
<p>
Use this page to view our fleet of rental bikes. You can use this page to return bikes that have been rented by customers.
</p>
<div>
<table class="center">
<thead>
<tr> <tr>
<th class="ps-4">Name</th>
<th>Name</th>
<th>Description</th> <th>Description</th>
<th>Rental Price</th> <th>Rental Price</th>
<th>Renter ID</th>
<th>Rental User ID</th> <th class="text-center">Actions</th>
<th>Actions</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% if status_message %}
<h4>
{{ status_message }}
</h4>
{% endif %}
{% if latest_question_list %} {% if latest_question_list %}
{% for question in latest_question_list %} {% for question in latest_question_list %}
<tr class="align-middle">
<td class="fw-bold ps-4">{{ question.name }}</td>
<tr> <td>{{ question.description }}</td>
<td><span class="badge bg-success">&euro; {{ question.rental_price }}</span></td>
<td class=""> {{ question.name }} </td> <td>
<td class=""> {{ question.description }} </td>
<td class=""> &euro; {{ question.rental_price }} </td>
<td class=""> {{ question.rented_user_id }} </td>
{% if question.rented_user_id != 0 %} {% if question.rented_user_id != 0 %}
<span class="text-primary fw-bold">{{ question.rented_user_id }}</span>
<td class=""> {% else %}
<span class="text-muted small">Available</span>
<a href="/bike/return/{{question.id}}/{{user.pk}}"> {% endif %}
</td>
<button type="button" class="btn btn-primary"> <td class="text-center">
{% if question.rented_user_id != 0 %}
Return bike: {{ question.name }} <a href="/bike/return/{{question.id}}/{{user.pk}}" class="btn btn-primary btn-sm px-3">
Return Bike
</button>
</a> </a>
</td>
{% else %} {% else %}
<button type="button" class="btn btn-outline-secondary btn-sm disabled" disabled>
<td class=""> In Stock
<button type="button" class="btn btn-dark">
Not currently rented by a customer.
</button> </button>
{% endif %}
</td> </td>
{% endif %}
</tr> </tr>
{% endfor %} {% endfor %}
</ul>
{% else %} {% else %}
<tr>
<h2>No bikes are available.</h2> <td colspan="5" class="text-center py-5 text-muted">
<h3>No bikes are available.</h3>
</td>
</tr>
{% endif %} {% endif %}
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="footer">
Robert's Bike Rental created by <a href="https://github.com/gomsur">Robert</a>. <a href="https://www.freepik.com/free-photo/cyclist-sunny-day-bike-adventure-travel-photo_3972810.htm#query=bike&position=0&from_view=search&track=sph">Image by jcomp</a> on Freepik.
</div> </div>
</body> </div>
<footer class="pt-5 my-5 text-muted border-top text-center">
Robert's Bike Rental created by <a href="https://github.com/gomsur" class="text-decoration-none">Robert</a>.
<br>
<small>Image by <a href="https://www.freepik.com" class="text-decoration-none">jcomp</a> on Freepik.</small>
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html> </html>