{% 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>
            <span>Jumpserver</span>
        </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 () {
        console.log("Set to No");
        delCookie(cookieName);
        setCookie(cookieName, "No");
        window.location = "/"
    }, 100);
})
</script>
