mirror of https://github.com/abpframework/abp
Merge pull request #839 from abpframework/Basic-theme-multi-level-menu
Basic theme multi level menupull/847/head
commit
7ca7ae6336
@ -0,0 +1,36 @@
|
||||
@using Volo.Abp.UI.Navigation
|
||||
@model ApplicationMenuItem
|
||||
@{
|
||||
var elementId = string.IsNullOrEmpty(Model.ElementId) ? string.Empty : $"id=\"{Model.ElementId}\"";
|
||||
var cssClass = string.IsNullOrEmpty(Model.CssClass) ? string.Empty : Model.CssClass;
|
||||
var disabled = Model.IsDisabled ? "disabled" : string.Empty;
|
||||
}
|
||||
@if (Model.IsLeaf)
|
||||
{
|
||||
@if (Model.Url != null)
|
||||
{
|
||||
<a class="dropdown-item @cssClass @disabled" href="@(Model.Url ?? "#")" @Html.Raw(elementId)>
|
||||
@Model.DisplayName
|
||||
</a>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="dropdown-submenu">
|
||||
<a role="button" class="btn dropdown-toggle" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
<span class="lp-icon">
|
||||
<i class="@(Model.Icon ?? "")"></i>
|
||||
</span>
|
||||
<span class="lp-text">
|
||||
@Model.DisplayName
|
||||
</span>
|
||||
</a>
|
||||
<div class="dropdown-menu">
|
||||
@foreach (var childMenuItem in Model.Items)
|
||||
{
|
||||
@await Html.PartialAsync("~/Themes/Basic/Components/Menu/_MenuItem.cshtml", childMenuItem)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
Loading…
Reference in new issue