Permalink
Browse files

Added styling for the TabCart

  • Loading branch information...
avanderhoorn committed Jul 17, 2013
1 parent 8aa8774 commit 94e9f99eda38649f16ed10faea672627794e1be8
Showing with 21 additions and 2 deletions.
  1. +21 −2 source/Glimpse.Mvc3.MusicStore.Sample/Framework/TabCart.cs
@@ -1,12 +1,26 @@
using Glimpse.AspNet.Extensibility;
using Glimpse.AspNet.Extensions;
using Glimpse.Core.Extensibility;
+using Glimpse.Core.Tab.Assist;
using MvcMusicStore.Models;
namespace MvcMusicStore.Framework
-{
- public class TabCart : AspNetTab
+{
+ public class TabCart : AspNetTab, ITabLayout
{
+ private static readonly object Layout = TabLayout.Create()
+ .Row(r =>
+ {
+ r.Cell("{{albumTitle}} ({{albumId}})").AsKey().WithTitle("Album (Id)");
+ r.Cell("albumPrice").AlignRight().Prefix("$").WidthInPixels(100).WithTitle("Price");
+ r.Cell("genreName").WithTitle("Genre");
+ r.Cell("artistName").WithTitle("Artist");
+ r.Cell("count").Class("mono").WidthInPixels(70).WithTitle("Count");
+ r.Cell("dateCreated").WithTitle("Added");
+ r.Cell("recordId").WithTitle("Record Id");
+ r.Cell("cartId").WithTitle("Cart Id");
+ }).Build();
+
public override string Name
{
get { return "Cart"; }
@@ -24,5 +38,10 @@ public override RuntimeEvent ExecuteOn
{
get { return RuntimeEvent.EndSessionAccess; }
}
+
+ public object GetLayout()
+ {
+ return Layout;
+ }
}
}

0 comments on commit 94e9f99

Please sign in to comment.