{% load static %}
{% load i18n %}
<li class="nav-header">
    <div class="dropdown profile-element">
        <div>
            <img alt="image" height="40" src="/static/img/logo.png"/>
        </div>
        <div>
            <a href="http://www.jumpserver.org" target="_blank">Jumpserver</a>
        </div>
    </div>
    <div class="clearfix"></div>
    <div class="logo-element">
        <img alt="image" height="40" src="/static/img/logo.png"/>
    </div>
</li>
<script>
$(document).ready(function () {
})
.on('click', '#switch_admin', function () {
    var cookieName = "IN_ADMIN_PAGE";
    setTimeout(function () {
        delCookie(cookieName);
        setCookie(cookieName, "Yes");
        window.location = "/"
    }, 100)
})
.on('click', '#switch_user', function () {
    var cookieName = "IN_ADMIN_PAGE";
    setTimeout(function () {
        delCookie(cookieName);
        setCookie(cookieName, "No");
        window.location = "{% url 'assets:user-asset-list' %}"
    }, 100);
})
</script>
