-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support X.PagedList 8.1.0 and drop .NET Framewrok support
- Loading branch information
Showing
17 changed files
with
56 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 1 addition & 7 deletions
8
src/X.PagedList.Mvc.Bootstrap4.Core.Example/Controllers/HomeController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
src/X.PagedList.Mvc.Bootstrap4.Core.Example/Models/ErrorViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
using System; | ||
|
||
namespace X.PagedList.Mvc.Bootstrap4.Core.Example.Models | ||
{ | ||
public class ErrorViewModel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
|
||
<hr /> | ||
|
||
@Html.Partial("_LinkPartial") | ||
@await Html.PartialAsync("_LinkPartial") | ||
|
||
<hr /> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
|
||
<hr /> | ||
|
||
@Html.Partial("_LinkPartial") | ||
@await Html.PartialAsync("_LinkPartial") | ||
|
||
<hr /> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/X.PagedList.Mvc.Bootstrap4.Core/PagedListRenderOptionsExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using X.PagedList.Web.Common; | ||
|
||
namespace X.PagedList.Mvc.Bootstrap4.Core | ||
{ | ||
public static class PagedListRenderOptionsExtension | ||
{ | ||
/// <summary> | ||
/// Set bootstrap4 style for raw <see cref="PagedListRenderOptions"/> | ||
/// </summary> | ||
/// <param name="options"></param> | ||
/// <returns></returns> | ||
public static PagedListRenderOptions ApplyBootstrap4Style(this PagedListRenderOptions options) | ||
{ | ||
options.LiElementClasses = new[] { "page-item" }; | ||
options.PageClasses = new[] { "page-link" }; | ||
|
||
// Due to no way change Ellipses element class, try setting EllipsesElementClass but fail, so disable Ellipses | ||
options.DisplayEllipsesWhenNotShowingAllPageNumbers = false; | ||
|
||
return options; | ||
} | ||
} | ||
} |
11 changes: 7 additions & 4 deletions
11
src/X.PagedList.Mvc.Bootstrap4.Core/X.PagedList.Mvc.Bootstrap4.Core.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<Version>8.0.7.1</Version> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<Version>8.1.0</Version> | ||
<AssemblyVersion>8.1.0</AssemblyVersion> | ||
<FileVersion>8.1.0</FileVersion> | ||
<FileVersion>8.1.0</FileVersion> | ||
<Authors>Money Yu</Authors> | ||
<Description>X.PagedList.Mvc pager style for bootstrap 4</Description> | ||
<PackageProjectUrl>https://github.com/lettucebo/X.PagedList.Mvc.Bootstrap4</PackageProjectUrl> | ||
<PackageIconUrl>https://i.imgur.com/3xZ4Cdx.png</PackageIconUrl> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="X.PagedList.Mvc.Core" Version="8.0.7" /> | ||
<PackageReference Include="X.PagedList.Mvc.Core" Version="8.1.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters