Cleaned shapes folder

--HG--
branch : dev
This commit is contained in:
Sébastien Ros
2010-09-17 15:25:24 -07:00
parent 3412f86a96
commit e002cf41c1
3 changed files with 1 additions and 31 deletions

View File

@@ -1,3 +0,0 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%
%>

View File

@@ -0,0 +1 @@
@model dynamic

View File

@@ -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>
<%
} %>