Browse Source

boostrap demo - form components added

pull/2972/head
Ahmet Çotur 6 years ago
parent
commit
6340083da1
  1. 13
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/ButtonGroupsDemo/Default.cshtml
  2. 10
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/ButtonsDemo/Default.cshtml
  3. 22
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DropdownsDemo/Default.cshtml
  4. 17
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DropdownsDemo/DropDownDemoModel.cs
  5. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DropdownsDemo/DropdownsDemoViewComponent.cs
  6. 159
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DynamicFormsDemo/Default.cshtml
  7. 139
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DynamicFormsDemo/DynamicFormsDemoModel.cs
  8. 18
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DynamicFormsDemo/DynamicFormsDemoViewComponent.cs
  9. 124
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/FormElementsDemo/Default.cshtml
  10. 85
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/FormElementsDemo/FormElementsDemoModel.cs
  11. 18
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/FormElementsDemo/FormElementsDemoViewComponent.cs
  12. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj
  13. 77
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/BasicThemeDemoMenuContributor.cs
  14. 6
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/DynamicForms/Index.cshtml
  15. 17
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/DynamicForms/Index.cshtml.cs
  16. 6
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/FormElements/Index.cshtml
  17. 17
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/FormElements/Index.cshtml.cs

13
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/ButtonGroupsDemo/Default.cshtml

@ -61,8 +61,15 @@
<abp-component-demo-section title="Vertical variation" view-path="@ButtonGroupsDemoViewComponent.ViewPath">
<abp-button-group direction="Vertical">
<abp-button button-type="Secondary">Left</abp-button>
<abp-button button-type="Secondary">Middle</abp-button>
<abp-button button-type="Secondary">Right</abp-button>
<abp-button button-type="Secondary">Button</abp-button>
<abp-button button-type="Secondary">Button</abp-button>
<abp-button button-type="Secondary">Button</abp-button>
<abp-dropdown>
<abp-dropdown-button button-type="Secondary" text="Dropdown" />
<abp-dropdown-menu>
<abp-dropdown-item href="#"> Dropdown link </abp-dropdown-item>
<abp-dropdown-item href="#"> Dropdown link </abp-dropdown-item>
</abp-dropdown-menu>
</abp-dropdown>
</abp-button-group>
</abp-component-demo-section>

10
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/ButtonsDemo/Default.cshtml

@ -24,6 +24,16 @@
<abp-button button-type="Outline_Dark">Dark</abp-button>
</abp-component-demo-section>
<abp-component-demo-section title="Sizes" view-path="@ButtonsDemoViewComponent.ViewPath">
<abp-button size="Large" button-type="Primary" text="Large button" />
<abp-button size="Small" button-type="Primary" text="Small button" />
<abp-button size="Large" button-type="Secondary" text="Large button" />
<abp-button size="Small" button-type="Secondary" text="Small button" />
<hr />
<abp-button size="Block" button-type="Primary" text="Block level button" />
<abp-button size="Block" button-type="Secondary" text="Block level button" />
</abp-component-demo-section>
<abp-component-demo-section title="Icons" view-path="@ButtonsDemoViewComponent.ViewPath">
<abp-button button-type="Warning" icon="pencil" text="Edit" />
<abp-button button-type="Info" icon-type="FontAwesome" icon="info" text="Information" />

22
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DropdownsDemo/Default.cshtml

@ -1,4 +1,5 @@
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.DropdownsDemo
@model DropDownDemoDemoModel
<abp-component-demo-section title="Single button" view-path="@DropdownsDemoViewComponent.ViewPath">
<abp-dropdown>
@ -153,6 +154,27 @@
</abp-dropdown>
</abp-component-demo-section>
<div class="row">
<div class="col-md-12">
<h3>The form model is:</h3>
<hr />
<textarea style="width:100%;height: 320px" disabled>
public class LoginDto
{
[Required]
[EmailAddress]
public string EmailAddress { get; set; }
[Required]
[DataType(DataType.Password)]
public string Password { get; set; }
public bool RememberMe { get; set; }
}
</textarea>
</div>
</div>
<abp-component-demo-section title="With Form" view-path="@DropdownsDemoViewComponent.ViewPath">
<abp-dropdown>
<abp-dropdown-button button-type="Secondary" text="Dropdown With Form" />

