@using MySystem.Models;
@{
    List<RightDic> menus = ViewBag.menus as List<RightDic>;
    string RightInfo = ViewBag.RightInfo as string;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>搜索菜单</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
    <style>
        .layadmin-carousel{
            height: 650px !important;
        }
    </style>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-sm12">
                <div class="layui-card">
                    <div class="layui-card-header">快捷方式</div>
                    <div class="layui-card-body">
                        <div class="layui-carousel layadmin-carousel layadmin-shortcut">
                            <div carousel-item>
                                <ul class="layui-row layui-col-space10">
                                    @foreach(RightDic sub in menus)
                                    {
                                        if (RightInfo.Contains("," + sub.Id + ","))
                                        {
                                            string url = sub.Url;
                                            if (url.Contains("?"))
                                            {
                                                url += "&right=" + sub.Id;
                                            }
                                            else
                                            {
                                                url += "?right=" + sub.Id;
                                            }
                                            <li class="layui-col-xs2">
                                                <a lay-href="@url">
                                                    <i class="layui-icon @(string.IsNullOrEmpty(sub.Icon) ? "layui-icon-component" : sub.Icon)"></i>
                                                    <cite>@sub.Name</cite>
                                                </a>
                                            </li>
                                        }
                                    }
                                </ul>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="/layuiadmin/modules/Main_Admin.js"></script>
    <script src="../../layuiadmin/layui/layui.js?t=1"></script>
    <script>
        layui.config({
            base: '../../layuiadmin/'
        }).extend({
            index: 'lib/index'
        }).use(['index', 'console', 'table'], function(){
            var $ = layui.$
            ,table = layui.table;
        });
    </script>
</body>
</html>