Browse Source

Display hardware_provisioning link only if the app is enabled

Jocelyn Delande 8 years ago
parent
commit
a64eaf2e28
1 changed files with 2 additions and 0 deletions
  1. 2 0
      coin/templates/menu_items.html

+ 2 - 0
coin/templates/menu_items.html

@@ -3,8 +3,10 @@
 <li class="{% ifactive 'members:detail' %}active{% endifactive %}"><a href="{% url 'members:detail' %}"><i class="fa fa-user fa-fw"></i> Mes informations</a></li>
 <li class="{% ifactive 'members:subscriptions' %}active{% endifactive %}"><a href="{% url 'members:subscriptions' %}"><i class="fa fa-cog fa-fw"></i> Mes abonnements</a></li>
 <li class="{% ifactive 'members:invoices' %}active{% endifactive %}"><a href="{% url 'members:invoices' %}"><i class="fa fa-eur fa-fw"></i> Factures &amp; paiements</a></li>
+{% if 'hardware_provisioning' in INSTALLED_APPS %}
 <li class="{% ifactive 'hardware_provisioning:loan-list' %}active{% endifactive %}"><a href="{% url 'hardware_provisioning:loan-list' %}"><i
             class="fa fa-exchange fa-fw"></i> Mon matériel</a></li>
+{% endif %}
 <li class="{% ifactive 'members:contact' %}active{% endifactive %}"><a href="{% url 'members:contact' %}"><i class="fa fa-life-ring fa-fw"></i> Contact / Support</a></li>
 <li class="divider"></li>
 {% if user.is_staff %}<li><a href="{% url 'admin:index' %}"><i class="fa fa-cogs fa-fw"></i> Administration</a></li>{% endif %}