Exemplo n.º 1
0
        private MvcHtmlString WriteCategory(CategoryViewData category)
        {
            if (display == CategoryDisplay.Edit)
            {
                return MvcHtmlString.Create("{0} {1} {2} {3} {4}".With(
                    WriteCategoryLink(category),
                    htmlHelper.ActionLink<CategoryController>(c => c.Edit(category.CategoryId), "Edit"),
                    htmlHelper.Tick(category.IsActive),
                    htmlHelper.UpArrowLink<CategoryController>(c => c.MoveUp(category.CategoryId)),
                    htmlHelper.DownArrowLink<CategoryController>(c => c.MoveDown(category.CategoryId))
                    ));
            }

            return WriteCategoryLink(category);
        }
Exemplo n.º 2
0
 public void AddChild(CategoryViewData category)
 {
     childCategories.Add(category);
 }
Exemplo n.º 3
0
 public void AddChild(CategoryViewData category)
 {
     childCategories.Add(category);
 }
Exemplo n.º 4
0
 public ShopViewData WithCategoryViewData(CategoryViewData category)
 {
     this.CategoryViewData = category;
     return(this);
 }
Exemplo n.º 5
0
 public ShopViewData WithCategoryViewData(CategoryViewData category)
 {
     this.CategoryViewData = category;
     return this;
 }
Exemplo n.º 6
0
 private MvcHtmlString WriteCategoryLink(CategoryViewData category)
 {
     return htmlHelper.ActionLink<ProductController>(c => c.Category(category.UrlName), category.Name);
 }
Exemplo n.º 7
0
 public CategoryWriter(CategoryViewData rootCategory, HtmlHelper htmlHelper, CategoryDisplay display)
 {
     this.rootCategory = rootCategory;
     this.htmlHelper = htmlHelper;
     this.display = display;
 }