// Jumbotron

        public static ComponentBuilder <TConfig, Jumbotron> Jumbotron <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <Jumbotron>
        {
            return(new ComponentBuilder <TConfig, Jumbotron>(helper.Config, new Jumbotron(helper)));
        }
 public static ComponentBuilder <TConfig, Element> PullRight <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper)
     where TConfig : BootstrapConfig
     where TComponent : Component, ICanCreate <Tag>
 {
     return(new ComponentBuilder <TConfig, Element>(helper.Config, new Element(helper, "div"))
            .AddCss(Css.PullRight));
 }
Exemplo n.º 3
0
        // ListGroup

        public static ComponentBuilder <TConfig, ListGroup> ListGroup <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <ListGroup>
        {
            return(new ComponentBuilder <TConfig, ListGroup>(helper.Config, new ListGroup(helper)));
        }
Exemplo n.º 4
0
 public static ComponentBuilder <TConfig, Element> Element <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, string name)
     where TConfig : BootstrapConfig
     where TComponent : Component, ICanCreate <Tag>
 {
     return(new ComponentBuilder <TConfig, Element>(helper.Config, new Element(helper, name)));
 }
        // Dropdown items

        public static ComponentBuilder <TConfig, DropdownLink> DropdownLink <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, object text, string href = "#")
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <DropdownLink>
        {
            return(new ComponentBuilder <TConfig, DropdownLink>(helper.Config, new DropdownLink(helper))
                   .SetHref(href)
                   .SetText(text));
        }
 public static ComponentBuilder <TConfig, DropdownDivider> DropdownDivider <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper)
     where TComponent : Component, ICanCreate <DropdownDivider>
     where TConfig : BootstrapConfig
 {
     return(new ComponentBuilder <TConfig, DropdownDivider>(helper.Config, new DropdownDivider(helper)));
 }
        // ListGroupButton

        public static ComponentBuilder <TConfig, ListGroupButton> ListGroupButton <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, object text = null, object value = null)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <ListGroupButton>
        {
            return(new ComponentBuilder <TConfig, ListGroupButton>(helper.Config, new ListGroupButton(helper))
                   .SetText(text)
                   .SetValue(value));
        }
Exemplo n.º 8
0
 public static ComponentBuilder <TConfig, ProgressBars.Progress> Progress <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper)
     where TConfig : BootstrapConfig
     where TComponent : Component, ICanCreate <ProgressBars.Progress>
 {
     return(new ComponentBuilder <TConfig, ProgressBars.Progress>(helper.Config, new ProgressBars.Progress(helper)));
 }
Exemplo n.º 9
0
 internal static string GetControlName <TComponent, TModel>(BootstrapHelper <MvcBootstrapConfig <TModel>, TComponent> helper, string expressionText)
     where TComponent : Component
 {
     return(helper.GetConfig().HtmlHelper.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName(expressionText));
 }
Exemplo n.º 10
0
 public static ComponentBuilder <MvcBootstrapConfig <TModel>, ValidationSummary <TModel> > ValidationSummary <TComponent, TModel>(
     this BootstrapHelper <MvcBootstrapConfig <TModel>, TComponent> helper, bool includePropertyErrors = false)
     where TComponent : Component, ICanCreate <FormControl>
 {
     return(new ComponentBuilder <MvcBootstrapConfig <TModel>, ValidationSummary <TModel> >(helper.GetConfig(), new ValidationSummary <TModel>(helper)));
 }
Exemplo n.º 11
0
 public static ComponentBuilder <MvcBootstrapConfig <TModel>, HiddenFor <TModel, TValue> > HiddenFor <TComponent, TModel, TValue>(
     this BootstrapHelper <MvcBootstrapConfig <TModel>, TComponent> helper, Expression <Func <TModel, TValue> > expression)
     where TComponent : Component, ICanCreate <Hidden>
 {
     return(new ComponentBuilder <MvcBootstrapConfig <TModel>, HiddenFor <TModel, TValue> >(helper.GetConfig(), new HiddenFor <TModel, TValue>(helper, expression)));
 }
Exemplo n.º 12
0
 public static ComponentBuilder <MvcBootstrapConfig <TModel>, CheckBoxFor <TModel, TValue> > CheckBoxFor <TComponent, TModel, TValue>(
     this BootstrapHelper <MvcBootstrapConfig <TModel>, TComponent> helper, Expression <Func <TModel, TValue> > expression, bool isNameInLabel = true)
     where TComponent : Component, ICanCreate <CheckedControl>
 {
     return(new ComponentBuilder <MvcBootstrapConfig <TModel>, CheckBoxFor <TModel, TValue> >(helper.GetConfig(), new CheckBoxFor <TModel, TValue>(helper, expression, isNameInLabel)));
 }
Exemplo n.º 13
0
 public static ComponentBuilder <MvcBootstrapConfig <TModel>, ControlLabel> ControlLabel <TComponent, TModel, TValue>(
     this BootstrapHelper <MvcBootstrapConfig <TModel>, TComponent> helper, Expression <Func <TModel, TValue> > expression)
     where TComponent : Component, ICanCreate <ControlLabel>
 {
     return(GetControlLabel(helper, expression));
 }
Exemplo n.º 14
0
        // Pagination

        public static ComponentBuilder<TConfig, Pagination> Pagination<TConfig, TComponent>(this BootstrapHelper<TConfig, TComponent> helper)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate<Pagination>
        {
            return new ComponentBuilder<TConfig, Pagination>(helper.Config, new Pagination(helper));
        }
