Hide booking URLs if not logged in

This commit is contained in:
Edward Betts 2024-04-02 10:37:06 +01:00
parent ae630a8f68
commit 7208e10cb2

View file

@ -64,7 +64,7 @@
{% endif %}
</div>
<div class="grid-item">
{% if item.url %}
{% if g.user.is_authenticated and item.url %}
<a href="{{ item.url }}">{{ item.name }}</a>
{% else %}
{{ item.name }}
@ -104,9 +104,9 @@
{% set url = item.url %}
<div class="grid-item text-end">{{ item.depart.strftime("%a, %d %b %Y") }}</div>
<div class="grid-item">
{% if url %}<a href="{{ url }}">{% endif %}
{% if g.user.is_authenticated and item.url %}<a href="{{ url }}">{% endif %}
{{ item.from }} &rarr; {{ item.to }}
{% if url %}</a>{% endif %}
{% if g.user.is_authenticated and item.url %}</a>{% endif %}
</div>
<div class="grid-item">{{ item.depart.strftime("%H:%M") }}</div>
<div class="grid-item">