File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
bakerydemo/templates/locations Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,18 @@ <h2 class="location__meta-title">Operating Status</h2>
30
30
as a Wagtail API usage example and to allow for
31
31
caching of the whole page without the status.
32
32
{% endcomment %}
33
- < location-status url ="{% url 'wagtailapi:pages:detail' page.pk %} ">
34
- Please wait...
35
- </ location-status >
33
+ {% if request.is_preview %}
34
+ {% if page.is_open %}
35
+ This location is currently open.
36
+ {% else %}
37
+ Sorry, this location is currently closed.
38
+ {% endif %}
39
+ {% else %}
40
+ < location-status url ="{% url 'wagtailapi:pages:detail' page.pk %} ">
41
+ Please wait…
42
+ </ location-status >
43
+ {% endif %}
44
+
36
45
37
46
< h2 class ="location__meta-title "> Address</ h2 >
38
47
< address > {{ page.address|linebreaks }}</ address >
You can’t perform that action at this time.
0 commit comments