Exemplo n.º 15
0
 internal Content(BootstrapHelper helper, object content)
     : base(helper)
 {
     _content = content;
 }
Exemplo n.º 16
0
        // Container

        public static ComponentBuilder <TConfig, Container> Container <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <Container>
        {
            return(new ComponentBuilder <TConfig, Container>(helper.Config, new Container(helper)));
        }
 public static ComponentBuilder <TConfig, Pagination> Pagination <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, IEnumerable <KeyValuePair <string, string> > textAndHrefs, int?activePageNumber = null, int?firstPageNumber = null)
     where TConfig : BootstrapConfig
     where TComponent : Component, ICanCreate <Pagination>
 {
     return(new ComponentBuilder <TConfig, Pagination>(helper.Config, new Pagination(helper))
            .AddPages(textAndHrefs, activePageNumber, firstPageNumber));
 }
Exemplo n.º 18
0
 public static ComponentBuilder <TConfig, ProgressBar> ProgressBar <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, int value, int min = 0, int max = 100)
     where TConfig : BootstrapConfig
     where TComponent : Component, ICanCreate <ProgressBar>
 {
     return(new ComponentBuilder <TConfig, ProgressBar>(helper.Config, new ProgressBar(helper))
            .SetValue(value)
            .SetMin(min)
            .SetMax(max));
 }
        // PageNum

        public static ComponentBuilder <TConfig, PageNum> PageNum <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, object text, string href = "#")
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <PageNum>
        {
            return(new ComponentBuilder <TConfig, PageNum>(helper.Config, new PageNum(helper))
                   .SetHref(href)
                   .SetText(text));
        }
        // Dropdown

        public static ComponentBuilder <TConfig, Dropdown> Dropdown <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, object text = null)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <Dropdown>
        {
            return(new ComponentBuilder <TConfig, Dropdown>(helper.Config, new Dropdown(helper))
                   .SetText(text));
        }
Exemplo n.º 21
0
 public static ComponentBuilder <TConfig, TableData> TableData <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, object content = null)
     where TConfig : BootstrapConfig
     where TComponent : Component, ICanCreate <TableData>
 {
     return(new ComponentBuilder <TConfig, TableData>(helper.Config, new TableData(helper))
            .AddContent(content));
 }
Exemplo n.º 22
0
 public static ComponentBuilder <TConfig, IconSpan> Icon <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, Icon icon)
     where TConfig : BootstrapConfig
     where TComponent : Component, ICanCreate <IconSpan>
 {
     return(new ComponentBuilder <TConfig, IconSpan>(helper.Config, new IconSpan(helper, icon)));
 }
Exemplo n.º 23
0
        // Table

        public static ComponentBuilder <TConfig, Table> Table <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <Table>
        {
            return(new ComponentBuilder <TConfig, Table>(helper.Config, new Table(helper)));
        }
Exemplo n.º 24
0
        // ListGroupItem

        public static ComponentBuilder <TConfig, ListGroupItem> ListGroupItem <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, string text = null, string href = null)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <ListGroupItem>
        {
            return(new ComponentBuilder <TConfig, ListGroupItem>(helper.Config, new ListGroupItem(helper))
                   .SetText(text)
                   .SetHref(href));
        }
Exemplo n.º 25
0
        public static ComponentBuilder <TConfig, TableRow> TableDataRow <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, params object[] content)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <TableRow>
        {
            ComponentBuilder <TConfig, TableRow> builder = new ComponentBuilder <TConfig, TableRow>(helper.Config, new TableRow(helper));

            foreach (object c in content)
            {
                builder.AddChild(x => x.TableData().AddContent(c));
            }
            return(builder);
        }
Exemplo n.º 26
0
 public static ComponentBuilder <TConfig, Element> Span <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, string text = null)
     where TConfig : BootstrapConfig
     where TComponent : Component, ICanCreate <Tag>
 {
     return(new ComponentBuilder <TConfig, Element>(helper.Config, new Element(helper, "span")).SetText(text));
 }
Exemplo n.º 27
0
        // GridRow

        public static ComponentBuilder <TConfig, GridRow> GridRow <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <GridRow>
        {
            return(new ComponentBuilder <TConfig, GridRow>(helper.Config, new GridRow(helper)));
        }
Exemplo n.º 28
0
        // PageHeader

        public static ComponentBuilder <TConfig, PageHeader> PageHeader <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, string text = null)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <PageHeader>
        {
            return(new ComponentBuilder <TConfig, PageHeader>(helper.Config, new PageHeader(helper))
                   .SetText(text));
        }
Exemplo n.º 29
0
        // GridColumn

        public static ComponentBuilder <TConfig, GridColumn> GridColumn <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, int?md = null)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <GridColumn>
        {
            return(new ComponentBuilder <TConfig, GridColumn>(helper.Config, new GridColumn(helper))
                   .SetMd(md));
        }
Exemplo n.º 30
0
 internal Content(BootstrapHelper helper, string content)
     : base(helper)
 {
     _content = content;
 }
Exemplo n.º 31
0
        // Button dropdowns

        public static ComponentBuilder <TConfig, ButtonDropdown> ButtonDropdown <TConfig, TComponent>(this BootstrapHelper <TConfig, TComponent> helper, string text = null)
            where TConfig : BootstrapConfig
            where TComponent : Component, ICanCreate <ButtonDropdown>
        {
            return(new ComponentBuilder <TConfig, ButtonDropdown>(helper.Config, new ButtonDropdown(helper))
                   .SetText(text));
        }