<?php $data = $this->data; ?>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span3" id="sidebar" style="width:250px;position:fixed;z-index:100;display:none;">
            <ul class="nav nav-list bs-docs-sidenav nav-collapse collapse">
                <li <?php if($data["uri"]["seg"][1] == "/" || $data["uri"]["seg"][1] == "devManagePage"){echo "class='active'";} ?> onclick="leftSwich(this)" id="left_dev_man">
                    <a><i class="icon-chevron-right"></i> 设备管理</a>
                </li>
                <li <?php if($data["uri"]["seg"][1] == "devDetail"){echo "class='active'";} ?> onclick="leftSwich(this)" id="left_dev_detail">
                    <a><i class="icon-chevron-right"></i> 设备详情</a>
                </li>
                <li <?php if($data["uri"]["seg"][1] == "categoryManagePage"){echo "class='active'";} ?> onclick="leftSwich(this)" id="left_category_man">
                    <a><i class="icon-chevron-right"></i> 分类管理</a>
                </li>
                <li <?php if($data["uri"]["seg"][1] == "borrowCheckPage"){echo "class='active'";} ?> onclick="leftSwich(this)" id="left_borrow_check">
                    <a><i class="icon-chevron-right"></i> 签借审核</a>
                </li>
            </ul>
        </div>
    </div>
</div>

<script>
/*******************************************
 *     左侧菜单切换
 /******************************************/
 function leftSwich(e){
    var id = $(e).attr("id");
    var host = window.location.host;
    var username = $.cookie('username');
    var token = $.cookie('token');
    if(username == undefined){
        username = "";
    }
    if(token == undefined){
        token = "";
    }
    if(id == "left_dev_man"){
        window.location.href = "http://" + host + "/devManage" + "?username=" + username + "&token=" + token ;
    }else if(id == "left_dev_detail"){
        window.location.href = "http://" + host + "/devManage/devDetail" + "?username=" + username + "&token=" + token ;;
    }else if(id == "left_category_man"){
        window.location.href = "http://" + host + "/devManage/categoryManagePage" + "?username=" + username + "&token=" + token ;;
    }else if(id == "left_borrow_check"){
        window.location.href = "http://" + host + "/devManage/borrowCheckPage" + "?username=" + username + "&token=" + token ;;
    }
}



</script>