diff --git a/smash/web/templates/sidebar.html b/smash/web/templates/sidebar.html index dd25553c65e4704c1a7833d1b42116401e1877b3..f4b3c8575046b51a695816f564e40c7e02272e37 100644 --- a/smash/web/templates/sidebar.html +++ b/smash/web/templates/sidebar.html @@ -66,7 +66,7 @@ </a> </li> - {% if has_vouchers %} + {% if study.has_vouchers %} <li data-desc="vouchers"> <a href="{% url 'web.views.vouchers' %}"> <i class="fa fa-user-md"></i> @@ -85,10 +85,10 @@ <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 %} + {% if study.has_voucher_types %} <li><a href="{% url 'web.views.voucher_types' %}">Voucher types</a></li> {% endif %} - {% if has_vouchers %} + {% if study.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> diff --git a/smash/web/views/__init__.py b/smash/web/views/__init__.py index 13dcbeb56284240eb757cf43550bba87fef0f341..fa58ba75a4ac649f8e573ce6a4cc339583d5c402 100644 --- a/smash/web/views/__init__.py +++ b/smash/web/views/__init__.py @@ -60,8 +60,7 @@ def extend_context(params, request): 'role': role, 'notifications': notifications, 'study_id': GLOBAL_STUDY_ID, - 'has_vouchers' : study.has_vouchers, - 'has_voucher_types' : study.has_voucher_types + 'study' : study }) return final_params