hide another top menu

remotes/origin/yandex
apache 9 years ago
parent e3468f2fc3
commit 1595c503ff
  1. 2
      project/templates/base.html
  2. 8
      project/templates/menu/menu.html

@ -89,9 +89,11 @@
{% block top_menu %} {% block top_menu %}
<div id="menu"> <div id="menu">
{% if user.is_authenticated %}
<ul> <ul>
{% show_menu 0 100 100 100 %} {% show_menu 0 100 100 100 %}
</ul> </ul>
{% endif %}
</div> </div>
{% endblock %} {% endblock %}

@ -11,7 +11,9 @@
{% url 'customer_profile_view' as customer_profile_view %} {% url 'customer_profile_view' as customer_profile_view %}
{% url 'customer_clients_list' as customer_clients_list %} {% url 'customer_clients_list' as customer_clients_list %}
{% if user.is_anonymous %} {# if user.is_authenticated #}
{% if not user.is_authenticated %}
{% for child in children|slice:":4" %} {% for child in children|slice:":4" %}
<li class="child{% if child.selected %} selected{% endif %}{% if child.ancestor %} ancestor{% endif %}{% if child.sibling %} sibling{% endif %}{% if child.descendant %} descendant{% endif %}"> <li class="child{% if child.selected %} selected{% endif %}{% if child.ancestor %} ancestor{% endif %}{% if child.sibling %} sibling{% endif %}{% if child.descendant %} descendant{% endif %}">
<a href="{{ child.attr.redirect_url|default:child.get_absolute_url }}">{{ child.get_menu_title }}</a> <a href="{{ child.attr.redirect_url|default:child.get_absolute_url }}">{{ child.get_menu_title }}</a>
@ -38,7 +40,7 @@
{% endif %} {% endif %}
<li id="other_docs"> <li id="other_docs">
<a href="#" id="other_docs_a">Другие документы</a> <a href="#" id="other_docs_a">Другие документы</a>
{% if user.is_anonymous %} {% if not user.is_authenticated %}
<ul class="other_docs_menu hidden"> <ul class="other_docs_menu hidden">
{% for child in children|slice:"4:" %} {% for child in children|slice:"4:" %}
<li class="child{% if child.selected %} selected{% endif %}{% if child.ancestor %} ancestor{% endif %}{% if child.sibling %} sibling{% endif %}{% if child.descendant %} descendant{% endif %}"> <li class="child{% if child.selected %} selected{% endif %}{% if child.ancestor %} ancestor{% endif %}{% if child.sibling %} sibling{% endif %}{% if child.descendant %} descendant{% endif %}">
@ -66,3 +68,5 @@
<li class="yellow child{% if request.path == customer_clients_list %} selected{% endif %}"> <li class="yellow child{% if request.path == customer_clients_list %} selected{% endif %}">
<a href="{{ customer_clients_list }}"style="padding-left: 30px;">МОИ КОНТРАГЕНТЫ</a> <a href="{{ customer_clients_list }}"style="padding-left: 30px;">МОИ КОНТРАГЕНТЫ</a>
</li> </li>
{# endif #}

Loading…
Cancel
Save