remove duplicate if
parent
501e00737d
commit
98aa9f88d8
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue