mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Cleaned shapes folder
--HG-- branch : dev
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
|
|
||||||
<%
|
|
||||||
%>
|
|
1
src/Orchard.Web/Core/Shapes/Views/HeadPreload.cshtml
Normal file
1
src/Orchard.Web/Core/Shapes/Views/HeadPreload.cshtml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@model dynamic
|
@@ -1,28 +0,0 @@
|
|||||||
layouthea<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BaseViewModel>" %>
|
|
||||||
<%@ Import Namespace="Orchard.Utility.Extensions"%>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%><%
|
|
||||||
var menu = Model.Menu.FirstOrDefault();
|
|
||||||
if (menu != null && menu.Items.Count() > 0) { %>
|
|
||||||
<%-- todo: (heskew) *really* need a better way of doing this. ...and this is really, really ugly :) --%>
|
|
||||||
<%-- TODO: (erikpo) Really need a partial for rendering lists (and it should be templatable) to fix the above todo :) --%>
|
|
||||||
<ul class="menu"><%
|
|
||||||
int counter = 0, count = menu.Items.Count() - 1;
|
|
||||||
foreach (var menuItem in menu.Items) {
|
|
||||||
var sbClass = new StringBuilder(10);
|
|
||||||
if (counter == 0)
|
|
||||||
sbClass.Append("first ");
|
|
||||||
if (counter == count)
|
|
||||||
sbClass.Append("last ");
|
|
||||||
|
|
||||||
|
|
||||||
if (string.Equals(menuItem.Href.TrimEnd('/'), Request.Path.TrimEnd('/'), StringComparison.OrdinalIgnoreCase))
|
|
||||||
sbClass.Append("current ");
|
|
||||||
|
|
||||||
var classValue = sbClass.ToString().TrimEnd(); %>
|
|
||||||
<li<%=!string.IsNullOrEmpty(classValue) ? string.Format(" class=\"{0}\"", classValue) : "" %>><%: Html.Link(menuItem.Text, menuItem.Href) %></li><%
|
|
||||||
++counter;
|
|
||||||
} %>
|
|
||||||
</ul>
|
|
||||||
<%
|
|
||||||
} %>
|
|
Reference in New Issue
Block a user