|
10 | 10 | <!-- Bootstrap 3.3.6 --> |
11 | 11 | <link rel="stylesheet" href={% static "admin/bootstrap/css/bootstrap.min.css" %}> |
12 | 12 | <!-- Font Awesome --> |
13 | | - <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.5.0/css/font-awesome.min.css"> |
| 13 | + <!--<link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.5.0/css/font-awesome.min.css">--> |
| 14 | + <link rel="stylesheet" href={% static "admin/font-awesome/css/font-awesome.min.css" %}> |
14 | 15 | <!-- Ionicons --> |
15 | | - <link rel="stylesheet" href="//cdn.bootcss.com/ionicons/2.0.1/css/ionicons.min.css"> |
| 16 | + <link rel="stylesheet" href={% static "admin/ionicons/ionicons.min.css" %}> |
| 17 | + |
16 | 18 | {% block extrastyle %} {% endblock %} |
17 | 19 |
|
18 | 20 | {% block extrahead %} {% endblock %} |
19 | 21 | <!-- Theme style --> |
20 | 22 | <link rel="stylesheet" href={% static "admin/dist/css/AdminLTE.min.css" %}> |
21 | 23 | <!-- AdminLTE Skins. Choose a skin from the css/skins |
22 | 24 | folder instead of downloading all of them to reduce the load. --> |
| 25 | + {% if adminlte.skin %} |
| 26 | + <link rel="stylesheet" href={% static "admin/dist/css/skins/skin-"|add:adminlte.skin|add:".min.css" %}> |
| 27 | + {% else %} |
23 | 28 | <link rel="stylesheet" href={% static "admin/dist/css/skins/_all-skins.min.css" %}> |
| 29 | + {% endif %} |
| 30 | + |
| 31 | + <link rel="stylesheet" href={% static "admin/dist/css/django.css" %}> |
| 32 | + |
| 33 | + <link rel="apple-touch-icon" href="/{{ adminlte_site_logo.site_logo }}"> |
| 34 | + <link rel="icon" href="/{{ adminlte_site_logo.site_logo }}"> |
24 | 35 |
|
25 | 36 | <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> |
26 | 37 | <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> |
|
30 | 41 | <![endif]--> |
31 | 42 |
|
32 | 43 | </head> |
33 | | -<body class="hold-transition skin-blue sidebar-mini fixed"> |
| 44 | +<body class="hold-transition skin-{% if adminlte.skin %}{{ adminlte.skin }}{% else %}blue{% endif %} sidebar-mini fixed"> |
34 | 45 |
|
35 | 46 | <div class="wrapper"> |
36 | 47 | {% if not is_popup %} |
|
173 | 184 | </li> |
174 | 185 | <!-- Control Sidebar Toggle Button --> |
175 | 186 | <li> |
| 187 | + {% if adminlte.demo %} |
176 | 188 | <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a> |
| 189 | + {% endif %} |
177 | 190 | </li> |
178 | 191 | </ul> |
179 | 192 | </div> |
|
202 | 215 | </div> |
203 | 216 | {% endif %} |
204 | 217 | <!-- search form --> |
| 218 | + {% if adminlte.search_form %} |
205 | 219 | <form action="#" method="get" class="sidebar-form"> |
206 | 220 | <div class="input-group"> |
207 | 221 | <input type="text" name="q" class="form-control" placeholder="{% trans 'Search' %}..."> |
|
211 | 225 | </span> |
212 | 226 | </div> |
213 | 227 | </form> |
| 228 | + {% endif %} |
214 | 229 | <!-- /.search form --> |
215 | 230 | <!-- sidebar menu: : style can be found in sidebar.less --> |
216 | 231 | <ul class="sidebar-menu"> |
217 | | - <li class="header">{% trans 'MAIN NAVIGATION' %}</li> |
218 | | - <li> |
219 | | - <a id="adminIndex" href="{% url 'admin:index' %}"> |
220 | | - <i class="fa fa-dashboard"></i> <span>{% trans 'Dashboard' %}</span> |
221 | | - </a> |
222 | | - </li> |
223 | | - {% get_menu request as app_list %} |
224 | | - {% if app_list %} |
225 | | - {% for app in app_list %} |
226 | | - <li {% if not app.admin_url %}class="treeview"{% endif %}> |
227 | | - <a href="{% if app.admin_url %}{{app.admin_url}}{% else %}javascript:void(0){% endif %}"> |
228 | | - <i class="fa {% if app.icon %} {{app.icon}} {% else %}fa-database{% endif %}"></i> |
229 | | - <span style="overflow: hidden; display: inline-block; vertical-align:top;">{{ app.name }}</span> |
230 | | - {% if not app.admin_url %} |
231 | | - <span class="pull-right-container"> |
232 | | - <i class="fa fa-angle-left pull-right"></i> |
233 | | - </span> |
| 232 | + |
| 233 | + <li class="header">{% trans 'MAIN NAVIGATION' %}</li> |
| 234 | + <li> |
| 235 | + <a id="adminIndex" href="{% url 'admin:index' %}"> |
| 236 | + <i class="fa fa-dashboard"></i> <span>{% trans 'Dashboard' %}</span> |
| 237 | + </a> |
| 238 | + </li> |
| 239 | + |
| 240 | + {% if adminlte.main_navigation_app %} |
| 241 | + |
| 242 | + {% get_menu request as app_list %} |
| 243 | + {% if app_list %} |
| 244 | + {% for app in app_list %} |
| 245 | + {% if app.app_label == adminlte.main_navigation_app %} |
| 246 | + {% for model in app.models %} |
| 247 | + {% if model.admin_url %} |
| 248 | + <li> |
| 249 | + <a href="{{ model.admin_url }}"> |
| 250 | + <i class="fa {% if model.icon %} {{model.icon}} {% else %}fa-circle-o{% endif %}"></i> <span>{{ model.name }}</span> |
| 251 | + </a> |
| 252 | + </li> |
| 253 | + {% endif %} |
| 254 | + {% endfor %} |
| 255 | + {% endif %} |
| 256 | + {% endfor %} |
234 | 257 | {% endif %} |
235 | | - </a> |
236 | | - {% if not app.admin_url %} |
237 | | - <ul class="treeview-menu"> |
| 258 | + |
| 259 | + {% endif %} |
| 260 | + |
| 261 | + {% if adminlte.navigation_expanded %} |
| 262 | + |
| 263 | + {% get_menu request as app_list %} |
| 264 | + {% if app_list %} |
| 265 | + {% for app in app_list %} |
| 266 | + {% if not adminlte.show_apps or adminlte.show_apps and app.app_label in adminlte.show_apps %} |
| 267 | + {% if app.app_label != adminlte.main_navigation_app %} |
| 268 | + <li class="header">{{ app.name|upper }}</li> |
238 | 269 | {% for model in app.models %} |
| 270 | + {% ifchanged %} |
239 | 271 | {% if model.admin_url %} |
240 | | - <li><a href="{{ model.admin_url }}" ><i class="fa {% if model.icon %} {{model.icon}} {% else %}fa-circle-o{% endif %}"></i>{{ model.name }}</a></li> |
| 272 | + <li> |
| 273 | + <a href="{{ model.admin_url }}"> |
| 274 | + <i class="fa {% if model.icon %} {{model.icon}} {% else %}fa-circle-o{% endif %}"></i> <span>{{ model.name }}</span> |
| 275 | + </a> |
| 276 | + </li> |
241 | 277 | {% endif %} |
| 278 | + {% endifchanged %} |
242 | 279 | {% endfor %} |
243 | | - </ul> |
| 280 | + {% endif %} |
| 281 | + {% endif %} |
| 282 | + {% endfor %} |
| 283 | + {% endif %} |
| 284 | + |
| 285 | + {% else %} |
| 286 | + |
| 287 | + {% get_menu request as app_list %} |
| 288 | + {% if app_list %} |
| 289 | + {% for app in app_list %} |
| 290 | + {% if not adminlte.show_apps or adminlte.show_apps and app.app_label in adminlte.show_apps %} |
| 291 | + {% if app.app_label != adminlte.main_navigation_app %} |
| 292 | + <li {% if not app.admin_url %}class="treeview"{% endif %}> |
| 293 | + <a href="{% if app.admin_url %}{{app.admin_url}}{% else %}javascript:void(0){% endif %}"> |
| 294 | + <i class="fa {% if app.icon %} {{app.icon}} {% else %}fa-database{% endif %}"></i> |
| 295 | + <span style="overflow: hidden; display: inline-block; vertical-align:top;">{{ app.name }}</span> |
| 296 | + {% if not app.admin_url %} |
| 297 | + <span class="pull-right-container"> |
| 298 | + <i class="fa fa-angle-left pull-right"></i> |
| 299 | + </span> |
| 300 | + {% endif %} |
| 301 | + </a> |
| 302 | + {% if not app.admin_url %} |
| 303 | + <ul class="treeview-menu"> |
| 304 | + {% for model in app.models %} |
| 305 | + {% if model.admin_url %} |
| 306 | + <li><a href="{{ model.admin_url }}" ><i class="fa {% if model.icon %} {{model.icon}} {% else %}fa-circle-o{% endif %}"></i>{{ model.name }}</a></li> |
| 307 | + {% endif %} |
| 308 | + {% endfor %} |
| 309 | + </ul> |
| 310 | + {% endif %} |
| 311 | + </li> |
| 312 | + {% endif %} |
| 313 | + {% endif %} |
| 314 | + {% endfor %} |
244 | 315 | {% endif %} |
245 | | - </li> |
246 | | - {% endfor %} |
| 316 | + |
247 | 317 | {% endif %} |
248 | | - <!--{% if request.user.is_superuser %}--> |
249 | | - <!--<li class="treeview">--> |
250 | | - <!--<a href="#">--> |
251 | | - <!--<i class="fa fa-cog"></i>--> |
252 | | - <!--<span>{% trans 'System manage' %}</span>--> |
253 | | - <!--<span class="pull-right-container">--> |
254 | | - <!--<i class="fa fa-angle-left pull-right"></i>--> |
255 | | - <!--</span>--> |
256 | | - <!--</a>--> |
257 | | - <!--<ul class="treeview-menu">--> |
258 | | - <!--<li><a href="" ><i class="fa fa-file-text-o"></i>{% trans 'Log manage' %}</a></li>--> |
259 | | - <!--<li><a href="/admin/config/system/" ><i class="fa fa-wrench"></i>{% trans 'System config' %}</a></li>--> |
260 | | - <!--</ul>--> |
261 | | - <!--</li>--> |
262 | | - <!--{% endif %}--> |
263 | | - |
264 | | - <!--<li class="header">LABELS</li>--> |
265 | | - <!--<li><a href="#"><i class="fa fa-circle-o text-red"></i> <span>{% trans 'Important' %}</span></a></li>--> |
266 | | - <!--<li><a href="#"><i class="fa fa-circle-o text-yellow"></i> <span>{% trans 'Warning' %}</span></a></li>--> |
267 | | - <!--<li><a href="#"><i class="fa fa-circle-o text-aqua"></i> <span>{% trans 'Information' %}</span></a></li>--> |
268 | 318 | </ul> |
269 | 319 | </section> |
270 | 320 | <!-- /.sidebar --> |
@@ -497,7 +547,9 @@ <h3 class="control-sidebar-heading">Chat Settings</h3> |
497 | 547 | <!-- AdminLTE App --> |
498 | 548 | <script src={% static "admin/dist/js/app.min.js" %}></script> |
499 | 549 | <!-- AdminLTE for demo purposes --> |
| 550 | +{% if adminlte.demo %} |
500 | 551 | <script src={% static "admin/dist/js/demo.js" %}></script> |
| 552 | +{% endif %} |
501 | 553 | <script> |
502 | 554 | // use js control active status of siderbar-menu |
503 | 555 | $(function() { |
|
0 commit comments