remove duplicate if

html5
Marshall 2020-09-21 17:07:19 -04:00
parent 501e00737d
commit 98aa9f88d8
2 changed files with 3 additions and 7 deletions

View File

@ -599,8 +599,6 @@ class OpenSearch (object):
last_page = max ((self.total_results - 1) // self.items_per_page, 0) # 0-based
self.end_index = min (self.start_index + self.items_per_page - 1, self.total_results)
if self.end_index==1000:
self.end_index='1000 (max)'
self.prev_page_index = max (self.start_index - self.items_per_page, 1)
self.next_page_index = min (self.start_index + self.items_per_page, self.total_results)
@ -622,7 +620,8 @@ class OpenSearch (object):
self.mobile_url = self.url_carry (host = self.mobile_host, format = 'mobile')
self.osd_url = self.qualify ('/catalog/osd-books.xml')
if self.end_index==1000:
self.end_index='1000 (max)'
s = cherrypy.session
# write this late so pages can change it
s['search_terms'] = self.search_terms

View File

@ -220,9 +220,7 @@
<a title="Go to the first page of results."
accesskey="a"
href="${os.url_carry (start_index = 1)}">First</a>
</py:if>
<py:if test="os.show_prev_page_link">|
<a title="Go to the previous page of results."
accesskey="-"
href="${os.url_carry (start_index = os.prev_page_index)}">Previous</a>
@ -232,8 +230,7 @@
<a title="Go to the next page of results."
accesskey="+"
href="${os.url_carry (start_index = os.next_page_index)}">Next</a>
</py:if>
<py:if test="os.show_next_page_link">|
<a title="Go to the last page of results."
accesskey="+"
href="${os.url_carry (start_index = os.last_page_index)}">Last</a>