2016-08-09 06:42:21 +00:00
|
|
|
{% load static %}
|
2016-09-03 16:51:36 +00:00
|
|
|
{% load i18n %}
|
2016-08-09 06:42:21 +00:00
|
|
|
<li class="nav-header">
|
2018-07-26 10:27:09 +00:00
|
|
|
<div class="profile-element" style="height: 65px">
|
|
|
|
<div href="http://www.jumpserver.org" target="_blank" style="width: 100%; background-image: url({% static 'img/header-profile.png' %})">
|
2019-04-02 08:25:39 +00:00
|
|
|
<img alt="logo" height="55" width="185" style="margin-right: 5px" src="{{ LOGO_TEXT_URL }}"/>
|
2018-01-02 09:07:00 +00:00
|
|
|
</div>
|
2016-08-09 06:42:21 +00:00
|
|
|
</div>
|
|
|
|
<div class="logo-element">
|
2019-03-27 04:20:43 +00:00
|
|
|
<img alt="image" height="40" src="{{ LOGO_URL }}"/>
|
2018-07-26 10:27:09 +00:00
|
|
|
</div>
|
2018-07-27 10:56:40 +00:00
|
|
|
{% if ADMIN_ORGS and request.COOKIES.IN_ADMIN_PAGE != 'No' %}
|
|
|
|
{% if ADMIN_ORGS|length > 1 or not CURRENT_ORG.is_default %}
|
2019-07-01 03:21:26 +00:00
|
|
|
<div>
|
2018-07-27 10:56:40 +00:00
|
|
|
<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false" style="display: block; background-color: transparent; color: #8095a8; padding: 14px 20px 14px 25px">
|
|
|
|
<i class="fa fa-bookmark" style="width: 14px; "></i>
|
|
|
|
<span class="nav-label" style="padding-left: 7px">
|
|
|
|
{{ CURRENT_ORG.name }}
|
|
|
|
</span>
|
|
|
|
<span class="fa fa-sort-desc pull-right"></span>
|
|
|
|
</a>
|
2019-07-01 03:21:26 +00:00
|
|
|
<ul class="dropdown-menu" style="min-width: 220px">
|
2018-07-27 10:56:40 +00:00
|
|
|
{% for org in ADMIN_ORGS %}
|
|
|
|
<li>
|
2019-07-01 03:21:26 +00:00
|
|
|
<a class="org-dropdown" href="{% url 'orgs:org-switch' pk=org.id %}" data-id="{{ org.id }}">
|
2018-07-27 10:56:40 +00:00
|
|
|
{{ org.name }}
|
|
|
|
{% if org.id == CURRENT_ORG.id %}
|
2019-07-01 03:21:26 +00:00
|
|
|
<span class="fa fa-circle" style="padding-top: 5px; color: #1ab394"></span>
|
2018-07-27 10:56:40 +00:00
|
|
|
{% endif %}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-07-26 10:27:09 +00:00
|
|
|
{% endif %}
|
2016-08-09 06:42:21 +00:00
|
|
|
</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");
|
2018-01-09 05:10:28 +00:00
|
|
|
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>
|