mirror of https://github.com/jumpserver/jumpserver
parent
04e7f54c69
commit
a48fb9de8d
|
@ -21,10 +21,10 @@ class IndexView(AdminUserRequiredMixin, TemplateView):
|
|||
session_month_dates = []
|
||||
session_month_dates_archive = []
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
if not request.user.is_org_admin:
|
||||
return redirect('assets:user-asset-list')
|
||||
return super(IndexView, self).get(request, *args, **kwargs)
|
||||
return super(IndexView, self).dispatch(request, *args, **kwargs)
|
||||
|
||||
@staticmethod
|
||||
def get_user_count():
|
||||
|
|
|
@ -335,13 +335,13 @@ div.dataTables_wrapper div.dataTables_filter {
|
|||
|
||||
.nav-header, body.mini-navbar .nav-header {
|
||||
padding: 0;
|
||||
background: #202c37;
|
||||
/*background: #202c37;*/
|
||||
}
|
||||
|
||||
.profile-element div:first-child {
|
||||
line-height: 60px;
|
||||
/*width: 70px;*/
|
||||
float: left;
|
||||
/*float: left;*/
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
|
@ -1,20 +1,4 @@
|
|||
{% load i18n %}
|
||||
{% if ADMIN_ORGS and ADMIN_ORGS|length > 1 %}
|
||||
<li id="org">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fa fa-star" style="width: 14px"></i> <span class="nav-label">{{ CURRENT_ORG.name }}</span>
|
||||
<span class="fa fa-caret-down arrow"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
{% for org in ADMIN_ORGS %}
|
||||
{% if org.id != CURRENT_ORG.id %}
|
||||
<li><a class="org-dropdown" href="{% url 'orgs:org-switch' pk=org.id %}" data-id="{{ org.id }}">{{ org.name }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
<hr>
|
||||
{% endif %}
|
||||
<li id="index">
|
||||
<a href="{% url 'index' %}">
|
||||
<i class="fa fa-dashboard" style="width: 14px"></i> <span class="nav-label">{% trans 'Dashboard' %}</span>
|
||||
|
|
|
@ -1,15 +1,40 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
<li class="nav-header">
|
||||
<div class="dropdown profile-element">
|
||||
<div href="http://www.jumpserver.org" target="_blank">
|
||||
<img alt="logo" height="55" width="185" src="/static/img/logo-text.png" style="margin-left: 20px"/>
|
||||
<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' %})">
|
||||
<img alt="logo" height="55" width="185" src="/static/img/logo-text.png"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
{# <div class="clearfix"></div>#}
|
||||
<div class="logo-element">
|
||||
<img alt="image" height="40" src="/static/img/logo.png"/>
|
||||
<img alt="image" height="40px" src="/static/img/logo.png"/>
|
||||
</div>
|
||||
{% if ADMIN_ORGS and ADMIN_ORGS|length != 1 %}
|
||||
<div style="height: 55px;">
|
||||
<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">
|
||||
{% trans 'Org' %} - {{ CURRENT_ORG.name }}
|
||||
</span>
|
||||
<span class="fa fa-sort-desc pull-right"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" style="width: 219px;">
|
||||
{% for org in ADMIN_ORGS %}
|
||||
<li>
|
||||
<a class="org-dropdown"
|
||||
href="{% url 'orgs:org-switch' pk=org.id %}"
|
||||
data-id="{{ org.id }}">
|
||||
{{ org.name }}
|
||||
{% if org.id == CURRENT_ORG.id %}
|
||||
<span class="fa fa-circle pull-right" style="padding-top: 5px; color: #1ab394"></span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</li>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
|
Loading…
Reference in New Issue