private static string GetBreadCrumbItem(UrlHelper urlHelper, ActionMap action)
        {
            var breadcrumbItem = new TagBuilder("li");

            var link = new TagBuilder("a");

            link.MergeAttribute("href", urlHelper.Action(action.ActionName, action.ControllerName, new { area = action.AreaName }));
            link.SetInnerText(action.Title);

            breadcrumbItem.InnerHtml = link.ToString();

            return(breadcrumbItem.ToString());
        }
 public static BootstrapActionLinkButton ActionLinkButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionMap siteMapAction) where TModel : class
 {
     return(bootstrap.ActionLinkButton(siteMapAction.Title, siteMapAction.ActionName, siteMapAction.ControllerName).RouteValues(siteMapAction.RouteValues));
 }
 public static BootstrapActionLinkButton BackButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionMap result) where TModel : class
 {
     return(bootstrap.ActionLinkButton(result).Title("Wstecz").PrependIcon(FontAwesome.arrow_left));
 }
 public static BootstrapActionLinkButton DeleteButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionMap result) where TModel : class
 {
     return(bootstrap.ActionLinkButton(result).Style(ButtonStyle.Danger).PrependIcon(FontAwesome.remove));
 }
 public static BootstrapActionLinkButton EditButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionMap result) where TModel : class
 {
     return(bootstrap.ActionLinkButton(result).Style(ButtonStyle.Warning).PrependIcon(FontAwesome.pencil));
 }
 public static BootstrapActionLinkButton ListButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionMap result) where TModel : class
 {
     return(bootstrap.ActionLinkButton(result).PrependIcon(FontAwesome.list).Style(ButtonStyle.Info).Text(result.Title));
 }
 public static BootstrapActionLinkButton AddButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionMap result) where TModel : class
 {
     return(bootstrap.ActionLinkButton(result).Style(ButtonStyle.Success).PrependIcon(FontAwesome.plus));
 }
 public static BootstrapActionLink ActionLink <TModel>(this BootstrapBase <TModel> bootstrap, string text, ActionMap siteMapAction) where TModel : class
 {
     return(bootstrap.ActionLink(text, siteMapAction.ActionName, siteMapAction.ControllerName).RouteValues(siteMapAction.RouteValues));
 }
 public static string Action(this UrlHelper urlHelper, ActionMap result)
 {
     return(urlHelper.Action(result.ActionName, result.ControllerName, result.RouteValues));
 }
示例#10
0
 public static MvcHtmlString ActionLink(this HtmlHelper htmlHelper, ActionMap result)
 {
     return(htmlHelper.ActionLink(result.Title, result.ActionName, result.ControllerName, result.RouteValues, null));
 }
 public static ActionMap AddRouteValue(this ActionMap actionMap, string key, object value)
 {
     actionMap.RouteValues.Add(key, value);
     return(actionMap);
 }
 public static ActionMap Name(this ActionMap actionMap, string actionName)
 {
     actionMap.ActionName = actionName;
     return(actionMap);
 }
 public static ActionMap Title(this ActionMap actionMap, string title)
 {
     actionMap.Title = title;
     return(actionMap);
 }