jumpserver/apps/templates/_user_profile.html

34 lines
985 B
HTML
Raw Normal View History

{% load static %}
2016-09-03 16:51:36 +00:00
{% load i18n %}
<li class="nav-header">
<div class="dropdown profile-element">
2018-01-22 15:47:41 +00:00
<div href="http://www.jumpserver.org" target="_blank">
2018-03-06 09:05:36 +00:00
<img alt="logo" height="55" width="185" src="/static/img/logo-text.png" style="margin-left: 20px"/>
2018-01-02 09:07:00 +00:00
</div>
</div>
2018-01-02 09:07:00 +00:00
<div class="clearfix"></div>
<div class="logo-element">
2018-01-02 09:31:20 +00:00
<img alt="image" height="40" src="/static/img/logo.png"/>
</div>
</li>
2017-12-21 03:31:13 +00:00
<script>
$(document).ready(function () {
})
.on('click', '#switch_admin', function () {
2018-01-02 09:02:03 +00:00
var cookieName = "IN_ADMIN_PAGE";
2017-12-31 13:51:25 +00:00
setTimeout(function () {
2018-01-02 09:02:03 +00:00
delCookie(cookieName);
setCookie(cookieName, "Yes");
2017-12-31 13:51:25 +00:00
window.location = "/"
}, 100)
2017-12-21 03:31:13 +00:00
})
.on('click', '#switch_user', function () {
2018-01-02 09:02:03 +00:00
var cookieName = "IN_ADMIN_PAGE";
2017-12-31 13:51:25 +00:00
setTimeout(function () {
2018-01-02 09:02:03 +00:00
delCookie(cookieName);
setCookie(cookieName, "No");
window.location = "{% url 'assets:user-asset-list' %}"
2017-12-31 13:51:25 +00:00
}, 100);
2017-12-21 03:31:13 +00:00
})
</script>