updates #U4-2070 for autodoc.aspx

This commit is contained in:
Shannon Deminick
2013-04-10 02:17:02 +06:00
parent bf024e9011
commit f64e0c7eb7

View File

@@ -9,6 +9,7 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Linq;
using umbraco.BusinessLogic;
namespace umbraco.developer
{
@@ -17,56 +18,40 @@ namespace umbraco.developer
/// </summary>
public partial class autoDoc : BasePages.UmbracoEnsuredPage
{
protected void Page_Load(object sender, System.EventArgs e)
public autoDoc()
{
CurrentApp = DefaultApps.developer.ToString();
}
protected void Page_Load(object sender, EventArgs e)
{
// Put user code to initialize the page here
foreach(cms.businesslogic.web.DocumentType dt in cms.businesslogic.web.DocumentType.GetAllAsList())
foreach(var dt in cms.businesslogic.web.DocumentType.GetAllAsList())
{
LabelDoc.Text +=
"<div class=\"propertyType\"><p class=\"documentType\">" + dt.Text + "</p><p class=\"type\">Id: " + dt.Id.ToString() + ", Alias: " + dt.Alias + ")</p>";
if (dt.PropertyTypes.Count > 0)
LabelDoc.Text += "<p class=\"docHeader\">Property Types:</p>";
foreach (cms.businesslogic.propertytype.PropertyType pt in dt.PropertyTypes)
foreach (var pt in dt.PropertyTypes)
LabelDoc.Text +=
"<p class=\"type\">" + pt.Id.ToString() + ", " + pt.Alias + ", " + pt.Name + "</p>";
if (dt.getVirtualTabs.Length > 0)
LabelDoc.Text += "<p class=\"docHeader\">Tabs:</p>";
foreach (cms.businesslogic.ContentType.TabI t in dt.getVirtualTabs.ToList())
foreach (var t in dt.getVirtualTabs.ToList())
LabelDoc.Text +=
"<p class=\"type\">" + t.Id.ToString() + ", " + t.Caption + "</p>";
if (dt.AllowedChildContentTypeIDs.Length > 0)
LabelDoc.Text += "<p class=\"docHeader\">Allowed children:</p>";
foreach (int child in dt.AllowedChildContentTypeIDs.ToList())
foreach (var child in dt.AllowedChildContentTypeIDs.ToList())
{
cms.businesslogic.ContentType _child = new cms.businesslogic.ContentType(child);
var contentType = new cms.businesslogic.ContentType(child);
LabelDoc.Text +=
"<p class=\"type\">" + _child.Id.ToString() + ", " + _child.Text + "</p>";
"<p class=\"type\">" + contentType.Id.ToString() + ", " + contentType.Text + "</p>";
}
LabelDoc.Text += "</div>";
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}
#endregion
}
}