[TELE-1393] add nav hak for iA.citizen (nav el replaced by connected user full name)
This commit is contained in:
parent
129be22630
commit
7f1f31d10b
|
@ -0,0 +1,20 @@
|
|||
{% extends "includes/nav.html" %}
|
||||
|
||||
{% block menu %}
|
||||
{{ block.super }}
|
||||
{# replace "mon-compte" menu item by user name #}
|
||||
{% if ia_citizen %}
|
||||
{% skeleton_extra_placeholder "user-script-infos" %}
|
||||
<script>
|
||||
var $last_menu_item = $('#nav > ul > li.menu-connexion');
|
||||
{% if user.is_authenticated %}
|
||||
$last_menu_item.find('> a span').text("{{ user.first_name|escapejs }} {{ user.last_name|escapejs }}");
|
||||
{% else %}
|
||||
$last_menu_item.find('> a').attr('href', '/login/');
|
||||
$last_menu_item.find('ul').remove();
|
||||
{% endif %}
|
||||
$('#nav ul ul').parent('li').addClass('has-submenu');
|
||||
</script>
|
||||
{% end_skeleton_extra_placeholder %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
Loading…
Reference in New Issue