[fix]Config创建默认配置文件的开关Runtime.CreateConfigOnMissing,仅需对自动创建生效,而不应该阻止用户主动Save
智能大石头 authored at 2024-08-09 00:30:41 石头 committed at 2024-08-10 14:22:24
851.00 B
X
@using NewLife.Model;
@using XCode.Membership;
@{
    var user = ManageProvider.User;

    var fact = ObjectContainer.Current.Resolve<IMenuFactory>();

    var item = Model as IMenu;
    var childs = fact.GetMySubMenus(item.ID).Where(m => m.Visible);
}
<li>
    @if (childs.Any())
    {
        <a href="#" class="dropdown-toggle">
            <i class="menu-icon fa fa-caret-right"></i>
            @item.DisplayName
        </a>
    }
    else
    {
        <a href="@Url.Content(item.Url)" target="main">
            <i class="menu-icon fa fa-caret-right"></i>
            @item.DisplayName
        </a>

        <b class="arrow"></b>
        <ul class="submenu">
            @foreach (IMenu menu in childs)
            {
                @Html.Partial("_Left_Item", menu);
            }
        </ul>
    }
</li>