zhaolei
3 days ago 4a2e5b9a21940f11757be37d99f0944e240e908b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@model Bootstrap.Security.BootstrapMenu
@if (Model.Menus.Any())
{
    <li class="nav-item parent" id="@string.Format("menus_{0}",Model.Id)">
        @if (Model.Active == "active")
        {
            <a href="@string.Format("#collapse_{0}", Model.Id)" role="button" data-toggle="collapse" class="nav-link active"><i class="@Model.Icon"></i><span class="flex-fill">@Model.Name</span><i class="fa fa-angle-left"></i></a>
            <div class="show" id="@string.Format("collapse_{0}", Model.Id)">
                @if (Model.Menus.Any())
                {
                    @await Html.PartialAsync("SubNavigation", Model.Menus)
                }
            </div>
        }
        else
        {
            <a href="@string.Format("#collapse_{0}", Model.Id)" role="button" data-toggle="collapse" class="nav-link collapsed"><i class="@Model.Icon"></i><span class="flex-fill">@Model.Name</span><i class="fa fa-angle-left"></i></a>
            <div class="collapse" id="@string.Format("collapse_{0}", Model.Id)">
                @if (Model.Menus.Any())
                {
                    @await Html.PartialAsync("SubNavigation", Model.Menus)
                }
            </div>
        }
    </li>
}
else
{
    <li class="nav-item" id="@string.Format("menus_{0}",Model.Id)">
        <a href="@Url.Content(Model.Url)" class="nav-link @Model.Active" target="@Model.Target"><i class="@Model.Icon"></i><span class="flex-fill">@Model.Name</span></a>
    </li>
}