diff --git a/openlibrary/i18n/messages.pot b/openlibrary/i18n/messages.pot index 4d67d3b642c..eb406c928c1 100644 --- a/openlibrary/i18n/messages.pot +++ b/openlibrary/i18n/messages.pot @@ -6504,21 +6504,23 @@ msgstr "" #: type/author/view.html #, python-format -msgid "" -"Showing all works by author. Would you like to see only ebooks?" +msgid "Search %(author)s books" +msgstr "" + +#: type/author/view.html +msgid "Sort by: " msgstr "" #: type/author/view.html #, python-format -msgid "" -"Showing ebooks only. Would you like to see everything by this author?" +msgid "— Show only ebooks?" msgstr "" #: type/author/view.html #, python-format -msgid "Search %(author)s books" +msgid "" +"-- Showing ebooks only. Would you like to see everything by this author?" msgstr "" #: RelatedSubjects.html SubjectTags.html type/author/view.html diff --git a/openlibrary/templates/type/author/view.html b/openlibrary/templates/type/author/view.html index 2c42e86c041..c5b04c66f07 100644 --- a/openlibrary/templates/type/author/view.html +++ b/openlibrary/templates/type/author/view.html @@ -118,25 +118,31 @@

$ungettext("%(count)d work", "%(count)d works", books_count, count=books_count) $_('Add another?')

+
+ + $if (query_param('sort')): + + $if (query_param('mode')): + + $:render_template("search/searchbox", q=query_param('q'), placeholder=_('Search %(author)s books', author=title)) +
+ + $if books_count > 1: -
- $:render_template("search/sort_options.html", books.sort, exclude='relevance', default_sort='editions') -
-

- $if input(mode="everything").mode == "everything": - $:_('Showing all works by author. Would you like to see only ebooks?', url=changequery(mode='ebooks')) - $else: - $:_('Showing ebooks only. Would you like to see everything by this author?', url=changequery(mode='everything')) -

+
+
+ + $:render_template("search/sort_options.html", books.sort, exclude='relevance', default_sort='editions') +
+ + + $if input(mode="everything").mode == "everything": + $:_('— Show only ebooks?', url=changequery(mode='ebooks')) + $else: + $:_('-- Showing ebooks only. Would you like to see everything by this author?', url=changequery(mode='everything')) + +
-
- - $if (query_param('sort')): - - $if (query_param('mode')): - - $:render_template("search/searchbox", q=query_param('q'), placeholder=_('Search %(author)s books', author=title)) -
$:macros.Pager(page=safeint(query_param('page'), default=1), num_found=books_count)