-
Notifications
You must be signed in to change notification settings - Fork 38
/
index.html
executable file
·49 lines (40 loc) · 1.02 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{% extends "openinghours/base.html" %}
{% load i18n %}
{% load openinghours_tags %}
{% block content %}
<h2>Check current situation</h2>
{% verbatim %}
<pre>
{% is_open location as open %}
{% if open %}
Come in, we're open!
{% else %}
Sorry, we're closed.
Reopening
{% next_time_open location as next %}
{{ next.get_weekday_display }} {{ next.from_hour }}
{% endif %}
</pre>
{% endverbatim %}
{% is_open location as open %}
{% if open %}
<div class="alert alert-success">Come in, we're open!</div>
{% else %}
<div class="alert alert-warning">Sorry, we're closed.
Reopening
{% next_time_open location as next %}
{{ next.get_weekday_display }} {{ next.from_hour }}
</div>
{% endif %}
<h2>Display opening hours</h2>
{% verbatim %}
<pre>{% opening_hours location %}</pre>
{% endverbatim %}
{% opening_hours location %}
<hr>
<p>Concise opening hours:</p>
{% verbatim %}
<pre>{% opening_hours location concise=1 %}</pre>
{% endverbatim %}
{% opening_hours location concise=1 %}
{% endblock %}