Renamed the is_needed property to is_paged in the Pagination utility.
This commit is contained in:
@ -19,7 +19,7 @@ pagination.html: The pagination navigation bar.
|
||||
Author: imacat@mail.imacat.idv.tw (imacat)
|
||||
First written: 2023/1/26
|
||||
#}
|
||||
{% if pagination.is_needed %}
|
||||
{% if pagination.is_paged %}
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
{% for link in pagination.page_links %}
|
||||
|
@ -88,7 +88,7 @@ class Pagination(t.Generic[T]):
|
||||
self.__total_pages: int = 0 if len(items) == 0 \
|
||||
else int((len(items) - 1) / self.page_size) + 1
|
||||
"""The total number of pages."""
|
||||
self.is_needed: bool = self.__total_pages > 1
|
||||
self.is_paged: bool = self.__total_pages > 1
|
||||
"""Whether there should be pagination."""
|
||||
self.__default_page_no: int = 0
|
||||
"""The default page number."""
|
||||
|
Reference in New Issue
Block a user