mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -1,49 +1,10 @@
|
||||
using System.Web.Mvc;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Security;
|
||||
|
||||
namespace Orchard.Core.Dashboard.Controllers {
|
||||
public class AdminController : Controller {
|
||||
private readonly IShapeHelperFactory _shapeHelperFactory;
|
||||
private readonly IContentManager _contentManager;
|
||||
|
||||
public AdminController(IShapeHelperFactory shapeHelperFactory, IContentManager contentManager) {
|
||||
_shapeHelperFactory = shapeHelperFactory;
|
||||
_contentManager = contentManager;
|
||||
}
|
||||
|
||||
public virtual IUser CurrentUser { get; set; }
|
||||
|
||||
public ActionResult Index() {
|
||||
var shape = _shapeHelperFactory.CreateHelper();
|
||||
|
||||
var list = shape.List();
|
||||
|
||||
list.Add(_contentManager.BuildDisplayModel(CurrentUser, ""));
|
||||
foreach (var contentItem in _contentManager.Query().Join<BodyPartRecord>().List()) {
|
||||
list.Add(_contentManager.BuildDisplayModel(contentItem, "Summary"));
|
||||
}
|
||||
|
||||
//
|
||||
//var list2 = shape.List();
|
||||
|
||||
//list.Id = "the-list";
|
||||
//list.Classes.Add("foo");
|
||||
//list.Attributes["onclick"] = "etc";
|
||||
//list.ItemClasses.Add("yarg");
|
||||
|
||||
//list.Add("one");
|
||||
//list.Add("two");
|
||||
//list.Add(list2);
|
||||
//list.Add(shape.DumpShapeTable());
|
||||
//list.Add("four");
|
||||
|
||||
//list2.Add("three a");
|
||||
//list2.Add("three b");)))
|
||||
|
||||
return View(list);
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
@@ -3,5 +3,3 @@
|
||||
<h1>@Html.TitleForPage(T("Welcome to Orchard").ToString())</h1>
|
||||
<p>@T("This is the place where you can manage your web site, its appearance and its contents. Please take a moment to explore the different menu items on the left of the screen to familiarize yourself with the features of the application. For example, try to change the theme through the “Manage Themes” menu entry. You can also create new pages and manage existing ones through the “Manage Pages” menu entry or create blogs through “Manage Blogs”.")</p>
|
||||
<p>@T("Have fun!")<br />@T("The Orchard Team")</p>
|
||||
|
||||
<div style="border:1px solid black;" role="experimentation">@Display(Model)</div>
|
||||
|
Reference in New Issue
Block a user