|
@@ -7,24 +7,17 @@
|
|
{% block head %}
|
|
{% block head %}
|
|
<link rel="stylesheet" href="{% static 'zitap/css/event.css' %}">
|
|
<link rel="stylesheet" href="{% static 'zitap/css/event.css' %}">
|
|
<link rel="stylesheet" href="{% static 'zitap/css/slot-picker.css' %}">
|
|
<link rel="stylesheet" href="{% static 'zitap/css/slot-picker.css' %}">
|
|
- <style type="text/css">
|
|
|
|
- {% for color in grid.colors %}
|
|
|
|
- .occupancy-grid .slot.{{ color.name }} {
|
|
|
|
- background-color: {{ color.color }};
|
|
|
|
- }
|
|
|
|
- {% endfor %}
|
|
|
|
- </style>
|
|
|
|
{% endblock %}
|
|
{% endblock %}
|
|
|
|
|
|
{% block content %}
|
|
{% block content %}
|
|
<h1>{{ event.name }}</h1>
|
|
<h1>{{ event.name }}</h1>
|
|
|
|
|
|
-<div class="occupancy-grid">
|
|
|
|
|
|
+<div class="occupancy-grid" style="--color-count:{{ grid.colors }}">
|
|
{% for day in grid.days %}
|
|
{% for day in grid.days %}
|
|
<div class="slot-column">
|
|
<div class="slot-column">
|
|
<div class="day">{{ day.date|date:"M d" }}</div>
|
|
<div class="day">{{ day.date|date:"M d" }}</div>
|
|
{% for slot in day.slots %}
|
|
{% for slot in day.slots %}
|
|
- <div class="slot {{ slot.class }}{% if slot.is_full_hour %} full-hour{% elif slot.is_half_hour %} half-hour{% endif %}" id="grid_slot_{{ slot.offset }}" title="{{ slot.tooltip }}">
|
|
|
|
|
|
+ <div class="slot{% if slot.is_full_hour %} full-hour{% elif slot.is_half_hour %} half-hour{% endif %}" id="grid_slot_{{ slot.offset }}" title="{{ slot.tooltip }}" style="--color-index:{{ slot.color }}">
|
|
{% if slot.is_full_hour %}<div class="time-label">{{ slot.time|date:"H:i" }}</div>{% endif %}
|
|
{% if slot.is_full_hour %}<div class="time-label">{{ slot.time|date:"H:i" }}</div>{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
@@ -45,7 +38,7 @@
|
|
{% trans "Logout" %}
|
|
{% trans "Logout" %}
|
|
</button>
|
|
</button>
|
|
<script type="text/javascript" src="{% static 'zitap/js/mouse-drag.js' %}"></script>
|
|
<script type="text/javascript" src="{% static 'zitap/js/mouse-drag.js' %}"></script>
|
|
-{% else %}
|
|
|
|
|
|
+ {% else %}
|
|
<form action="{% url 'login' url=event.url %}" method="post">
|
|
<form action="{% url 'login' url=event.url %}" method="post">
|
|
{% csrf_token %}
|
|
{% csrf_token %}
|
|
<table>
|
|
<table>
|
|
@@ -53,5 +46,6 @@
|
|
</table>
|
|
</table>
|
|
<input type="submit" value="Login to Update Slots">
|
|
<input type="submit" value="Login to Update Slots">
|
|
</form>
|
|
</form>
|
|
-{% endif %}
|
|
|
|
|
|
+ {% endif %}
|
|
|
|
+ <script type="text/javascript" src="{% static 'zitap/js/live-updates.js' %}"></script>
|
|
{% endblock %}
|
|
{% endblock %}
|