mirror of https://github.com/abpframework/abp.git
62 changed files with 2628 additions and 103 deletions
@ -0,0 +1,10 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Nav |
|||
{ |
|||
public enum AbpNavAlign |
|||
{ |
|||
Default, |
|||
Start, |
|||
Center, |
|||
End |
|||
} |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Nav |
|||
{ |
|||
public class AbpNavItemTagHelper : AbpTagHelper<AbpNavItemTagHelper, AbpNavItemTagHelperService> |
|||
{ |
|||
public bool? Active { get; set; } |
|||
|
|||
public bool? Disabled { get; set; } |
|||
|
|||
public string Href { get; set; } |
|||
|
|||
public AbpNavItemTagHelper(AbpNavItemTagHelperService tagHelperService) |
|||
: base(tagHelperService) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,64 @@ |
|||
using System.Collections.Generic; |
|||
using System.Text.Encodings.Web; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Nav |
|||
{ |
|||
public class AbpNavItemTagHelperService : AbpTagHelperService<AbpNavItemTagHelper> |
|||
{ |
|||
private readonly HtmlEncoder _encoder; |
|||
|
|||
public AbpNavItemTagHelperService(HtmlEncoder encoder) |
|||
{ |
|||
_encoder = encoder; |
|||
} |
|||
|
|||
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
output.TagName = "a"; |
|||
output.TagMode = TagMode.StartTagAndEndTag; |
|||
output.Attributes.Add("href",TagHelper.Href); |
|||
SetClasses(context, output); |
|||
|
|||
output.Content.SetHtmlContent(await output.GetChildContentAsync()); |
|||
|
|||
var list = GetValueFromContext<List<NavItem>>(context, NavItemContents); |
|||
|
|||
list.Add(new NavItem |
|||
{ |
|||
Html = SurroundTagWithNavItem(context, output,RenderTagHelperOutput(output, _encoder)), |
|||
Active = TagHelper.Active??false |
|||
}); |
|||
|
|||
output.SuppressOutput(); |
|||
} |
|||
|
|||
protected virtual void SetClasses(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
output.Attributes.AddClass("nav-link"); |
|||
|
|||
SetDisabledClass(context, output); |
|||
SetActiveClass(context, output); |
|||
} |
|||
|
|||
protected virtual void SetDisabledClass(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
if (TagHelper.Disabled ?? false) |
|||
{ |
|||
output.Attributes.AddClass("disabled"); |
|||
} |
|||
} |
|||
|
|||
protected virtual void SetActiveClass(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
output.Attributes.AddClass(AbpNavItemActivePlaceholder); |
|||
} |
|||
|
|||
protected virtual string SurroundTagWithNavItem(TagHelperContext context, TagHelperOutput output, string html) |
|||
{ |
|||
return "<li class=\"nav-item "+ AbpNavItemResponsiveAlignPlaceholder +" " + AbpNavItemResponsiveFlexPlaceholder + "\">" + html + "</li>"; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Nav |
|||
{ |
|||
public class AbpNavTagHelper : AbpTagHelper<AbpNavTagHelper, AbpNavTagHelperService> |
|||
{ |
|||
public AbpNavAlign Align { get; set; } = AbpNavAlign.Default; |
|||
|
|||
public NavStyle NavStyle { get; set; } = NavStyle.Default; |
|||
|
|||
public bool? Responsive { get; set; } |
|||
|
|||
public AbpNavTagHelper(AbpNavTagHelperService tagHelperService) |
|||
: base(tagHelperService) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,112 @@ |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Nav |
|||
{ |
|||
public class AbpNavTagHelperService : AbpTagHelperService<AbpNavTagHelper> |
|||
{ |
|||
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
output.TagName = "ul"; |
|||
output.TagMode = TagMode.StartTagAndEndTag; |
|||
output.Attributes.AddClass("nav"); |
|||
SetAlign(context, output); |
|||
SetNavStyle(context, output); |
|||
SetResponsiveness(context, output); |
|||
|
|||
var list = InitilizeFormGroupContentsContext(context, output); |
|||
|
|||
await output.GetChildContentAsync(); |
|||
|
|||
|
|||
SetInnerList(context, output, list); |
|||
} |
|||
|
|||
protected virtual void SetInnerList(TagHelperContext context, TagHelperOutput output, List<NavItem> list) |
|||
{ |
|||
SetFirstOneActiveIfThereIsNotAny(context, output, list); |
|||
|
|||
var html = new StringBuilder(""); |
|||
|
|||
foreach (var navItem in list) |
|||
{ |
|||
var htmlPart = SetPlaceHolderClassesIfActiveAndGetHtml(navItem); |
|||
|
|||
html.AppendLine(htmlPart); |
|||
} |
|||
|
|||
output.Content.SetHtmlContent(html.ToString()); |
|||
} |
|||
|
|||
protected virtual string SetPlaceHolderClassesIfActiveAndGetHtml(NavItem item) |
|||
{ |
|||
var html = item.Html; |
|||
|
|||
html = item.Active ? |
|||
item.Html.Replace(AbpNavItemActivePlaceholder, " active") : |
|||
item.Html.Replace(AbpNavItemActivePlaceholder, ""); |
|||
|
|||
html = TagHelper.Responsive?? false? html.Replace(AbpNavItemResponsiveFlexPlaceholder, "flex-sm-fill").Replace(AbpNavItemResponsiveAlignPlaceholder, "text-sm-center") : |
|||
html.Replace(AbpNavItemResponsiveFlexPlaceholder, "").Replace(AbpNavItemResponsiveAlignPlaceholder, ""); |
|||
|
|||
return html; |
|||
} |
|||
|
|||
protected virtual void SetFirstOneActiveIfThereIsNotAny(TagHelperContext context, TagHelperOutput output, List<NavItem> list) |
|||
{ |
|||
if (list.Count > 0 && !list.Any(bc => bc.Active)) |
|||
{ |
|||
list.FirstOrDefault().Active = true; |
|||
} |
|||
} |
|||
|
|||
protected virtual void SetResponsiveness(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
if (TagHelper.Responsive??false) |
|||
{ |
|||
output.Attributes.AddClass("flex-sm-row"); |
|||
output.Attributes.AddClass("flex-column"); |
|||
} |
|||
} |
|||
|
|||
protected virtual List<NavItem> InitilizeFormGroupContentsContext(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
var items = new List<NavItem>(); |
|||
context.Items[NavItemContents] = items; |
|||
return items; |
|||
} |
|||
|
|||
protected virtual void SetAlign(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
if (TagHelper.Align == AbpNavAlign.Default) |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
output.Attributes.AddClass("justify-content-" + TagHelper.Align.ToString().ToLowerInvariant()); |
|||
} |
|||
|
|||
protected virtual void SetNavStyle(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
switch (TagHelper.NavStyle) |
|||
{ |
|||
case NavStyle.Default: |
|||
return; |
|||
case NavStyle.Pill: |
|||
output.Attributes.AddClass("nav-pills"); |
|||
break; |
|||
case NavStyle.Vertical: |
|||
output.Attributes.AddClass("flex-column"); |
|||
break; |
|||
case NavStyle.PillVertical: |
|||
output.Attributes.AddClass("nav-pills"); |
|||
output.Attributes.AddClass("flex-column"); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Nav |
|||
{ |
|||
public class NavItem |
|||
{ |
|||
public string Html { get; set; } |
|||
|
|||
public bool Active { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Nav |
|||
{ |
|||
public enum NavStyle |
|||
{ |
|||
Default, |
|||
Vertical, |
|||
Pill, |
|||
PillVertical |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
public enum AbpTableBorderStyle |
|||
{ |
|||
Default, |
|||
Bordered, |
|||
Borderless |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
[HtmlTargetElement("th")] |
|||
public class AbpTableHeadScopeTagHelper : AbpTagHelper<AbpTableHeadScopeTagHelper, AbpTableHeadScopeTagHelperService> |
|||
{ |
|||
public AbpThScope Scope { get; set; } = AbpThScope.Default; |
|||
|
|||
public AbpTableHeadScopeTagHelper(AbpTableHeadScopeTagHelperService tagHelperService) |
|||
: base(tagHelperService) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
public class AbpTableHeadScopeTagHelperService : AbpTagHelperService<AbpTableHeadScopeTagHelper> |
|||
{ |
|||
public override void Process(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
SetScope(context, output); |
|||
} |
|||
|
|||
protected virtual void SetScope(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
switch (TagHelper.Scope) |
|||
{ |
|||
case AbpThScope.Default: |
|||
return; |
|||
case AbpThScope.Row: |
|||
output.Attributes.Add("scope", "row"); |
|||
return; |
|||
case AbpThScope.Column: |
|||
output.Attributes.Add("scope","col"); |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
[HtmlTargetElement("thead")] |
|||
public class AbpTableHeaderTagHelper : AbpTagHelper<AbpTableHeaderTagHelper, AbpTableHeaderTagHelperService> |
|||
{ |
|||
public AbpTableHeaderTheme Theme { get; set; } = AbpTableHeaderTheme.Default; |
|||
|
|||
public AbpTableHeaderTagHelper(AbpTableHeaderTagHelperService tagHelperService) |
|||
: base(tagHelperService) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
public class AbpTableHeaderTagHelperService : AbpTagHelperService<AbpTableHeaderTagHelper> |
|||
{ |
|||
public override void Process(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
SetTheme(context, output); |
|||
} |
|||
|
|||
protected virtual void SetTheme(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
switch (TagHelper.Theme) |
|||
{ |
|||
case AbpTableHeaderTheme.Default: |
|||
return; |
|||
case AbpTableHeaderTheme.Dark: |
|||
output.Attributes.AddClass("thead-dark"); |
|||
return; |
|||
case AbpTableHeaderTheme.Light: |
|||
output.Attributes.AddClass("thead-light"); |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
public enum AbpTableHeaderTheme |
|||
{ |
|||
Default, |
|||
Light, |
|||
Dark |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
public enum AbpTableStyle |
|||
{ |
|||
Default, |
|||
Primary, |
|||
Secondary, |
|||
Success, |
|||
Danger, |
|||
Warning, |
|||
Info, |
|||
Light, |
|||
Dark, |
|||
Active, |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
[HtmlTargetElement("tr")] |
|||
[HtmlTargetElement("td")] |
|||
public class AbpTableStyleTagHelper : AbpTagHelper<AbpTableStyleTagHelper, AbpTableStyleTagHelperService> |
|||
{ |
|||
public AbpTableStyle AbpTableStyle { get; set; } = AbpTableStyle.Default; |
|||
|
|||
public AbpTableStyle AbpDarkTableStyle { get; set; } = AbpTableStyle.Default; |
|||
|
|||
public AbpTableStyleTagHelper(AbpTableStyleTagHelperService tagHelperService) |
|||
: base(tagHelperService) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
public class AbpTableStyleTagHelperService : AbpTagHelperService<AbpTableStyleTagHelper> |
|||
{ |
|||
public override void Process(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
SetStyle(context,output); |
|||
} |
|||
|
|||
protected virtual void SetStyle(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
if (TagHelper.AbpTableStyle != AbpTableStyle.Default) |
|||
{ |
|||
output.Attributes.AddClass("table-" + TagHelper.AbpTableStyle.ToString().ToLowerInvariant()); |
|||
} |
|||
} |
|||
|
|||
protected virtual void SetDarkTableStyle(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
if (TagHelper.AbpDarkTableStyle != AbpTableStyle.Default) |
|||
{ |
|||
output.Attributes.AddClass("bg-" + TagHelper.AbpDarkTableStyle.ToString().ToLowerInvariant()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
public class AbpTableTagHelper : AbpTagHelper<AbpTableTagHelper, AbpTableTagHelperService> |
|||
{ |
|||
public bool? Responsive { get; set; } |
|||
public bool? ResponsiveSm { get; set; } |
|||
public bool? ResponsiveMd { get; set; } |
|||
public bool? ResponsiveLg { get; set; } |
|||
public bool? ResponsiveXl { get; set; } |
|||
|
|||
public bool? DarkTheme { get; set; } |
|||
|
|||
public bool? StripedRows { get; set; } |
|||
|
|||
public bool? HoverableRows { get; set; } |
|||
|
|||
public bool? Small { get; set; } |
|||
|
|||
public AbpTableBorderStyle BorderStyle { get; set; } = AbpTableBorderStyle.Default; |
|||
|
|||
public AbpTableTagHelper(AbpTableTagHelperService tagHelperService) |
|||
: base(tagHelperService) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
using Microsoft.AspNetCore.Razor.TagHelpers; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Microsoft.AspNetCore.Razor.TagHelpers; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
public class AbpTableTagHelperService : AbpTagHelperService<AbpTableTagHelper> |
|||
{ |
|||
public override void Process(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
output.TagName = "table"; |
|||
output.Attributes.AddClass("table"); |
|||
|
|||
SetResponsiveness(context, output); |
|||
SetTheme(context, output); |
|||
SetHoverableRows(context, output); |
|||
SetBorderStyle(context, output); |
|||
SetSmall(context, output); |
|||
SetStripedRows(context, output); |
|||
} |
|||
|
|||
protected virtual void SetResponsiveness(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
if (TagHelper.Responsive ?? false) |
|||
{ |
|||
output.PreElement.SetHtmlContent("<div class=\"table-responsive\">"); |
|||
} |
|||
else if (TagHelper.ResponsiveSm ?? false) |
|||
{ |
|||
output.PreElement.SetHtmlContent("<div class=\"table-responsive-sm\">"); |
|||
} |
|||
else if (TagHelper.ResponsiveMd ?? false) |
|||
{ |
|||
output.PreElement.SetHtmlContent("<div class=\"table-responsive-md\">"); |
|||
} |
|||
else if (TagHelper.ResponsiveLg ?? false) |
|||
{ |
|||
output.PreElement.SetHtmlContent("<div class=\"table-responsive-lg\">"); |
|||
} |
|||
else if (TagHelper.ResponsiveXl ?? false) |
|||
{ |
|||
output.PreElement.SetHtmlContent("<div class=\"table-responsive-xl\">"); |
|||
} |
|||
else |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
output.PostElement.SetHtmlContent("</div>"); |
|||
} |
|||
|
|||
protected virtual void SetTheme(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
if (TagHelper.DarkTheme ?? false) |
|||
{ |
|||
output.Attributes.AddClass("table-dark"); |
|||
} |
|||
} |
|||
|
|||
protected virtual void SetStripedRows(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
if (TagHelper.StripedRows ?? false) |
|||
{ |
|||
output.Attributes.AddClass("table-striped"); |
|||
} |
|||
} |
|||
|
|||
protected virtual void SetHoverableRows(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
if (TagHelper.HoverableRows ?? false) |
|||
{ |
|||
output.Attributes.AddClass("table-hover"); |
|||
} |
|||
} |
|||
|
|||
protected virtual void SetSmall(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
if (TagHelper.Small ?? false) |
|||
{ |
|||
output.Attributes.AddClass("table-sm"); |
|||
} |
|||
} |
|||
|
|||
protected virtual void SetBorderStyle(TagHelperContext context, TagHelperOutput output) |
|||
{ |
|||
switch (TagHelper.BorderStyle) |
|||
{ |
|||
case AbpTableBorderStyle.Default: |
|||
return; |
|||
case AbpTableBorderStyle.Bordered: |
|||
output.Attributes.AddClass("table-bordered"); |
|||
return; |
|||
case AbpTableBorderStyle.Borderless: |
|||
output.Attributes.AddClass("table-borderless"); |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table |
|||
{ |
|||
public enum AbpThScope |
|||
{ |
|||
Default, |
|||
Row, |
|||
Column |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,34 @@ |
|||
@page |
|||
@model Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components.NavsModel |
|||
@{ |
|||
ViewData["Title"] = "Navs"; |
|||
} |
|||
|
|||
<h2>Navs</h2> |
|||
|
|||
<p>Based on <a href="https://getbootstrap.com/docs/4.1/components/navs/" target="_blank"> Bootstrap Navs</a>.</p> |
|||
|
|||
<h4># Navs Examples</h4> |
|||
|
|||
<div class="demo-with-code"> |
|||
<div class="demo-area"> |
|||
|
|||
<abp-nav nav-style="Pill" responsive="true" align="Center"> |
|||
<abp-nav-item href="#">Active</abp-nav-item> |
|||
<abp-nav-item href="#">Longer nav link</abp-nav-item> |
|||
<abp-nav-item href="#">Link</abp-nav-item> |
|||
<abp-nav-item href="#" disabled="true">Disabled</abp-nav-item> |
|||
</abp-nav> |
|||
|
|||
</div> |
|||
<div class="code-area"> |
|||
<pre> |
|||
<abp-nav nav-style="Pill" responsive="true" align="Center"> |
|||
<abp-nav-item href="#">Active</abp-nav-item> |
|||
<abp-nav-item href="#">Longer nav link</abp-nav-item> |
|||
<abp-nav-item href="#">Link</abp-nav-item> |
|||
<abp-nav-item href="#" disabled="true">Disabled</abp-nav-item> |
|||
</abp-nav> |
|||
</pre> |
|||
</div> |
|||
</div> |
|||
@ -0,0 +1,17 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.AspNetCore.Mvc.RazorPages; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components |
|||
{ |
|||
public class NavsModel : PageModel |
|||
{ |
|||
public void OnGet() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,82 @@ |
|||
@page |
|||
@model Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components.TablesModel |
|||
@{ |
|||
ViewData["Title"] = "Tables"; |
|||
} |
|||
|
|||
<h2>Tables</h2> |
|||
|
|||
<p>Based on <a href="https://getbootstrap.com/docs/4.1/content/Tables/" target="_blank"> Bootstrap Tables</a>.</p> |
|||
|
|||
<h4># Tables Examples</h4> |
|||
|
|||
<div class="demo-with-code"> |
|||
<div class="demo-area"> |
|||
|
|||
<abp-table striped-rows="true" hoverable-rows="true" responsive-sm="true"> |
|||
<thead theme="Dark"> |
|||
<tr> |
|||
<th scope="Column">#</th> |
|||
<th scope="Column">First</th> |
|||
<th scope="Column">Last</th> |
|||
<th scope="Column">Handle</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr> |
|||
<th scope="Row">1</th> |
|||
<td>Mark</td> |
|||
<td>Otto</td> |
|||
<td abp-table-style="Danger">mdo</td> |
|||
</tr> |
|||
<tr abp-table-style="Warning"> |
|||
<th scope="Row">2</th> |
|||
<td>Jacob</td> |
|||
<td>Thornton</td> |
|||
<td>fat</td> |
|||
</tr> |
|||
<tr> |
|||
<th scope="Row">3</th> |
|||
<td abp-table-style="Success">Larry</td> |
|||
<td>the Bird</td> |
|||
<td>twitter</td> |
|||
</tr> |
|||
</tbody> |
|||
</abp-table> |
|||
|
|||
</div> |
|||
<div class="code-area"> |
|||
<pre> |
|||
<abp-table striped-rows="true" small="true" hoverable-rows="true" responsive-sm="true"> |
|||
<thead theme="Dark"> |
|||
<tr> |
|||
<th scope="Column">#</th> |
|||
<th scope="Column">First</th> |
|||
<th scope="Column">Last</th> |
|||
<th scope="Column">Handle</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr> |
|||
<th scope="Row">1</th> |
|||
<td>Mark</td> |
|||
<td>Otto</td> |
|||
<td abp-table-style="Danger">mdo</td> |
|||
</tr> |
|||
<tr abp-table-style="Warning"> |
|||
<th scope="Row">2</th> |
|||
<td>Jacob</td> |
|||
<td>Thornton</td> |
|||
<td>fat</td> |
|||
</tr> |
|||
<tr> |
|||
<th scope="Row">3</th> |
|||
<td abp-table-style="Success">Larry</td> |
|||
<td>the Bird</td> |
|||
<td>twitter</td> |
|||
</tr> |
|||
</tbody> |
|||
</abp-table> |
|||
</pre> |
|||
</div> |
|||
</div> |
|||
@ -0,0 +1,17 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.AspNetCore.Mvc.RazorPages; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components |
|||
{ |
|||
public class TablesModel : PageModel |
|||
{ |
|||
public void OnGet() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue