Skip to content

Commit

Permalink
remove ItemSliceAndTotalPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
EdiWang committed May 3, 2024
1 parent 4336416 commit 4e09d2f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
8 changes: 1 addition & 7 deletions src/Moonglade.Web/PagedList/HtmlHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public string PagedListPager(IPagedList pagedList, Func<int, string> generatePag
}

//text
if (options.DisplayItemSliceAndTotal && options.ItemSliceAndTotalPosition == ItemSliceAndTotalPosition.Start)
if (options.DisplayItemSliceAndTotal)
{
listItemLinks.Add(ItemSliceAndTotalText(list, options));
}
Expand All @@ -265,12 +265,6 @@ public string PagedListPager(IPagedList pagedList, Func<int, string> generatePag
listItemLinks.Add(Last(list, generatePageUrl, options));
}

//text
if (options.DisplayItemSliceAndTotal && options.ItemSliceAndTotalPosition == ItemSliceAndTotalPosition.End)
{
listItemLinks.Add(ItemSliceAndTotalText(list, options));
}

if (listItemLinks.Any())
{
//append classes to all list item links
Expand Down
6 changes: 0 additions & 6 deletions src/Moonglade.Web/PagedList/PagedListRenderOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public PagedListRenderOptions()
LinkToLastPageFormat = ">>";
PageCountAndCurrentLocationFormat = "Page {0} of {1}.";
ItemSliceAndTotalFormat = "Showing items {0} through {1} of {2}.";
ItemSliceAndTotalPosition = ItemSliceAndTotalPosition.Start;
FunctionToDisplayEachPageNumber = null;
ContainerDivClasses = ["pagination-container"];
UlElementClasses = ["pagination"];
Expand Down Expand Up @@ -133,11 +132,6 @@ public PagedListRenderOptions()
///</example>
public string ItemSliceAndTotalFormat { get; set; }

/// <summary>
/// If set to <see cref="ItemSliceAndTotalPosition.Start"/>, render an info at the beginning of the list. If set to <see cref="ItemSliceAndTotalPosition.End"/>, render the at the beginning of the list.
/// </summary>
public ItemSliceAndTotalPosition ItemSliceAndTotalPosition { get; set; }

/// <summary>
/// A function that will render each page number when specified (and DisplayLinkToIndividualPages is true). If no function is specified, the LinkToIndividualPageFormat value will be used instead.
/// </summary>
Expand Down

0 comments on commit 4e09d2f

Please sign in to comment.