From 446ddc773edfa5f783df5f6a84bbd370ac954ec3 Mon Sep 17 00:00:00 2001
From: Carlos Vega <carlos.vega@uni.lu>
Date: Tue, 23 Oct 2018 11:41:17 +0200
Subject: [PATCH] Issue #246 used new vouchers and voucher_types study
 properties from the extended context

---
 smash/web/templates/sidebar.html | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/smash/web/templates/sidebar.html b/smash/web/templates/sidebar.html
index 1816f05c..dd25553c 100644
--- a/smash/web/templates/sidebar.html
+++ b/smash/web/templates/sidebar.html
@@ -66,12 +66,14 @@
         </a>
     </li>
 
+    {% if has_vouchers %}
     <li data-desc="vouchers">
         <a href="{% url 'web.views.vouchers' %}">
             <i class="fa fa-user-md"></i>
             <span>Vouchers</span>
         </a>
     </li>
+    {% endif %}
 
     <li data-desc="configuration" class="treeview">
         <a href="#">
@@ -83,8 +85,12 @@
         <ul class="treeview-menu">
             <li><a href="{% url 'web.views.configuration' %}">General</a></li>
             <li><a href="{% url 'web.views.languages' %}">Languages</a></li>
+            {% if has_voucher_types %}
             <li><a href="{% url 'web.views.voucher_types' %}">Voucher types</a></li>
+            {% endif %}
+            {% if has_vouchers %}
             <li><a href="{% url 'web.views.workers' 'VOUCHER_PARTNER' %}">Voucher partners</a></li>
+            {% endif %}
             <li><a href="{% url 'web.views.workers' 'HEALTH_PARTNER' %}">Health partners</a></li>
             <li><a href="{% url 'web.views.edit_study' study_id %}">Study</a></li>
         </ul>
-- 
GitLab