diff --git a/GeneralApp/funcs.py b/GeneralApp/funcs.py index c26d7a4..0a3255f 100644 --- a/GeneralApp/funcs.py +++ b/GeneralApp/funcs.py @@ -40,11 +40,15 @@ def get_inter_Dict(user, context_Dict): feedback_form.initial = {'form_name': form_name} Dict.update({'feedback_form': feedback_form}) + from DocsApp.models import DocArt + arts_exists = DocArt.objects.filter(enable=True).exists() + Dict.update({ 'sections': sections, 'logo': get_logo_url(), 'hide_form_field_description': hide_form_field_description, 'footer_contacts': get_footer_contacts(), + 'allow_documentation': arts_exists, }) # from SubscribesApp.funcs import get_cur_user_subscribe # user_subscribe = get_cur_user_subscribe(user) diff --git a/templates/blocks/b_header.html b/templates/blocks/b_header.html index 936ae6b..8fb8a1a 100644 --- a/templates/blocks/b_header.html +++ b/templates/blocks/b_header.html @@ -10,7 +10,9 @@
{# Поддержка#} - {% translate "Поддержка" %} + {% if allow_documentation %} + {% translate "Поддержка" %} + {% endif %} {% translate "Контакты" %}