Adding scope ctor parameter to localization component.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4041484
This commit is contained in:
loudej
2009-11-20 02:49:20 +00:00
parent b759bba2ec
commit 35b1b5a1d4
18 changed files with 207 additions and 83 deletions

View File

@@ -1,4 +1,5 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.DevTools.ViewModels.ContentDetailsViewModel>" %>
<%@ Import Namespace="Orchard.Models"%>
<%@ Import Namespace="System.Reflection" %>
<%@ Import Namespace="Orchard.Mvc.Html" %>
@@ -36,13 +37,23 @@
<%=Html.Encode(" (" + partType.GetGenericArguments().First().Namespace + ")")%><%}
else {%><%=Html.Encode(partType.Name)%></span>
<%=Html.Encode( " (" + partType.Namespace + ")")%><%
}%>
}
%>
<ul style="margin-left: 20px">
<%foreach (var prop in partType.GetProperties().Where(x => x.DeclaringType == partType)) {
var value = prop.GetValue(Model.Locate(partType), null);%>
<li style="font-weight: normal;">
<%=Html.Encode(prop.Name) %>:
<%=Html.Encode(value) %>
<%var valueItem = value as ContentItem;
if (valueItem == null && value is IContentItemPart) {
valueItem = (value as IContentItemPart).ContentItem;
}
if (valueItem != null) {
%><%=Html.ActionLink(valueItem.ContentType + " #" + valueItem.Id, "details", new { valueItem.Id }, new { })%><%
}
%>
<ul style="margin-left: 20px">
<%if (value == null || prop.PropertyType.IsPrimitive || prop.PropertyType == typeof(string)) { }
else if (typeof(IEnumerable).IsAssignableFrom(prop.PropertyType)) {