From a48fb9de8d3531d0825e08e0603c2919261e4fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=B9=BF?= Date: Thu, 26 Jul 2018 05:27:09 -0500 Subject: [PATCH] Tmp org (#1596) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Update] 修改index view * [Update] 修改nav * [Update] 修改profile --- apps/jumpserver/views.py | 4 ++-- apps/static/css/jumpserver.css | 4 ++-- apps/static/img/header-profile.png | Bin 0 -> 5877 bytes apps/templates/_nav.html | 16 ------------- apps/templates/_user_profile.html | 35 ++++++++++++++++++++++++----- 5 files changed, 34 insertions(+), 25 deletions(-) create mode 100755 apps/static/img/header-profile.png diff --git a/apps/jumpserver/views.py b/apps/jumpserver/views.py index c2915ae0d..474eaf829 100644 --- a/apps/jumpserver/views.py +++ b/apps/jumpserver/views.py @@ -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(): diff --git a/apps/static/css/jumpserver.css b/apps/static/css/jumpserver.css index cf570c4ad..13b58ac25 100644 --- a/apps/static/css/jumpserver.css +++ b/apps/static/css/jumpserver.css @@ -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; } diff --git a/apps/static/img/header-profile.png b/apps/static/img/header-profile.png new file mode 100755 index 0000000000000000000000000000000000000000..7dea7f2c76294013243f4956526a0409e82da9d2 GIT binary patch literal 5877 zcmVKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e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j` zaZ6(8$x~%6r=BY$l!5@s&lNo~Y_}HTkROpqG~aY5l0jUjDW!0U$FHggA%vkyK15!f z0T~4&*>?uzV_R9jkciXit!+BWa)}F`6_Xu<6J-sKWe-F$mp$Q_Rr;bb ziL$T0VJ;ikZYp{4m?n9Yn8;jWo9k+_x1gKFvaZ!GD0tCs<^Kl&vgl>DMwzen00000 LNkvXXu0mjf-K0Pr literal 0 HcmV?d00001 diff --git a/apps/templates/_nav.html b/apps/templates/_nav.html index a792beb48..772c9db78 100644 --- a/apps/templates/_nav.html +++ b/apps/templates/_nav.html @@ -1,20 +1,4 @@ {% load i18n %} -{% if ADMIN_ORGS and ADMIN_ORGS|length > 1 %} -
  • - - -
  • -
    -{% endif %}
  • {% trans 'Dashboard' %} diff --git a/apps/templates/_user_profile.html b/apps/templates/_user_profile.html index d7525958b..6717fa771 100644 --- a/apps/templates/_user_profile.html +++ b/apps/templates/_user_profile.html @@ -1,15 +1,40 @@ {% load static %} {% load i18n %}