17
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DropdownsDemo/DropDownDemoModel.cs

@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.DropdownsDemo
{
public class DropDownDemoDemoModel
{
[Required]
[EmailAddress]
public string EmailAddress { get; set; }
[Required]
[DataType(DataType.Password)]
public string Password { get; set; }
public bool RememberMe { get; set; }
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DropdownsDemo/DropdownsDemoViewComponent.cs

@ -10,7 +10,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.S
public IViewComponentResult Invoke()
{
return View(ViewPath);
var Model = new DropDownDemoDemoModel();
return View(ViewPath, Model);
}
}
}

159
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DynamicFormsDemo/Default.cshtml

@ -0,0 +1,159 @@
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.DynamicFormsDemo
@model DynamicFormsDemoModel
<div class="row">
<div class="col-md-12">
<h3>The form model is:</h3>
<hr />
<textarea style="width:100%;height: 320px" disabled>
public List<SelectListItem> CountryList { get; set; } = new List<SelectListItem>
{
new SelectListItem { Value = "CA", Text = "Canada"},
new SelectListItem { Value = "US", Text = "USA"},
new SelectListItem { Value = "UK", Text = "United Kingdom"},
new SelectListItem { Value = "RU", Text = "Russia"}
};
public enum CarType
{
Sedan,
Hatchback,
StationWagon,
Coupe
}
public class DetailedModel
{
[Required]
[Placeholder("Enter your name...")]
[Display(Name = "Name")]
public string Name { get; set; }
[TextArea(Rows = 4)]
[Display(Name = "Description")]
[InputInfoText("Describe Yourself")]
public string Description { get; set; }
[Required]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
[Display(Name = "Is Active")]
public bool IsActive { get; set; }
[Required]
[Display(Name = "Age")]
public int Age { get; set; }
[Required]
[Display(Name = "My Car Type")]
public CarType MyCarType { get; set; }
[Required]
[AbpRadioButton(Inline = true)]
[Display(Name = "Your Car Type")]
public CarType YourCarType { get; set; }
[DataType(DataType.Date)]
[Display(Name = "Day")]
public DateTime Day { get; set; }
[SelectItems(nameof(CountryList))]
[Display(Name = "Country")]
public string Country { get; set; }
[SelectItems(nameof(CountryList))]
[Display(Name = "Neighbor Countries")]
public List<string> NeighborCountries { get; set; }
public DetailedModel()
{
Name = "";
Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
IsActive = true;
Age = 65;
Day = DateTime.Now;
MyCarType = CarType.Coupe;
YourCarType = CarType.Sedan;
Country = "RU";
NeighborCountries = new List<string>() { "UK", "CA" };
}
}
</textarea>
</div>
</div>
<abp-component-demo-section title="Detailed Form" view-path="@DynamicFormsDemoViewComponent.ViewPath">
<abp-dynamic-form abp-model="@Model.MyDetailedModel" submit-button="true" />
</abp-component-demo-section>
<div class="row">
<div class="col-md-12">
<h3>The form model is:</h3>
<hr />
<textarea style="width:100%;height: 320px" disabled>
public class OrderExampleModel
{
[DisplayOrder(10005)]
public string Surname { get; set; }
//Default 10000
public string EmailAddress { get; set; }
[DisplayOrder(10003)]
public string Name { get; set; }
[DisplayOrder(9999)]
public string City { get; set; }
}
</textarea>
</div>
</div>
<abp-component-demo-section title="Order Attribute Example" view-path="@DynamicFormsDemoViewComponent.ViewPath">
<abp-dynamic-form abp-model="@Model.MyOrderExampleModel"/>
</abp-component-demo-section>
<div class="row">
<div class="col-md-12">
<h3>The form model is:</h3>
<hr />
<textarea style="width:100%;height: 320px" disabled>
public class AttributeExamplesModel
{
[HiddenInput]
public string HiddenInput { get; set; }
[DisabledInput]
public string DisabledInput { get; set; }
[ReadOnlyInput]
public string ReadonlyInput { get; set; }
[FormControlSize(AbpFormControlSize.Large)]
public string LargeInput { get; set; }
[FormControlSize(AbpFormControlSize.Small)]
public string SmallInput { get; set; }
}
</textarea>
</div>
</div>
<abp-component-demo-section title="Attribute Examples" view-path="@DynamicFormsDemoViewComponent.ViewPath">
<abp-dynamic-form abp-model="@Model.MyAttributeExamplesModel" />
</abp-component-demo-section>
<abp-component-demo-section title="Form Content Placement" view-path="@DynamicFormsDemoViewComponent.ViewPath">
<div style="color:red">
First Div! <br />
---------
</div>
<abp-dynamic-form abp-model="@Model.MyAttributeExamplesModel" />
<div style="color:blue">
--------- <br />
Second Div!
</div>
</abp-component-demo-section>

139
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DynamicFormsDemo/DynamicFormsDemoModel.cs

@ -0,0 +1,139 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.DynamicFormsDemo
{
public class DynamicFormsDemoModel
{
public List<SelectListItem> CountryList { get; set; } = new List<SelectListItem>
{
new SelectListItem { Value = "CA", Text = "Canada"},
new SelectListItem { Value = "US", Text = "USA"},
new SelectListItem { Value = "UK", Text = "United Kingdom"},
new SelectListItem { Value = "RU", Text = "Russia"}
};
public enum CarType
{
Sedan,
Hatchback,
StationWagon,
Coupe
}
public class DetailedModel
{
[Required]
[Placeholder("Enter your name...")]
[Display(Name = "Name")]
public string Name { get; set; }
[TextArea(Rows = 4)]
[Display(Name = "Description")]
[InputInfoText("Describe Yourself")]
public string Description { get; set; }
[Required]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
[Display(Name = "Is Active")]
public bool IsActive { get; set; }
[Required]
[Display(Name = "Age")]
public int Age { get; set; }
[Required]
[Display(Name = "My Car Type")]
public CarType MyCarType { get; set; }
[Required]
[AbpRadioButton(Inline = true)]
[Display(Name = "Your Car Type")]
public CarType YourCarType { get; set; }
[DataType(DataType.Date)]
[Display(Name = "Day")]
public DateTime Day { get; set; }
[SelectItems(nameof(CountryList))]
[Display(Name = "Country")]
public string Country { get; set; }
[SelectItems(nameof(CountryList))]
[Display(Name = "Neighbor Countries")]
public List<string> NeighborCountries { get; set; }
public DetailedModel()
{
Name = "";
Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
IsActive = true;
Age = 65;
Day = DateTime.Now;
MyCarType = CarType.Coupe;
YourCarType = CarType.Sedan;
Country = "RU";
NeighborCountries = new List<string>() { "UK", "CA" };
}
}
public class OrderExampleModel
{
[DisplayOrder(10005)]
public string Surname { get; set; }
//Default 10000
public string EmailAddress { get; set; }
[DisplayOrder(10003)]
public string Name { get; set; }
[DisplayOrder(9999)]
public string City { get; set; }
}
public class AttributeExamplesModel
{
[HiddenInput]
public string HiddenInput { get; set; }
[DisabledInput]
public string DisabledInput { get; set; }
[ReadOnlyInput]
public string ReadonlyInput { get; set; }
[FormControlSize(AbpFormControlSize.Large)]
public string LargeInput { get; set; }
[FormControlSize(AbpFormControlSize.Small)]
public string SmallInput { get; set; }
}
public DetailedModel MyDetailedModel { get; set; }
public OrderExampleModel MyOrderExampleModel { get; set; }
public AttributeExamplesModel MyAttributeExamplesModel { get; set; }
public DynamicFormsDemoModel()
{
MyDetailedModel = new DetailedModel();
MyOrderExampleModel = new OrderExampleModel();
MyAttributeExamplesModel = new AttributeExamplesModel();
MyAttributeExamplesModel.DisabledInput = "Disabled Input";
MyAttributeExamplesModel.ReadonlyInput = "Readonly Input";
MyAttributeExamplesModel.LargeInput = "Large Input";
MyAttributeExamplesModel.SmallInput = "Small Input";
}
}
}

18
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DynamicFormsDemo/DynamicFormsDemoViewComponent.cs

@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.DynamicFormsDemo
{
[Widget]
public class DynamicFormsDemoViewComponent : AbpViewComponent
{
public const string ViewPath = "/Views/Components/Themes/Shared/Demos/DynamicForms/Default.cshtml";
public IViewComponentResult Invoke()
{
var model = new DynamicFormsDemoModel();
return View(ViewPath, model);
}
}
}

124
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/FormElementsDemo/Default.cshtml

@ -0,0 +1,124 @@
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.FormElementsDemo
@model FormElementsDemoModel
<div class="row">
<div class="col-md-12">
<h3>The form model is:</h3>
<hr />
<textarea style="width:100%;height: 320px" disabled>
public class FormElementsDemoModel
{
public enum CarType
{
Sedan,
Hatchback,
StationWagon,
Coupe
}
public List<SelectListItem> CityList { get; set; } = new List<SelectListItem>
{
new SelectListItem { Value = "NY", Text = "New York"},
new SelectListItem { Value = "LDN", Text = "London"},
new SelectListItem { Value = "IST", Text = "Istanbul"},
new SelectListItem { Value = "MOS", Text = "Moscow"}
};
public class InformMeModel
{
[Required]
public string Name { get; set; }
[Required]
[DataType(DataType.Password)]
public string Password { get; set; }
public bool CheckMeOut { get; set; }
}
public class DetailsModel
{
[Required]
public string EmailAddress { get; set; }
public string City { get; set; }
public List<string> Cities { get; set; }
[TextArea]
public string Description { get; set; }
}
public class CheckboxModel
{
public bool DefaultCheckbox { get; set; }
public bool DisabledCheckbox { get; set; }
}
public class CityRadioModel
{
[Display(Name = "City")]
public string CityRadio { get; set; }
}
public class EnumModel
{
public CarType CarType { get; set; }
}
public InformMeModel MyInformMeModel { get; set; }
public DetailsModel MyDetailsModel { get; set; }
public CheckboxModel MyCheckboxModel { get; set; }
public CityRadioModel MyCityRadioModel { get; set; }
public EnumModel MyEnumModel { get; set; }
public FormElementsDemoModel()
{
MyInformMeModel = new InformMeModel();
MyDetailsModel = new DetailsModel();
MyCheckboxModel = new CheckboxModel();
MyCityRadioModel = new CityRadioModel() { CityRadio = "IST" };
MyEnumModel = new EnumModel();
}
}
</textarea>
</div>
</div>
<abp-component-demo-section title="Example" view-path="@FormElementsDemoViewComponent.ViewPath">
<abp-input asp-for="@Model.MyInformMeModel.Name" label="Name" />
<abp-input asp-for="@Model.MyInformMeModel.Password" label="Password" />
<abp-input asp-for="@Model.MyInformMeModel.CheckMeOut" label="Check Me Out" />
</abp-component-demo-section>
<abp-component-demo-section title="Form controls" view-path="@FormElementsDemoViewComponent.ViewPath">
<abp-input asp-for="@Model.MyDetailsModel.EmailAddress" label="Email Address" placeholder="name@example.com" />
<abp-select asp-for="@Model.MyDetailsModel.City" asp-items="@Model.CityList" label="City" />
<abp-select asp-for="@Model.MyDetailsModel.Cities" asp-items="@Model.CityList" label="Cities" />
<abp-input asp-for="@Model.MyDetailsModel.Description" label="Description" />
</abp-component-demo-section>
<abp-component-demo-section title="Sizing" view-path="@FormElementsDemoViewComponent.ViewPath">
<abp-input asp-for="@Model.MyInformMeModel.Name" size="Large" />
<abp-input asp-for="@Model.MyInformMeModel.Name" size="Small" />
</abp-component-demo-section>
<abp-component-demo-section title="Disabled And ReadOnly" view-path="@FormElementsDemoViewComponent.ViewPath">
<abp-input asp-for="@Model.MyInformMeModel.Name" disabled="true" />
<abp-input asp-for="@Model.MyInformMeModel.Name" readonly="true" />
</abp-component-demo-section>
<abp-component-demo-section title="Checkboxes" view-path="@FormElementsDemoViewComponent.ViewPath">
<abp-input asp-for="@Model.MyCheckboxModel.DefaultCheckbox" />
<abp-input asp-for="@Model.MyCheckboxModel.DisabledCheckbox" disabled="true" />
</abp-component-demo-section>
<abp-component-demo-section title="Radios" view-path="@FormElementsDemoViewComponent.ViewPath">
<abp-radio asp-for="@Model.MyCityRadioModel.CityRadio" asp-items="@Model.CityList" inline="true" />
</abp-component-demo-section>
<abp-component-demo-section title="Enum" view-path="@FormElementsDemoViewComponent.ViewPath">
<abp-select asp-for="@Model.MyEnumModel.CarType" />
</abp-component-demo-section>

85
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/FormElementsDemo/FormElementsDemoModel.cs

@ -0,0 +1,85 @@
using Microsoft.AspNetCore.Mvc.Rendering;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.FormElementsDemo
{
public class FormElementsDemoModel
{
public enum CarType
{
Sedan,
Hatchback,
StationWagon,
Coupe
}
public List<SelectListItem> CityList { get; set; } = new List<SelectListItem>
{
new SelectListItem { Value = "NY", Text = "New York"},
new SelectListItem { Value = "LDN", Text = "London"},
new SelectListItem { Value = "IST", Text = "Istanbul"},
new SelectListItem { Value = "MOS", Text = "Moscow"}
};
public class InformMeModel
{
[Required]
public string Name { get; set; }
[Required]
[DataType(DataType.Password)]
public string Password { get; set; }
public bool CheckMeOut { get; set; }
}
public class DetailsModel
{
[Required]
public string EmailAddress { get; set; }
public string City { get; set; }
public List<string> Cities { get; set; }
[TextArea]
public string Description { get; set; }
}
public class CheckboxModel
{
public bool DefaultCheckbox { get; set; }
public bool DisabledCheckbox { get; set; }
}
public class CityRadioModel
{
[Display(Name = "City")]
public string CityRadio { get; set; }
}
public class EnumModel
{
public CarType CarType { get; set; }
}
public InformMeModel MyInformMeModel { get; set; }
public DetailsModel MyDetailsModel { get; set; }
public CheckboxModel MyCheckboxModel { get; set; }
public CityRadioModel MyCityRadioModel { get; set; }
public EnumModel MyEnumModel { get; set; }
public FormElementsDemoModel()
{
MyInformMeModel = new InformMeModel();
MyDetailsModel = new DetailsModel();
MyCheckboxModel = new CheckboxModel();
MyCityRadioModel = new CityRadioModel() { CityRadio = "IST" };
MyEnumModel = new EnumModel();
}
}
}

18
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/FormElementsDemo/FormElementsDemoViewComponent.cs

