diff --git a/cps/templates/detail.html b/cps/templates/detail.html
index 24ba10c7..d348b7f6 100644
--- a/cps/templates/detail.html
+++ b/cps/templates/detail.html
@@ -114,7 +114,7 @@
{% endif %}
{% if entry.series|length > 0 %}
-
{{_('Book')}} {{entry.series_index}} {{_('of')}} {{entry.series[0].name}}
+
{{_('Book')}} {{entry.series_index|formatseriesindex}} {{_('of')}} {{entry.series[0].name}}
{% endif %}
{% if entry.languages.__len__() > 0 %}
diff --git a/cps/templates/discover.html b/cps/templates/discover.html
index dd8dc9bb..dac0afb7 100644
--- a/cps/templates/discover.html
+++ b/cps/templates/discover.html
@@ -39,7 +39,7 @@
{{entry.series[0].name}}
- ({{entry.series_index}})
+ ({{entry.series_index|formatseriesindex}})
{% endif %}
{% if entry.ratings.__len__() > 0 %}
diff --git a/cps/templates/index.html b/cps/templates/index.html
index f39a7181..1fed6be2 100644
--- a/cps/templates/index.html
+++ b/cps/templates/index.html
@@ -38,7 +38,7 @@
{{entry.series[0].name}}
- ({{entry.series_index}})
+ ({{entry.series_index|formatseriesindex}})
{% endif %}
{% if entry.ratings.__len__() > 0 %}
@@ -114,7 +114,7 @@
{{entry.series[0].name}}
- ({{entry.series_index}})
+ ({{entry.series_index|formatseriesindex}})
{% endif %}
{% if entry.ratings.__len__() > 0 %}
diff --git a/cps/templates/search.html b/cps/templates/search.html
index 7e546c8e..213bed84 100644
--- a/cps/templates/search.html
+++ b/cps/templates/search.html
@@ -81,7 +81,7 @@
{{entry.series[0].name}}
- ({{entry.series_index}})
+ ({{entry.series_index|formatseriesindex}})
{% endif %}
diff --git a/cps/templates/shelf.html b/cps/templates/shelf.html
index cf44cccf..6551bef6 100644
--- a/cps/templates/shelf.html
+++ b/cps/templates/shelf.html
@@ -48,7 +48,7 @@
{{entry.series[0].name}}
- ({{entry.series_index|int}})
+ ({{entry.series_index|formatseriesindex}})
{% endif %}
{% if entry.ratings.__len__() > 0 %}
From 057f70ea9cbe3cfd8888b9f854c67f6d5fc6e871 Mon Sep 17 00:00:00 2001
From: Michael Knepher
Date: Sat, 29 Aug 2020 18:53:00 -0700
Subject: [PATCH 4/4] Add author sort
---
cps/web.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cps/web.py b/cps/web.py
index 3e6d7c63..a4b767a0 100644
--- a/cps/web.py
+++ b/cps/web.py
@@ -644,6 +644,10 @@ def books_list(data, sort, book_id, page):
order = [db.Books.timestamp.desc()]
if sort == 'old':
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 current_user.check_visibility(constants.SIDEBAR_BEST_RATED):