Commit 057f70ea authored by Michael Knepher's avatar Michael Knepher

Add author sort

parent 7e0d9fba
...@@ -644,6 +644,10 @@ def books_list(data, sort, book_id, page): ...@@ -644,6 +644,10 @@ def books_list(data, sort, book_id, page):
order = [db.Books.timestamp.desc()] order = [db.Books.timestamp.desc()]
if sort == 'old': if sort == 'old':
order = [db.Books.timestamp] order = [db.Books.timestamp]
if sort == 'authaz':
order = [db.Books.author_sort.asc()]
if sort == 'authza':
order = [db.Books.author_sort.desc()]
if data == "rated": if data == "rated":
if current_user.check_visibility(constants.SIDEBAR_BEST_RATED): if current_user.check_visibility(constants.SIDEBAR_BEST_RATED):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment