Further shapes work

Adding the ability to bind a method with a TextWriter Output parameter
Bringing over work from UnorderedList
Parameter bound with GetMember instead of array access to be compatible with base class properties

--HG--
branch : theming
This commit is contained in:
Louis DeJardin
2010-09-08 19:30:30 -07:00
parent fceea540ba
commit 899abcca96
12 changed files with 235 additions and 70 deletions

View File

@@ -1,9 +1,34 @@
using System.Web.Mvc;
using Orchard.DisplayManagement;
namespace Orchard.Core.Dashboard.Controllers {
public class AdminController : Controller {
private readonly IShapeHelperFactory _shapeHelperFactory;
public AdminController(IShapeHelperFactory shapeHelperFactory) {
_shapeHelperFactory = shapeHelperFactory;
}
public ActionResult Index() {
return View();
var shape = _shapeHelperFactory.CreateHelper();
var list = shape.List();
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);
}
}
}

View File

@@ -4,3 +4,4 @@
<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>
<%:Display(Model) %>