toodego: move nav template in own file (#57655)
This commit is contained in:
parent
0e543d1424
commit
da84cd9e95
|
@ -10,29 +10,6 @@
|
|||
<h1 id="logo"><a accesskey="1" href="{% skeleton_extra_placeholder "top-logo-link" %}{% if user.is_authenticated %}{% firstof toodego_url portal_url %}{% else %}{% firstof toodego_url portal_url %}connect/{% endif %}{% end_skeleton_extra_placeholder %}">{% firstof global_title site_title %}</a></h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block menu %}
|
||||
{# replace last menu item by user name #}
|
||||
{% spaceless %}
|
||||
<ul>
|
||||
{% for page in pages.0.get_siblings %}
|
||||
{% if page.public and not page.exclude_from_navigation %}
|
||||
<li data-menu-page-id="{{ page.id }}"
|
||||
{% if page.slug == pages.0.slug %}title="{{page.title}} - Page active"{% endif %}
|
||||
class="menu-{{ page.slug }}
|
||||
{% if page.slug == pages.0.slug %}selected{% endif %}"
|
||||
>{% if page.slug != 'mon-compte' %}<a href="{% page_absolute_url page %}"><span>{{ page.title }}</span></a>{% else %}
|
||||
{% skeleton_extra_placeholder "user-nav-link" %}{% if user.is_authenticated %}<a href="{{portal_url}}mon-compte/"><span>{{user.first_name}}</span></a>
|
||||
<ul>
|
||||
<li><a href="{{portal_url}}mon-compte/">Mon compte</a></li>
|
||||
<li><a href="{% url 'auth_logout' %}">Me déconnecter</a></li>
|
||||
</ul>
|
||||
{% else %}<a href="/login"><span>Se connecter</span></a>{% endif %}{% end_skeleton_extra_placeholder %}{% endif %}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endspaceless %}
|
||||
{% endblock %}
|
||||
|
||||
{% block banner %}
|
||||
{% skeleton_extra_placeholder banner %}
|
||||
{% end_skeleton_extra_placeholder %}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
{% extends "includes/nav.html" %}
|
||||
{% load combo gadjo %}
|
||||
|
||||
{% block menu %}
|
||||
{# replace last menu item by user name #}
|
||||
{% spaceless %}
|
||||
<ul>
|
||||
{% for page in pages.0.get_siblings %}
|
||||
{% if page.public and not page.exclude_from_navigation %}
|
||||
<li data-menu-page-id="{{ page.id }}"
|
||||
{% if page.slug == pages.0.slug %}title="{{page.title}} - Page active"{% endif %}
|
||||
class="menu-{{ page.slug }}
|
||||
{% if page.slug == pages.0.slug %}selected{% endif %}"
|
||||
>{% if page.slug != 'mon-compte' %}<a href="{% page_absolute_url page %}"><span>{{ page.title }}</span></a>{% else %}
|
||||
{% skeleton_extra_placeholder "user-nav-link" %}{% if user.is_authenticated %}<a href="{{portal_url}}mon-compte/"><span>{{user.first_name}}</span></a>
|
||||
<ul>
|
||||
<li><a href="{{portal_url}}mon-compte/">Mon compte</a></li>
|
||||
<li><a href="{% url 'auth_logout' %}">Me déconnecter</a></li>
|
||||
</ul>
|
||||
{% else %}<a href="/login"><span>Se connecter</span></a>{% endif %}{% end_skeleton_extra_placeholder %}{% endif %}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endspaceless %}
|
||||
{% endblock %}
|
Loading…
Reference in New Issue