<?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] == "userManagePage"){echo "class='active'";} ?> onclick="leftSwich(this)" id="left_org_manage">
                    <a><i class="icon-chevron-right"></i> 用户管理</a>
                </li>
                <li <?php if($data["uri"]["seg"][1] == "showRolePage"){echo "class='active'";} ?> onclick="leftSwich(this)" id="left_show_role">
                    <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_org_manage"){
        window.location.href = "http://" + host + "/userManage?username=" + username + "&token=" + token;
    }else if(id == "left_show_role"){
        window.location.href = "http://" + host + "/userManage/showRolePage?username=" + username + "&token=" + token;
    }
}

</script>