Hotel/hotel/rooms/templates/index.html

71 lines
3.0 KiB
HTML
Raw Normal View History

2019-01-13 15:17:14 +01:00
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
2019-01-13 15:17:14 +01:00
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'jquery-ui.css' %}">
<meta charset="UTF-8">
2019-01-13 15:17:14 +01:00
<title>Hotel INO Scrum</title>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
2019-01-20 11:51:10 +01:00
<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;
}
2019-01-20 11:51:10 +01:00
}
$( function() {
$( ".datepicker" ).datepicker({ dateFormat: 'dd-mm-yy' }).val();
} );
2019-01-20 11:51:10 +01:00
</script>
</head>
<body onLoad="changeBackground(imageUrl = localStorage.backgroundImage)">
2019-01-13 17:37:21 +01:00
<h1>Hotel INO Scrum</h1>
<center><h3>Lista pokoi dostępnych w naszym hotelu</h3></center>
2019-01-22 22:20:06 +01:00
<center><h3>{{ error }}</h3></center>
2019-01-13 15:17:14 +01:00
<table id="hotels">
2019-01-20 11:51:10 +01:00
<col style="width:10%">
<col style="width:30%">
2019-01-22 20:34:02 +01:00
<col style="width:15%">
<col style="width:45%">
<th>Numer pokoju</th>
<th>Typ pokoju</th>
<th>Cena</th>
2019-01-13 15:17:14 +01:00
<th>Rezerwacja</th>
{% for room in rooms %}
<tr>
<td>{{ room.room_number }}</td>
<td>{{ room.room_type }}</td>
<td>{{ room.price }} zł</td>
<td>
2019-01-13 20:27:23 +01:00
<form action="{% url 'reservation' %}" method="POST">
{% csrf_token %}
<input type="hidden" name="room" value="{{ room.room_number }}">
<div class="button-box" >
Od: <input type="text" class="datepicker" name="begindate" size="3">
Do: <input type="text" class="datepicker" name="enddate" size="3">
2019-01-22 20:34:02 +01:00
<button>Rezerwuj</button>
2019-01-13 20:27:23 +01:00
</div>
</form>
</td>
</tr>
{% endfor %}
</table>
2019-01-20 11:51:10 +01:00
<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>
2019-01-13 15:17:14 +01:00
</html>