forked from weihxa/Aclsm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.html
208 lines (185 loc) · 8.31 KB
/
base.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{% block titel %}XBMAN | 统一登录{% endblock %}</title>
<link rel="icon" href="/static/dist/img/icon.png" mce_href="dist/img/icon.png" type="image/x-icon">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.6 -->
<link rel="stylesheet" href="/static/vendor/bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">-->
<!--<link rel="stylesheet" href="dist/css/font-awesome.min.css">-->
<!-- Ionicons -->
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">-->
<!-- Theme style -->
<link rel="stylesheet" href="/static/dist/css/AdminLTE.css">
<link rel="stylesheet" href="/static/dist/css/all-skins.min.css">
{% block link %}{% endblock %}
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition skin-black-light sidebar-mini">
<div class="wrapper">
<!-- Main Header -->
<header class="main-header">
<!-- Logo -->
<a href="/index/" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<!--<span class="logo-mini"><b>XBMAN</b></span>-->
<img class="logo-mini" style="width: 45px;height: 45px;" src="/static/dist/img/logo.png" alt="User Image">
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><img style="width: 35px;height: 35px;" src="/static/dist/img/logo.png" alt="User Image"><b>XBMAN</b>-统一登录页</span>
</a>
<!-- Header Navbar -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle glyphicon glyphicon-list " data-toggle="offcanvas" role="button">
<!--<span class="sr-only">Toggle navigation</span>-->
</a>
<!-- Navbar Right Menu -->
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<!-- User Account Menu -->
<li class="dropdown user user-menu">
<!-- Menu Toggle Button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<!-- The user image in the navbar-->
<img src="/static/dist/img/avatar04.png" class="user-image" alt="User Image">
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs">{{ request.user.name }}</span>
</a>
<ul class="dropdown-menu">
<!-- The user image in the menu -->
<li class="user-header">
<img src="/static/dist/img/avatar04.png" class="img-circle" alt="User Image">
<p>
{% if request.user.is_admin %}
<span>管理员</span>
{% else %}
<span>普通用户</span>
{% endif %}
<small>Member since Nov. 2017</small>
</p>s
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="#myModal1" class="btn btn-default btn-flat" data-toggle="modal" data-placement="bottom">修改密码</a>
</div>
<div class="pull-right">
<a href="/logout/" class="btn btn-default btn-flat">退出登陆</a>
</div>
</li>
</ul>
</li>
</ul>
</div>
</nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel (optional) -->
<div class="user-panel">
<div class="pull-left image">
<img src="/static/dist/img/avatar04.png" class="img-circle" alt="User Image">
</div>
<div class="pull-left info">
<p>{{ request.user }}</p>
<!-- Status -->
<a href="#"><i class="glyphicon glyphicon-record text-success"></i> {{ request.user.department }}</a>
</div>
</div>
<!-- /.search form -->
<!-- Sidebar Menu -->
<ul class="sidebar-menu">
<li class="header">HEADER</li>
<!-- Optionally, you can add icons to the links -->
<li id="indexs"><a href="/index/"><i class="glyphicon glyphicon-home"></i> <span>系统选择</span></a></li>
{# <li><a href="#"><i class="glyphicon glyphicon-user"></i> <span>用户管理</span></a></li>#}
{% if request.user.is_admin %}
<li class="treeview" id="userli">
<a href="#"><i class="glyphicon glyphicon-fire"></i> <span>用户权限</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu" id="userul">
<li id="users" style="margin-left: 40px"><a href="/users/">用户管理</a></li>
<li id="page" style="margin-left: 40px"><a href="/authority/">权限管理</a></li>
</ul>
</li>
{% endif %}
</ul>
<!-- /.sidebar-menu -->
</section>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!--修改密码弹窗-->
<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">修改密码</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" action="/checkpasswork/" method="post" id="nameform">{% csrf_token %}
<div class="control-group">
<label class="control-label" for="oldpassword">原密码</label>
<div class="controls">
<input class="form-control" id="oldpassword" name="oldpassword" placeholder="请输入原密码" type="password" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="id_password">新密码</label>
<div class="controls">
<input class="form-control" id="id_password" name="password" placeholder="请输入新密码" type="password" />
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="submit" form="nameform" class="btn btn-primary" value="submit">提交</button>
</div>
</div>
</div>
</div>
<!--修改密码弹窗结束-->
{% block body %}{% endblock %}
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Main Footer -->
<footer class="main-footer">
<!-- To the right -->
<!-- Default to the left -->
<strong>xbman © 2016 <a href="#">Company</a>.</strong> 版权所有.
</footer>
</div>
<!-- ./wrapper -->
<!-- REQUIRED JS SCRIPTS -->
<!-- jQuery 2.2.3 -->
<script src="/static/vendor/jquery/jquery.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="/static/vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- AdminLTE App -->
<script src="/static/dist/js/app.min.js"></script>
{% block javascript %}{% endblock %}
</body>
</html>