<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@include file="/WEB-INF/views/base.jsp"%>
<%
	String contextPath = request.getContextPath();
%>
<nav class="navbar-default navbar-static-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav metismenu" id="side-menu">
                <li class="nav-header">
                    <div class="dropdown profile-element"> 
                    	 <span>
                            <img alt="image" class="img-circle" src='${imgPath }/profile_small.jpg'  
                            	 onerror="javascript:this.src='${imgPath }/profile_small.jpg';" />
                             </span> 
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                            <span class="clear"> 
                            	<span class="block m-t-xs"> 
                         	    	<strong class="font-bold">${USER_SESSION_KEY.username}</strong>
                            	</span> 
                            </span> 
                        </a>
                       <!--  <ul class="dropdown-menu animated fadeInRight m-t-xs">
                            <li><a href="#">Profile</a></li>
                            <li><a href="#">Contacts</a></li>
                            <li><a href="#">Mailbox</a></li>
                            <li class="divider"></li>
                            <li><a href="login">Logout</a></li>
                        </ul> -->
                    </div>
                    <div class="logo-element">
                       
                    </div>
                </li>
                <c:forEach var="menuInfo" items="${menu }" >
                <li  <c:if test="${pitchOn1 == menuInfo.menuid }">class="active"</c:if>     >
                	<!-- 一级菜单 -->
                	<a href="javascript:void(0);"><i class="${menuInfo.icon }"></i>
                	<span class="nav-label">${menuInfo.menucnname }</span><span class="fa arrow"></span></a>
                	
                    <ul class="nav nav-second-level collapse  <c:if test='${pitchOn1 == menuInfo.menuid }'>  in</c:if> ">
                    <c:forEach var="menuChild" items="${menuInfo.childMenu }">
                        <li  <c:if test="${pitchOn2 == menuChild.menuid }">class="active"</c:if>  >
                        	<!-- 二级菜单 -->
                            <a href="<%=contextPath %>/${menuChild.menuurl }">${menuChild.menucnname }
                            <c:if test="${not empty menuChild.childMenu }">
                           		<span class="fa arrow"></span>
                            </c:if></a>
                            <c:if test="${not empty menuChild.childMenu }">
                            	<!-- 三层菜单 -->
                            	<ul class="nav nav-third-level">
                            		<c:forEach var="thirdChild" items="${menuChild.childMenu }">
		                                <li <c:if test="${pitchOn3 == thirdChild.menuid }">class="active"</c:if>  >
		                                    <a href="<%=contextPath %>/${thirdChild.menuurl }">${thirdChild.menucnname }</a>
		                                </li>
	                                </c:forEach>
                           		</ul>
                            </c:if>
                        </li>
                    </c:forEach>    
                    </ul>
               	</li> 
				</c:forEach>	
        </div>
    </nav>