diff --git a/src/OrchardCore.Themes/TheTheme/Views/Pager.cshtml b/src/OrchardCore.Themes/TheTheme/Views/Pager.cshtml new file mode 100644 index 00000000000..80025eb8ff4 --- /dev/null +++ b/src/OrchardCore.Themes/TheTheme/Views/Pager.cshtml @@ -0,0 +1,8 @@ +@{ + Model.Metadata.Alternates.Clear(); + Model.Metadata.Type = "Pager_Links"; +} + + diff --git a/src/OrchardCore.Themes/TheTheme/Views/Pager_CurrentPage.cshtml b/src/OrchardCore.Themes/TheTheme/Views/Pager_CurrentPage.cshtml new file mode 100644 index 00000000000..9daeed99a7c --- /dev/null +++ b/src/OrchardCore.Themes/TheTheme/Views/Pager_CurrentPage.cshtml @@ -0,0 +1,13 @@ +@{ + Model.Metadata.Alternates.Clear(); + Model.Metadata.Type = "Pager_Link"; + var parentTag = Model.Tag as TagBuilder; + + if (parentTag != null) + { + parentTag.AddCssClass("active"); + parentTag.MergeAttribute("aria-current", "page"); + } +} + +@await DisplayAsync(Model) diff --git a/src/OrchardCore.Themes/TheTheme/Views/Pager_First.cshtml b/src/OrchardCore.Themes/TheTheme/Views/Pager_First.cshtml new file mode 100644 index 00000000000..16ae34eabe8 --- /dev/null +++ b/src/OrchardCore.Themes/TheTheme/Views/Pager_First.cshtml @@ -0,0 +1,18 @@ +@using Microsoft.AspNetCore.Html + +@{ + Model.Metadata.Alternates.Clear(); + Model.Metadata.Type = "Pager_Link"; + var value = new HtmlContentBuilder(); + value.AppendHtml(""); + Model.Value = value; + + var parentTag = Model.Tag as TagBuilder; + + if (parentTag != null) + { + parentTag.MergeAttribute("title", T["Go to first page."].Value); + } +} + +@await DisplayAsync(Model) diff --git a/src/OrchardCore.Themes/TheTheme/Views/Pager_Gap.cshtml b/src/OrchardCore.Themes/TheTheme/Views/Pager_Gap.cshtml new file mode 100644 index 00000000000..47346bbca9c --- /dev/null +++ b/src/OrchardCore.Themes/TheTheme/Views/Pager_Gap.cshtml @@ -0,0 +1,11 @@ +@using Microsoft.AspNetCore.Html + +@{ + Model.Metadata.Alternates.Clear(); + Model.Metadata.Type = "Pager_Link"; + var value = new HtmlContentBuilder(); + value.AppendHtml(""); + Model.Value = value; +} + +@await DisplayAsync(Model) diff --git a/src/OrchardCore.Themes/TheTheme/Views/Pager_Last.cshtml b/src/OrchardCore.Themes/TheTheme/Views/Pager_Last.cshtml new file mode 100644 index 00000000000..b3e7a3cfdf3 --- /dev/null +++ b/src/OrchardCore.Themes/TheTheme/Views/Pager_Last.cshtml @@ -0,0 +1,18 @@ +@using Microsoft.AspNetCore.Html + +@{ + Model.Metadata.Alternates.Clear(); + Model.Metadata.Type = "Pager_Link"; + var value = new HtmlContentBuilder(); + value.AppendHtml(""); + Model.Value = value; + + var parentTag = Model.Tag as TagBuilder; + + if (parentTag != null) + { + parentTag.MergeAttribute("title", T["Go to last page."].Value); + } +} + +@await DisplayAsync(Model) diff --git a/src/OrchardCore.Themes/TheTheme/Views/Pager_Link.cshtml b/src/OrchardCore.Themes/TheTheme/Views/Pager_Link.cshtml new file mode 100644 index 00000000000..a0e1c197509 --- /dev/null +++ b/src/OrchardCore.Themes/TheTheme/Views/Pager_Link.cshtml @@ -0,0 +1,13 @@ +@{ + Model.Metadata.Alternates.Clear(); + Model.Metadata.Type = "ActionLink"; + Model.Classes.Add("page-link"); + var parentTag = Model.Tag as TagBuilder; + + if (parentTag != null) + { + parentTag.AddCssClass("page-item"); + } +} + +@await DisplayAsync(Model) diff --git a/src/OrchardCore.Themes/TheTheme/Views/Pager_Next.cshtml b/src/OrchardCore.Themes/TheTheme/Views/Pager_Next.cshtml new file mode 100644 index 00000000000..7031a4cdd9c --- /dev/null +++ b/src/OrchardCore.Themes/TheTheme/Views/Pager_Next.cshtml @@ -0,0 +1,18 @@ +@using Microsoft.AspNetCore.Html + +@{ + Model.Metadata.Alternates.Clear(); + Model.Metadata.Type = "Pager_Link"; + var value = new HtmlContentBuilder(); + value.AppendHtml(""); + Model.Value = value; + + var parentTag = Model.Tag as TagBuilder; + + if (parentTag != null) + { + parentTag.MergeAttribute("title", T["Go to next page."].Value); + } +} + +@await DisplayAsync(Model) diff --git a/src/OrchardCore.Themes/TheTheme/Views/Pager_Previous.cshtml b/src/OrchardCore.Themes/TheTheme/Views/Pager_Previous.cshtml new file mode 100644 index 00000000000..5622b9e3e68 --- /dev/null +++ b/src/OrchardCore.Themes/TheTheme/Views/Pager_Previous.cshtml @@ -0,0 +1,18 @@ +@using Microsoft.AspNetCore.Html + +@{ + Model.Metadata.Alternates.Clear(); + Model.Metadata.Type = "Pager_Link"; + var value = new HtmlContentBuilder(); + value.AppendHtml(""); + Model.Value = value; + + var parentTag = Model.Tag as TagBuilder; + + if (parentTag != null) + { + parentTag.MergeAttribute("title", T["Go to previous page."].Value); + } +} + +@await DisplayAsync(Model)