<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
        
        <title>{% block title %}邵武一中新闻部摄影大赛-投票系统{% endblock %}</title>
        
        <!-- Bootstrap -->
        <link href="/static/css/bootstrap.css" rel="stylesheet">
        <link href="/static/css/common.css" rel="stylesheet">
        <link rel="stylesheet" type="text/css" href="/static/css/footer.css">
        <script src="/static/js/jquery.min.js"></script>
        <script src="/static/js/jquery.myext.js"></script> 
        <script src="/static/js/bootstrap.min.js"></script> 
        <script src="/static/js/bootstrap-datetimepicker.min.js"></script> 
        <script src="/static/js/bootstrap-datetimepicker.zh-CN.js"></script> 
        <link rel="stylesheet" href="/static/css/icomoon-social.css">

        <link rel="stylesheet" href="/static/css/leaflet.css" />
        <!--[if lte IE 8]>
            <link rel="stylesheet" href="/static/css/leaflet.ie.css" />
        <![endif]-->
        <link rel="stylesheet" href="/static/css/main.css">

        <script src="/static/js/modernizr-2.6.2-respond-1.1.0.min.js"></script>
        {% block head %}{% endblock %}

        <style type="text/css">
            body {  margin-bottom: 120px !important;}
        </style>

    </head>
    
    <body>
 <!-- 导航栏 -->
<div class="mainmenu-wrapper">
  <div class="container">
           <div class="menuextras">

                    <div class="extras">
                        <ul>
                 {% if user.is_authenticated %}

                        <li class="dropdown">
                            <a href="" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span> {{ request.user.username }} <b class="caret"></b></a>
                            <ul class="dropdown-menu" role="menu">
                                
                                {% ifnotequal user.role.name "普通学生" %}
                                <li role="menuitem"><a href='/admin'>    后台管理</a></li>
                                {% endifnotequal %}
                                <li role="menuitem"><a href="{% url 'logouturl' %}">    注销登陆</a></li>
                            </ul>
                        </li>

                {% else %}
                        <li {% if 'login' in request.path %} class="active" {% endif %}><a href="{% url 'loginurl' %}">登陆</a></li>
                {% endif %}
                        </ul>
                    </div>
            </div>
            <nav id="mainmenu" class="mainmenu">
                {% if user.is_authenticated %}
                    <ul>
                        <li><a href="javascript:history.back();" style="color:rgb(10, 103, 171);"><span class="glyphicon glyphicon-circle-arrow-left" aria-hidden="true"></span>后退</a></li>
                        <li class="logo-wrapper"><a href="/"><img src="/static/img/logo.png"></a></li>
                        <li {% if request.path = "/admin/" %} class="active" {% endif %}><a href="/admin/">后台主页</a></li>
                        <li {% if request.path = "/" %} class="active" {% endif %}><a href="/">前台主页</a></li>
                        <li {% if 'about' in request.path %} class="active" {% endif %}><a href="/about">关于</a></li>
                    </ul>

                {% else %}
                    <ul>
                        <li class="logo-wrapper"><a href="/"><img src="/static/img/logo.png"></a></li>
                        <li {% if request.path = '/' %} class="active" {% endif %}><a href="/">主页</a></li>
                        <li {% if 'about' in request.path %} class="active" {% endif %}><a href="/about">关于</a></li>
                    </ul>
                {% endif %}
            </nav>
    <!--/.nav-collapse --> 
  </div>
 </div>



        <!-- 内容区域 -->
<div class="container" style="width:90%">
    <br />
    <div class="row">
        <div class="col-md-2">
            {% include "sidebar.html" %}
        </div>
        <div class="col-md-10">
            {% block content %}{% endblock %}
        </div>
    </div>
</div>


         {% include "footer.html" %}
         <script src="/static/js/jquery.fitvids.js"></script>
        <script src="/static/js/jquery.sequence-min.js"></script>
        <script src="/static/js/jquery.bxslider.js"></script>
        <script src="/static/js/main-menu.js"></script>
        <script src="/static/js/template.js"></script>
    <script src="/static/js/navmsg.js"></script>
            <script src="/static/js/bootstrap-datetimepicker.min.js"></script> 
        <script src="/static/js/bootstrap-datetimepicker.zh-CN.js"></script>
        <script>
$(function(){
 //页面初始化
 window.onload=function(){
 $("#j-event-list li:first").trigger("click");//触发：用户选择事件
 $("#go12").trigger("click");//触发：查询
 };

 $('.form_date').datetimepicker({
 language: 'zh-CN',
 weekStart: 1,
 todayBtn: 1,
 autoclose: 1,
 todayHighlight: 1,
 startView: 2,
 minView: 2,
 forceParse: 0,
 pickerPosition: "bottom-left"
 });

 $("#j-wds-ctl").bind("click",function(){
 if($(this).find("i").hasClass("glyphicon-th-list")){
 $(this).find("i").removeClass("glyphicon-th-list").addClass("glyphicon-fullscreen");
 $(".G-wrap-fluid").addClass("G-wrap-static");
 }else{
 $(this).find("i").removeClass("glyphicon-fullscreen").addClass("glyphicon-th-list");
 $(".G-wrap-fluid").removeClass("G-wrap-static");
 };
 $(window).trigger("resize");
 $("#j-chart").hide().delay(100).fadeIn();
 return false;
 });

 });
</script>
    </body>
</html>