Skip to content

Commit 8a1fad6

Browse files
committed
fix
1 parent 8de0ee5 commit 8a1fad6

File tree

1 file changed

+28
-45
lines changed

1 file changed

+28
-45
lines changed

adminlteui/templates/admin/base.html

Lines changed: 28 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
33

44
{% get_adminlte_settings as adminlte %}
5-
{% get_adminlte_option 'site_logo' as adminlte_site_logo %}
5+
{% get_adminlte_option 'site_logo' as adminlte_site_logo %}
66

77
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
88
<head>
@@ -49,8 +49,7 @@
4949
<!-- Google Font -->
5050
<link rel="stylesheet" href={% static "admin/dist/css/fontgoogle.css" %}>
5151
</head>
52-
<body class="hold-transition skin-
53-
{% if adminlte.skin %}{{ adminlte.skin }}{% else %}blue{% endif %} sidebar-mini fixed">
52+
<body class="hold-transition skin-{% if adminlte.skin %}{{ adminlte.skin }}{% else %}blue{% endif %} sidebar-mini fixed">
5453
<div class="wrapper">
5554
{% if not is_popup %}
5655
<header class="main-header">
@@ -59,24 +58,20 @@
5958
<!-- mini logo for sidebar mini 50x50 pixels -->
6059
<span class="logo-mini">
6160
{% if adminlte_site_logo.valid %}
62-
<img src="{{ adminlte_site_logo.site_logo }}" class="user-image" alt="User Image"
63-
style="width:45px;height:45px;padding:5px;">
61+
<img src="{{ adminlte_site_logo.site_logo }}" class="user-image" alt="User Image" style="width:45px;height:45px;padding:5px;">
6462
{% else %}
65-
<img src={% static "admin/dist/img/default-log.svg" %} class="user-image" alt="User Image"
66-
style="width:45px;height:45px;padding:5px;">
63+
<img src={% static "admin/dist/img/default-log.svg" %} class="user-image" alt="User Image" style="width:45px;height:45px;padding:5px;">
6764
{% endif %}
6865
</span>
6966
<!-- logo for regular state and mobile devices -->
7067
<span class="logo-lg">
7168
{% if adminlte_site_logo.valid %}
72-
<img src="{{ adminlte_site_logo.site_logo }}" class="user-image" alt="User Image"
73-
style="width:45px;height:45px;padding:5px;">
69+
<img src="{{ adminlte_site_logo.site_logo }}" class="user-image" alt="User Image" style="width:45px;height:45px;padding:5px;">
7470
{% else %}
75-
<img src={% static "admin/dist/img/default-log.svg" %} class="user-image" alt="User Image"
76-
style="width:45px;height:45px;padding:5px;">
71+
<img src={% static "admin/dist/img/default-log.svg" %} class="user-image" alt="User Image" style="width:45px;height:45px;padding:5px;">
7772
{% endif %}
7873
<b>
79-
{% get_adminlte_option 'site_header' as adminlte_site_header %}
74+
{% get_adminlte_option 'site_header' as adminlte_site_header %}
8075
{% if adminlte_site_header.valid %}
8176
{{ adminlte_site_header.site_header }}
8277
{% else %}
@@ -99,7 +94,7 @@
9994
{% for app in app_list %}
10095
<li class="dropdown user user-menu">
10196
<a href="{{ app.admin_url }}">
102-
<i class="fa {% if app.icon %} {{ app.icon }} {% else %}fa-database{% endif %}"></i>
97+
<i class="fa {% if app.icon %} {{app.icon}} {% else %}fa-database{% endif %}"></i>
10398
{{ app.name }}</a>
10499
</li>
105100
{% endfor %}
@@ -112,31 +107,27 @@
112107
<!-- User Account: style can be found in dropdown.less -->
113108
<li class="dropdown user user-menu">
114109
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
115-
{% get_adminlte_option 'show_avatar' as adminlte_show_avatar %}
110+
{% get_adminlte_option 'show_avatar' as adminlte_show_avatar %}
116111
{% if adminlte_show_avatar.valid and adminlte_show_avatar.show_avatar == 'on' %}
117-
{% get_adminlte_option 'avatar_field' request as adminlte_avatar_field %}
112+
{% get_adminlte_option 'avatar_field' request as adminlte_avatar_field %}
118113
{% if adminlte_avatar_field.valid and adminlte_avatar_field.avatar_field %}
119-
<img src="{{ adminlte_avatar_field.avatar_field }}" class="user-image"
120-
alt="User Image" style="width: 25px; height:25px;">
114+
<img src="{{ adminlte_avatar_field.avatar_field }}" class="user-image" alt="User Image" style="width: 25px; height:25px;">
121115
{% else %}
122-
<img src={% static "admin/dist/img/default.jpg" %} class="user-image"
123-
alt="User Image">
116+
<img src={% static "admin/dist/img/default.jpg" %} class="user-image" alt="User Image">
124117
{% endif %}
125118
{% endif %}
126119
<span class="hidden-xs">{{ request.user.username }}</span>
127120
</a>
128121
<ul class="dropdown-menu">
129122
<!-- User image -->
130-
{% get_adminlte_option 'show_avatar' as adminlte_show_avatar %}
123+
{% get_adminlte_option 'show_avatar' as adminlte_show_avatar %}
131124
{% if adminlte_show_avatar.valid and adminlte_show_avatar.show_avatar == 'on' %}
132125
<li class="user-header">
133-
{% get_adminlte_option 'avatar_field' request as adminlte_avatar_field %}
126+
{% get_adminlte_option 'avatar_field' request as adminlte_avatar_field %}
134127
{% if adminlte_avatar_field.valid and adminlte_avatar_field.avatar_field %}
135-
<img src="{{ adminlte_avatar_field.avatar_field }}" class="img-circle"
136-
alt="User Image" style="width: 90px; height:90px;">
128+
<img src="{{ adminlte_avatar_field.avatar_field }}" class="img-circle" alt="User Image" style="width: 90px; height:90px;">
137129
{% else %}
138-
<img src={% static "admin/dist/img/default.jpg" %} class="img-circle"
139-
alt="User Image">
130+
<img src={% static "admin/dist/img/default.jpg" %} class="img-circle" alt="User Image">
140131
{% endif %}
141132
<p>
142133
{{ request.user.username }} -
@@ -188,12 +179,10 @@
188179
<!-- Menu Footer-->
189180
<li class="user-footer">
190181
<div class="pull-left">
191-
<a href="{% url 'admin:password_change' %}"
192-
class="btn btn-default btn-flat">{% trans 'Change password' %}</a>
182+
<a href="{% url 'admin:password_change' %}" class="btn btn-default btn-flat">{% trans 'Change password' %}</a>
193183
</div>
194184
<div class="pull-right">
195-
<a href="{% url 'admin:logout' %}"
196-
class="btn btn-default btn-flat">{% trans 'Log out' %}</a>
185+
<a href="{% url 'admin:logout' %}" class="btn btn-default btn-flat">{% trans 'Log out' %}</a>
197186
</div>
198187
</li>
199188
</ul>
@@ -213,11 +202,11 @@
213202
<!-- sidebar: style can be found in sidebar.less -->
214203
<section class="sidebar">
215204
<!-- Sidebar user panel -->
216-
{% get_adminlte_option 'show_avatar' as adminlte_show_avatar %}
205+
{% get_adminlte_option 'show_avatar' as adminlte_show_avatar %}
217206
{% if adminlte_show_avatar.valid and adminlte_show_avatar.show_avatar == 'on' %}
218207
<div class="user-panel">
219208
<div class="pull-left image">
220-
{% get_adminlte_option 'avatar_field' request as adminlte_avatar_field %}
209+
{% get_adminlte_option 'avatar_field' request as adminlte_avatar_field %}
221210
{% if adminlte_avatar_field.valid and adminlte_avatar_field.avatar_field %}
222211
<img src="{{ adminlte_avatar_field.avatar_field }}" class="img-circle" alt="User Image">
223212
{% else %}
@@ -263,8 +252,7 @@
263252
{% if model.admin_url %}
264253
<li>
265254
<a href="{{ model.admin_url }}">
266-
<i class="fa {% if model.icon %} {{ model.icon }} {% else %}fa-circle-o{% endif %}"></i>
267-
<span>{{ model.name }}</span>
255+
<i class="fa {% if model.icon %} {{model.icon}} {% else %}fa-circle-o{% endif %}"></i> <span>{{ model.name }}</span>
268256
</a>
269257
</li>
270258
{% endif %}
@@ -288,8 +276,7 @@
288276
{% if model.admin_url %}
289277
<li>
290278
<a href="{{ model.admin_url }}">
291-
<i class="fa {% if model.icon %} {{ model.icon }} {% else %}fa-circle-o{% endif %}"></i>
292-
<span>{{ model.name }}</span>
279+
<i class="fa {% if model.icon %} {{model.icon}} {% else %}fa-circle-o{% endif %}"></i> <span>{{ model.name }}</span>
293280
</a>
294281
</li>
295282
{% endif %}
@@ -308,9 +295,8 @@
308295
{% if not adminlte.show_apps or adminlte.show_apps and not app.app_label or app.app_label in adminlte.show_apps %}
309296
{% if not app.app_label or app.app_label != adminlte.main_navigation_app %}
310297
<li {% if not app.admin_url %}class="treeview"{% endif %}>
311-
<a href="
312-
{% if app.admin_url %}{{ app.admin_url }}{% else %}javascript:void(0){% endif %}">
313-
<i class="fa {% if app.icon %} {{ app.icon }} {% else %}fa-database{% endif %}"></i>
298+
<a href="{% if app.admin_url %}{{app.admin_url}}{% else %}javascript:void(0){% endif %}">
299+
<i class="fa {% if app.icon %} {{app.icon}} {% else %}fa-database{% endif %}"></i>
314300
<span style="overflow: hidden; display: inline-block; vertical-align:top;">{{ app.name }}</span>
315301
{% if not app.admin_url %}
316302
<span class="pull-right-container">
@@ -322,9 +308,7 @@
322308
<ul class="treeview-menu">
323309
{% for model in app.models %}
324310
{% if model.admin_url %}
325-
<li><a href="{{ model.admin_url }}"><i
326-
class="fa {% if model.icon %} {{ model.icon }} {% else %}fa-circle-o{% endif %}"></i>{{ model.name }}
327-
</a></li>
311+
<li><a href="{{ model.admin_url }}" ><i class="fa {% if model.icon %} {{model.icon}} {% else %}fa-circle-o{% endif %}"></i>{{ model.name }}</a></li>
328312
{% endif %}
329313
{% endfor %}
330314
</ul>
@@ -534,8 +518,7 @@ <h3 class="control-sidebar-heading">Chat Settings</h3>
534518
<div class="form-group">
535519
<label class="control-sidebar-subheading">
536520
Delete chat history
537-
<a href="javascript:void(0)" class="text-red pull-right"><i
538-
class="fa fa-trash-o"></i></a>
521+
<a href="javascript:void(0)" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
539522
</label>
540523
</div>
541524
<!-- /.form-group -->
@@ -574,7 +557,7 @@ <h3 class="control-sidebar-heading">Chat Settings</h3>
574557
{% endif %}
575558
<script>
576559
// use js control active status of siderbar-menu
577-
$(function () {
560+
$(function() {
578561
var menuActions = document.querySelectorAll('.sidebar-menu a')
579562
for (var i in menuActions) {
580563
var pathname = document.querySelector('#adminIndex').pathname
@@ -586,7 +569,7 @@ <h3 class="control-sidebar-heading">Chat Settings</h3>
586569
}
587570

588571
if (window.location.href.indexOf(menuActions[i].href) !== -1) {
589-
if (menuActions[i].href === window.location.origin + pathname) {
572+
if (menuActions[i].href===window.location.origin + pathname) {
590573
continue
591574
}
592575
console.log('menu matched.', window.location.href, menuActions[i].href);

0 commit comments

Comments
 (0)