66 lines
2.7 KiB
HTML
66 lines
2.7 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) {
|
|
document.body.style.background = "url(" + imageUrl + ") no-repeat center center fixed";
|
|
document.body.style.backgroundSize = "cover";
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<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:20%">
|
|
<col style="width:40%">
|
|
<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>
|
|
</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>
|
|
</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>
|