108 lines
4.1 KiB
HTML
108 lines
4.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>UniSquat</title>
|
|
<link rel="stylesheet" type="text/css" href="../static/style.css">
|
|
<meta name="viewport" content="width=300, initial-scale=1" />
|
|
</head>
|
|
<body>
|
|
{% include "base.html" %}
|
|
<main>
|
|
<div class="flex">
|
|
<p>
|
|
Départements sélectionnés : <br>
|
|
<b>{{ depts_str }}</b>
|
|
</p>
|
|
</div>
|
|
<div class="flex">
|
|
{% if date_str != "" : %}
|
|
<b>Le {{ date_str }}</b>
|
|
{% endif %}
|
|
</div>
|
|
<div class="flex">
|
|
<a class="button" href='/app/date-select{{change_date_str}}'>Choisir une date</a>
|
|
</div>
|
|
<form action="/app/free-rooms" method="get">
|
|
{% if favs: %}
|
|
<div class="flex">
|
|
<a class="button" href="{{ nofavslink }}">Retirer les favoris</a>
|
|
</div>
|
|
{% if favs_free_rooms|length>0: %}
|
|
<br>
|
|
<h1>Favoris disponibles maintenant</h1>
|
|
<div class="flex-container">
|
|
<ul>
|
|
{% for room in favs_free_rooms : %}
|
|
<dt>{{ room.name }} {% if DEBUG :%}( {{ room.id }} ){% endif %}<input class="fav" type="checkbox" id="{{ room.id }}" name="favs" value="{{ room.id }}" checked> <label for="{{ room.id }}">⭐</label>
|
|
{% if not(room.end.hour == 23 and room.end.minute == 59 and room.end.second == 59) : %}
|
|
<br><span class=details>Jusqu'à {{ frooms_disp[room.name]["end"] }} (dans {{ frooms_disp[room.name]["rtime"] }})</span>
|
|
{% endif %}
|
|
</dt>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% if favs_soon_rooms|length>0: %}
|
|
<br>
|
|
<h1>Favoris disponibles prochainement</h1>
|
|
<div class="flex-container">
|
|
<ul>
|
|
{% for room in favs_soon_rooms: %}
|
|
<dt>{{ room.name }} {% if DEBUG :%}( {{ room.id }} ){% endif %}<input class="fav" type="checkbox" id="{{ room.id }}" name="favs" value="{{ room.id }}" checked> <label for="{{ room.id }}">⭐</label>
|
|
{% if room.end.hour == 23 and room.end.minute == 59 and room.end.second == 59 : %}
|
|
<br><span class=details>À {{ frooms_disp[room.name]["start"] }} (dans {{ frooms_disp[room.name]["rtime"] }})</span>
|
|
{% else %}
|
|
<br><span class=details>De {{ frooms_disp[room.name]["start"] }} à {{ frooms_disp[room.name]["end"] }} (dans {{ frooms_disp[room.name]["rtime"] }})</span>
|
|
{% endif %}
|
|
</dt>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if free_rooms|length>0 %}
|
|
<br>
|
|
<h1>Disponibles maintenant</h1>
|
|
<div class="flex-container">
|
|
<ul>
|
|
{% for room in free_rooms: %}
|
|
<dt>{{ room.name }} {% if DEBUG :%}( {{ room.id }} ){% endif %}<input class="fav" type="checkbox" id="{{ room.id }}" name="favs" value="{{ room.id }}"> <label for="{{ room.id }}">⭐</label>
|
|
{% if not(room.end.hour == 23 and room.end.minute == 59 and room.end.second == 59) : %}
|
|
<br><span class=details>Jusqu'à {{ frooms_disp[room.name]["end"] }} (dans {{ frooms_disp[room.name]["rtime"] }})</span>
|
|
{% endif %}
|
|
</dt>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% if soon_rooms|length>0 %}
|
|
<br>
|
|
<h1>Disponibles prochainement</h1>
|
|
<div class="flex-container">
|
|
<ul>
|
|
{% for room in soon_rooms: %}
|
|
<dt>{{ room.name }} {% if DEBUG :%}( {{ room.id }} ){% endif %}<input class="fav" type="checkbox" id="{{ room.id }}" name="favs" value="{{ room.id }}"> <label for="{{ room.id }}">⭐</label>
|
|
{% if room.end.hour == 23 and room.end.minute == 59 and room.end.second == 59 : %}
|
|
<br><span class=details>À {{ frooms_disp[room.name]["start"] }} (dans {{ frooms_disp[room.name]["rtime"] }})</span>
|
|
{% else %}
|
|
<br><span class=details>De {{ frooms_disp[room.name]["start"] }} à {{ frooms_disp[room.name]["end"] }} (dans {{ frooms_disp[room.name]["rtime"] }})</span>
|
|
{% endif %}
|
|
</dt>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
<div class="flex">
|
|
{% for d in dident_list : %} <!-- Magie noire pour conserver les départements séléctionnés -->
|
|
<span style="display: none;"><input type="text" name="dept" value="{{ d }}"/></span>
|
|
{% endfor %}
|
|
|
|
<input type="submit" value="Valider les favoris">
|
|
</div>
|
|
</form>
|
|
</main>
|
|
{% include "footer.html" %}
|
|
</body>
|
|
</html>
|