You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/projects/StudyCenter/Views/Course/_Menu.cshtml

18 lines
595 B

@model List<CourseCategory>
@{
if (Model != null && Model.Count > 0)
{
<ul @Html.Raw(ViewData.ContainsKey("IsTopLevel") ? "class='filetree treeview'" : "")>
@{
ViewData.Remove("IsTopLevel");
}
@foreach (var item in Model)
{
<li>
<a href="@Url.Action("Index","Course",new { categoryId=item.Id})"><span class="folder">@item.Name</span></a>
@await Html.PartialAsync("_Menu", item.Children, this.ViewData)
</li>
}
</ul>
}
}