Example #1
0
        public static MvcHtmlString ButtonWithinGroup(this HtmlHelper helper, string text, string actionName, string controllerName, object routeValues = null, object htmlAttributes = null, string glyphIcons = null, BootstrapNamedColor color = BootstrapNamedColor.Default)
        {
            var builder    = new TagBuilder("li");
            var buttonHtml = helper.ActionButton(text, actionName, controllerName, routeValues, htmlAttributes, glyphIcons, color);

            builder.InnerHtml = buttonHtml.ToHtmlString();
            return(MvcHtmlString.Create(builder.ToString()));
        }
Example #2
0
        public static string ButtonsDefault(this HtmlHelper html,
                                            String actionText, String actionIconPrimary, String actionIconSecondary,
                                            String linkText, String linkIconPrimary, String linkIconSecondary)
        {
            StringBuilder sb = new StringBuilder("", HelperBaseExtensions.Capacity);

            if (!String.IsNullOrEmpty(actionText))
            {
                sb.Append(html.ActionButton(actionText, actionIconPrimary, actionIconSecondary));
            }
            if (!String.IsNullOrEmpty(linkText))
            {
                sb.Append(html.ActionLinkBack(linkText, linkIconPrimary, linkIconSecondary));
            }
            return(sb.ToString());
        }
Example #3
0
 public static IHtmlString ActionButton(this HtmlHelper helper, string text, string actionName, string controllerName)
 {
     return(helper.ActionButton(text, actionName, controllerName, null));
 }
Example #4
0
 public MessagingStepGridModel(HtmlHelper html, Filiation filiation, GridFilteringModes modes)
 {
     Attributes(@class => "messaging-step");
     Column.For(
         s => html.ActionLink(
             s.Name ?? Resource.Unknown,
             "Details",
             "MessagingStep",
             new RouteValueDictionary(new { id = s.ActivityID }),
             new Dictionary <string, object> {
         { "data-ajax-grid", "true" }
     })
         )
     .Named("Port Name")
     .Sortable(modes.Sortable(), s => s.Name)
     .Filterable(modes.Steppable(), s => s.Name);
     // TODO Column.For(s => s.MessageBody.IsNullOrEmpty() ? null : Html.ActionButton("Save", "Save", "MessagingStep", new { id = s.ActivityID }))
     Column.For(s => html.ActionButton("Download", "Save", "MessagingStep", new { id = s.ActivityID }))
     .Named("Body Action")
     .Encode(false)
     .Sortable(false);
     if (modes.Sortable() && filiation != Filiation.Orphan)
     {
         Column.For(s => html.ActionLink("Process", "Process", "MessagingStep", new { id = s.ActivityID }, null))
         .Named("Go to...")
         .Encode(false)
         .Sortable(false);
     }
     Column.For(s => s.Value1)
     .Named("Value 1")
     .Sortable(modes.Sortable())
     .Filterable(modes.Sortable());
     Column.For(s => s.Value2)
     .Named("Value 2")
     .Sortable(modes.Sortable())
     .Filterable(modes.Sortable());
     Column.For(s => s.Value3)
     .Named("Value 3")
     .Sortable(modes.Sortable())
     .Filterable(modes.Sortable());
     Column.For(s => s.BeginTime.ToLocalTime())
     .Named("Time")
     .Sortable(modes.Sortable(), s => s.BeginTime)
     .Attributes(s => new Dictionary <string, object> {
         { "title", s.Item.BeginTime }
     });
     Column.For(s => s.Status)
     .Sortable(modes.Sortable())
     .Filterable(modes.Sortable());
     Column.For(s => s.MessageSize)
     .Sortable(modes.Sortable());
     Column.For(s => s.FriendlyMessageType)
     .Named("Message Type")
     .Sortable(modes.Sortable(), s => s.MessageType)
     .Attributes(s => new Dictionary <string, object> {
         { "title", s.Item.MessageType }
     })
     .Filterable(modes.Sortable(), s => s.MessageType);
     Column.For(s => s.TransportType)
     .Sortable(modes.Sortable())
     .Filterable(modes.Sortable());
     RenderUsing(new DynamicGridRenderer <MessagingStep>());
 }