73 lines
3.1 KiB
HTML
73 lines
3.1 KiB
HTML
{% load static %}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}">
|
|
<meta charset="UTF-8">
|
|
<title>Hotel INO Scrum</title>
|
|
<script>
|
|
function changeBackground(imageUrl) {
|
|
if(imageUrl != null) {
|
|
document.body.style.background = "url(" + imageUrl + ") no-repeat center center fixed";
|
|
document.body.style.backgroundSize = "cover";
|
|
localStorage.backgroundImage = imageUrl;
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onLoad="changeBackground(imageUrl = localStorage.backgroundImage)">
|
|
<h1>Hotel INO Scrum</h1>
|
|
<center><h3>Lista pokoi dostępnych w naszym hotelu</h3></center>
|
|
<table id="hotels">
|
|
<col style="width:10%">
|
|
<col style="width:30%">
|
|
<col style="width:25%">
|
|
<col style="width:35%">
|
|
<th>Numer pokoju</th>
|
|
<th>Typ pokoju</th>
|
|
<th>Cena</th>
|
|
<th>Rezerwacja</th>
|
|
{% for room in rooms %}
|
|
<tr>
|
|
<td>{{ room.room_number }}</td>
|
|
<td>{{ room.room_type }}</td>
|
|
<td>{{ room.price }} zł</td>
|
|
<td>
|
|
{% if room.reserved %}
|
|
<form action="{% url 'reservation' %}" method="POST">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="room" value="{{ room.room_number }}">
|
|
<div class="button-box" >
|
|
<button>Rezerwuj</button><br>
|
|
<input type="date" name="begindate">
|
|
<input type="date" name="enddate">
|
|
</div>
|
|
</form>
|
|
{% else %}
|
|
<form action="{% url 'reservation' %}" method="POST">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="room" value="{{ room.room_number }}">
|
|
<div class="button-box" >
|
|
<button>Rezerwuj</button><br>
|
|
<input type="date" name="begindate">
|
|
<input type="date" name="enddate">
|
|
</div>
|
|
</form>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
<br><br>
|
|
<center>
|
|
<table id="images">
|
|
<th><input type="image" src="static/images/background1.jpg" height="150px" width="250px" onClick="changeBackground(imageUrl='static/images/background1.jpg')"/></th>
|
|
<th><input type="image" src="static/images/background2.jpg" height="150px" width="250px" onClick="changeBackground(imageUrl='static/images/background2.jpg')"/></th>
|
|
<th><input type="image" src="static/images/background3.jpg" height="150px" width="250px" onClick="changeBackground(imageUrl='static/images/background3.jpg')"/></th>
|
|
<th><input type="image" src="static/images/background4.jpg" height="150px" width="250px" onClick="changeBackground(imageUrl='static/images/background4.jpg')"/></th>
|
|
<th><input type="image" src="static/images/background5.jpg" height="150px" width="250px" onClick="changeBackground(imageUrl='static/images/background5.jpg')"/></th>
|
|
</table>
|
|
</center>
|
|
</body>
|
|
</html>
|