Skip to content
Snippets Groups Projects
Commit 64613992 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Hide filter dropdowns in plan if there are no rooms or tracks

parent f5c4e4d5
No related branches found
No related tags found
No related merge requests found
......@@ -76,26 +76,30 @@
{% block content %}
<div class="float-right">
<ul class="nav nav-pills">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
aria-expanded="false">{% trans "Rooms" %}</a>
<div class="dropdown-menu" style="">
{% for r in event.room_set.all %}
<a class="dropdown-item"
href="{% url "plan:plan_room" event_slug=event.slug pk=r.pk %}">{{ r }}</a>
{% endfor %}
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
aria-expanded="false">{% trans "Tracks" %}</a>
<div class="dropdown-menu">
{% for t in event.aktrack_set.all %}
<a class="dropdown-item"
href="{% url "plan:plan_track" event_slug=event.slug pk=t.pk %}">{{ t }}</a>
{% endfor %}
</div>
</li>
{% if event.room_set.count > 0 %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
aria-expanded="false">{% trans "Rooms" %}</a>
<div class="dropdown-menu" style="">
{% for r in event.room_set.all %}
<a class="dropdown-item"
href="{% url "plan:plan_room" event_slug=event.slug pk=r.pk %}">{{ r }}</a>
{% endfor %}
</div>
</li>
{% endif %}
{% if event.aktrack_set.count > 0 %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
aria-expanded="false">{% trans "Tracks" %}</a>
<div class="dropdown-menu">
{% for t in event.aktrack_set.all %}
<a class="dropdown-item"
href="{% url "plan:plan_track" event_slug=event.slug pk=t.pk %}">{{ t }}</a>
{% endfor %}
</div>
</li>
{% endif %}
{% if event.active %}
<li class="nav-item">
<a class="nav-link active"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment