@model string
<div class="current-location">
    <ul>
        <li class="left"><i class="glyphicon glyphicon-home"></i><a href="javascript:void(0)" onclick="location.href=location.href">Api管理</a></li>
        <li class="right"><a href="javascript:void(0)" onclick="LoadData()" title="刷新"><span class="glyphicon glyphicon-refresh"></span></a></li>
    </ul>
</div>

<div class="main">
    <table border=0 cellpadding=0 cellspacing=0 class="tb-head">
        <tr>
            <td>
                <div class="btn-group btn-group-sm">
                    <button type="button" class="btn btn-default ui-selectInvert">反选</button>
                    <div class="btn-group btn-group-sm">
                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                            菜单<span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="javascript:void(0)" class="ui-dialog" data-custom-params="title:'添加',url:'@Url.Action("Add")'">添加</a></li>
                            <li class="divider"></li>
                            <li><a href="javascript:void(0)" class="ui-deleteMultiple" data-custom-params="url:'@Url.Action("Delete")'">删除</a></li>
                        </ul>
                    </div>
                </div>
            </td>
            <td align="right">
                <div class="control-group">
                    <div class="controls form-inline form-group-sm">
                        <select class="form-control ui-queryString ui-setName" style="width:120px;">
                            <option value="name">Api名称</option>
                            <option value="controller">控制器名</option>
                            <option value="action">方法名</option>
                        </select>
                        <input type="text" placeholder="搜索关键词" class="form-control ui-keyword ui-queryString">
                        <button type="button" class="btn btn-default btn-sm ui-queryString-search">确定</button>
                    </div>
                </div>
            </td>
        </tr>
    </table>

<table border=0 cellpadding=0 cellspacing=0 class="table table-bordered form-inline form-group-sm" id="tb_list">
    <thead>
        <tr>
            <td align="center" style="width:40px"><input type="checkbox" title="选择" class="ui-selectInvert" data-custom-params="isReverse:false"></td>
            <td align="center">名称</td>
            <td align="center">控制器名</td>
            <td align="center">方法名</td>
            <td align="center">Token验证</td>
            <td align="center">UserToken验证</td>
            <td align="center">操作</td>
        </tr>
    </thead>
    <tr class="item list-template-item" id="item_{id}">
        <td align="center" style="width:40px"><input type="checkbox" class="checked-item" value="{id}"></td>
        <td align=left>{name}</td>
        <td align=left>{controller}</td>
        <td align=left>{action}</td>
        <td align="center"><span class="sp-check-{checkApiToken}"></span></td>
        <td align="center"><span class="sp-check-{checkUserToken}"></span></td>
        <td align="center">
            <input type="hidden" name="id" value="{id}" />
            <div class="btn-group btn-group-sm">
                <a class="btn btn-default btn-sm ui-dialog" data-custom-params="title: '{name}-修改', url:'@Url.Action("Edit")?id={id}'" href="javascript:void(0)">修改</a>
                <button type="button" data-custom-params="url:'@Url.Action("Delete")'" class="btn btn-default btn-sm ui-deleteSingle btn_delete_{is_sys}">删除</button>
            </div>
        </td>
    </tr>
</table>
 <div class="text-muted" style="margin-top:20px"><i class="fa fa-info-circle fa-lg"></i>所有Api都需要添加后才能进行访问。</div>
</div>
<script type="text/javascript">
    function LoadedInit()
    {
        $(".sp-check-1").text("是");
        $(".sp-check-0").text("否").addClass("text-muted");
    }
    function LoadData() {
        $("#tb_list").ListBind({ url: "@Url.Action("PageListData")", callBack: "LoadedInit" });
    }
    LoadData();
</script>
