Blame view

templates/base_sidebar.html 2.18 KB
f96567709   zhenchaozhu   modify page
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
  {% load staticfiles %}
  <aside class="main-sidebar" style="z-index: 98">
  <!-- sidebar: style can be found in sidebar.less -->
      <section class="sidebar">
          <!-- Sidebar user panel -->
          <div class="user-panel">
              <div class="pull-left image">
                  <img src="{% static "dist/img/user2-160x160.jpg" %}" class="img-circle" alt="User Image">
              </div>
              <div class="pull-left info">
                  <p>{{request.user.employeeName}}</p>
                  <a href="#"><i class="fa fa-circle text-success"></i> {{request.user.deptNames}}</a>
              </div>
          </div>
          <!-- search form -->
          <form action="#" method="get" class="sidebar-form">
              <div class="input-group">
                  <input type="text" name="q" class="form-control" placeholder="Search...">
                  <span class="input-group-btn">
                      <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i></button>
                  </span>
              </div>
          </form>
          <!-- /.search form -->
          <!-- sidebar menu: : style can be found in sidebar.less -->
          <ul class="sidebar-menu">
              <li class="header">MAIN NAVIGATION</li>
              <li id="servicedeskmenu" class="treeview">
                  <a href="/">
                      <i class="fa fa-dashboard"></i> <span>服务台</span>
                  </a>
              </li>
              <li id="logmanagemenu" class="treeview">
                  <a href="/account/list/">
                      <i class="fa fa-desktop"></i>
                      <span>用户管理</span>
                  </a>
              </li>
          </ul>
      </section>
      <!-- /.sidebar -->
  </aside>
  <script>
      $(function () {
          var menu_list = $("aside.main-sidebar .sidebar-menu").find('.treeview');
          for(var i=0; i<menu_list.length; i++){
              var menu = $(menu_list[i]);
              var num_label = menu.find('a span.label');
              if(num_label.length>0){
                  var sub_menu_num = menu.find('ul.treeview-menu li').length;
                  num_label.html(sub_menu_num);
              }
          }
          $(".hide_js").hide();
      })
  </script>