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 %}
{% if timers %}
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<h6 class="dropdown-header">Active Timers</h6> <h6 class="dropdown-header">Active Timers</h6>
{% for timer in timers %} {% for timer in timers %}
<a class="dropdown-item" href="{% url 'timer-detail' timer.id %}">{{ timer }} ({{ timer.user }})</a> <a class="dropdown-item" href="{% url 'timer-detail' timer.id %}">{{ timer }} ({{ timer.user }})</a>
{% empty %} {% empty %}
None <a class="dropdown-item disabled" href="#">None</a>
{% endfor %} {% endfor %}
{% endif %}
</div> </div>
</li> </li>