2010-01-06 08:08:08 +00:00
|
|
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<AdminViewModel>" %>
|
2009-12-29 16:37:35 +00:00
|
|
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
|
|
|
|
<ul id="navigation" role="navigation">
|
2010-01-06 08:08:08 +00:00
|
|
|
<li class="first"><h3><span><%=_Encoded("Dashboard")%></span></h3></li>
|
2009-12-29 16:37:35 +00:00
|
|
|
<%if (Model.AdminMenu != null) {
|
|
|
|
|
foreach (var menuSection in Model.AdminMenu) {
|
|
|
|
|
// todo: (heskew) need some help(er)
|
|
|
|
|
var firstSectionItem = menuSection.Items.FirstOrDefault();
|
|
|
|
|
var sectionHeaderMarkup = firstSectionItem != null
|
|
|
|
|
? Html.ActionLink(menuSection.Text, (string)firstSectionItem.RouteValues["action"], firstSectionItem.RouteValues).ToHtmlString()
|
|
|
|
|
: string.Format("<span>{0}</span>", Html.Encode(menuSection.Text));
|
|
|
|
|
%>
|
2010-01-06 08:08:08 +00:00
|
|
|
<li><h3><%=sectionHeaderMarkup %></h3><ul><%foreach (var menuItem in menuSection.Items) { %>
|
2009-12-29 16:37:35 +00:00
|
|
|
<li><%=Html.ActionLink(menuItem.Text, (string)menuItem.RouteValues["action"], menuItem.RouteValues)%></li>
|
|
|
|
|
<%} %></ul></li>
|
|
|
|
|
<%
|
|
|
|
|
}
|
|
|
|
|
}%>
|
|
|
|
|
</ul>
|