Merge pull request #59 from gutenbergtools/master
Add last page button for search result.pull/1/head^2
commit
f56f39e2c4
|
@ -561,7 +561,8 @@ class OpenSearch(object):
|
|||
self.desktop_url = self.url_carry(host = self.desktop_host, format = None)
|
||||
|
||||
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
|
||||
|
@ -887,7 +888,7 @@ class SQLSearcher(object):
|
|||
|
||||
sql.sort_order = os.sort_order
|
||||
sql.start_index = os.start_index
|
||||
sql.items_per_page = os.items_per_page
|
||||
#sql.items_per_page = os.items_per_page
|
||||
query, params = sql.build()
|
||||
query += ' -- ' + os.ip
|
||||
|
||||
|
|
|
@ -136,9 +136,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>
|
||||
|
@ -148,6 +146,10 @@
|
|||
<a title="Go to the next page of results."
|
||||
accesskey="+"
|
||||
href="${os.url_carry (start_index = os.next_page_index)}">Next</a>
|
||||
|
||||
<a title="Go to the last page of results."
|
||||
accesskey="+"
|
||||
href="${os.url_carry (start_index = os.last_page_index)}">Last</a>
|
||||
</py:if>
|
||||
<py:if test="os.show_next_page_link">|
|
||||
<a title="Go to the last page of results."
|
||||
|
|
Loading…
Reference in New Issue