@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.FormElementsDemo
{
[Widget]
public class FormElementsDemoViewComponent : AbpViewComponent
{
public const string ViewPath = "/Views/Components/Themes/Shared/Demos/FormElements/Default.cshtml";
public IViewComponentResult Invoke()
{
var model = new FormElementsDemoModel();
return View(ViewPath, model);
}
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj

@ -31,4 +31,8 @@
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Views\Components\Themes\Shared\Demos\PaginatorDemo\" />
</ItemGroup>
</Project>

77
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/BasicThemeDemoMenuContributor.cs

@ -1,4 +1,5 @@
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.UI.Navigation;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo
@ -18,58 +19,32 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo
private void AddMainMenuItems(MenuConfigurationContext context)
{
var menuItem = new ApplicationMenuItem("BasicThemeDemo.Components", "Components");
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Alerts", "Alerts", url: "/Components/Alerts")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Badges", "Badges", url: "/Components/Badges")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Borders", "Borders", url: "/Components/Borders")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Breadcrumbs", "Breadcrumbs", url: "/Components/Breadcrumbs")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Buttons", "Buttons", url: "/Components/Buttons")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Cards", "Cards", url: "/Components/Cards")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Collapse", "Collapse", url: "/Components/Collapse")
);
//menuItem.AddItem(
// new ApplicationMenuItem("BasicThemeDemo.Components.Dropdowns", "Dropdowns", url: "/Components/Dropdowns")
//);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Grids", "Grids", url: "/Components/Grids")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.ListGroups", "List Groups", url: "/Components/ListGroups")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Modals", "Modals", url: "/Components/Modals")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Navs", "Navs", url: "/Components/Navs")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Popovers", "Popovers", url: "/Components/Popovers")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.ProgressBars", "Progress Bars", url: "/Components/ProgressBars")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Tables", "Tables", url: "/Components/Tables")
);
menuItem.AddItem(
new ApplicationMenuItem("BasicThemeDemo.Components.Tabs", "Tabs", url: "/Components/Tabs")
);
menuItem.AddItem(
var items = new List<ApplicationMenuItem>()
{
new ApplicationMenuItem("BasicThemeDemo.Components.Alerts", "Alerts", url: "/Components/Alerts"),
new ApplicationMenuItem("BasicThemeDemo.Components.Badges", "Badges", url: "/Components/Badges"),
new ApplicationMenuItem("BasicThemeDemo.Components.Borders", "Borders", url: "/Components/Borders"),
new ApplicationMenuItem("BasicThemeDemo.Components.Breadcrumbs", "Breadcrumbs", url: "/Components/Breadcrumbs"),
new ApplicationMenuItem("BasicThemeDemo.Components.Buttons", "Buttons", url: "/Components/Buttons"),
new ApplicationMenuItem("BasicThemeDemo.Components.ButtonGroups", "ButtonGroups", url: "/Components/ButtonGroups"),
new ApplicationMenuItem("BasicThemeDemo.Components.Cards", "Cards", url: "/Components/Cards"),
new ApplicationMenuItem("BasicThemeDemo.Components.Collapse", "Collapse", url: "/Components/Collapse"),
new ApplicationMenuItem("BasicThemeDemo.Components.Dropdowns", "Dropdowns", url: "/Components/Dropdowns"),
new ApplicationMenuItem("BasicThemeDemo.Components.DynamicForms", "DynamicForms", url: "/Components/DynamicForms"),
new ApplicationMenuItem("BasicThemeDemo.Components.FormElements", "FormElements", url: "/Components/FormElements"),
new ApplicationMenuItem("BasicThemeDemo.Components.Grids", "Grids", url: "/Components/Grids"),
new ApplicationMenuItem("BasicThemeDemo.Components.ListGroups", "List Groups", url: "/Components/ListGroups"),
new ApplicationMenuItem("BasicThemeDemo.Components.Modals", "Modals", url: "/Components/Modals"),
new ApplicationMenuItem("BasicThemeDemo.Components.Navs", "Navs", url: "/Components/Navs"),
new ApplicationMenuItem("BasicThemeDemo.Components.Popovers", "Popovers", url: "/Components/Popovers"),
new ApplicationMenuItem("BasicThemeDemo.Components.ProgressBars", "Progress Bars", url: "/Components/ProgressBars"),
new ApplicationMenuItem("BasicThemeDemo.Components.Tables", "Tables", url: "/Components/Tables"),
new ApplicationMenuItem("BasicThemeDemo.Components.Tabs", "Tabs", url: "/Components/Tabs"),
new ApplicationMenuItem("BasicThemeDemo.Components.Tooltips", "Tooltips", url: "/Components/Tooltips")
);
};
items.ForEach(x => menuItem.AddItem(x));
context.Menu.AddItem(menuItem);
}

6
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/DynamicForms/Index.cshtml

@ -0,0 +1,6 @@
@page
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.DynamicFormsDemo
@model Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.DynamicForms.IndexModel
<h2>Dynamic Forms</h2>
@await Component.InvokeAsync(typeof(DynamicFormsDemoViewComponent))

17
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/DynamicForms/Index.cshtml.cs

@ -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.Theme.Basic.Demo.Pages.Components.DynamicForms
{
public class IndexModel : PageModel
{
public void OnGet()
{
}
}
}

6
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/FormElements/Index.cshtml

@ -0,0 +1,6 @@
@page
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.FormElementsDemo
@model Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.FormElements.IndexModel
<h2>Form Elements</h2>
@await Component.InvokeAsync(typeof(FormElementsDemoViewComponent))

17
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/FormElements/Index.cshtml.cs

@ -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.Theme.Basic.Demo.Pages.Components.FormElements
{
public class IndexModel : PageModel
{
public void OnGet()
{
}
}
}
Loading…
Cancel
Save