Only display active timers nav menu if active timers exist.

This commit is contained in:
Christopher Charbonneau Wells 2017-09-10 04:42:37 -04:00
parent 4f93d96501
commit d29e47861d
1 changed files with 9 additions and 7 deletions

View File

@ -19,12 +19,14 @@
<i class="fa fa-list" aria-hidden="true"></i> View Timers <i class="fa fa-list" aria-hidden="true"></i> View Timers
</a> </a>
{% endif %} {% endif %}
<div class="dropdown-divider"></div> {% if timers %}
<h6 class="dropdown-header">Active Timers</h6> <div class="dropdown-divider"></div>
{% for timer in timers %} <h6 class="dropdown-header">Active Timers</h6>
<a class="dropdown-item" href="{% url 'timer-detail' timer.id %}">{{ timer }} ({{ timer.user }})</a> {% for timer in timers %}
{% empty %} <a class="dropdown-item" href="{% url 'timer-detail' timer.id %}">{{ timer }} ({{ timer.user }})</a>
None {% empty %}
{% endfor %} <a class="dropdown-item disabled" href="#">None</a>
{% endfor %}
{% endif %}
</div> </div>
</li> </li>