Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an "Add a new book" option if search returns no matches #10123

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion openlibrary/i18n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,11 @@ msgstr ""

#: work_search.html
#, python-format
msgid "No <strong>%(path_id)s</strong> directly matched your search"
msgid "No <strong>%(path_id)s</strong> directly matched your search."
msgstr ""

#: work_search.html
msgid "Add a new book?"
msgstr ""

#: search/authors.html search/lists.html search/subjects.html work_search.html
Expand Down
5 changes: 4 additions & 1 deletion openlibrary/templates/work_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ <h1>$_("Search Books")</h1>
$# results because of performance issues due to increased load. See
$# this commit to revert.
<center>
<div class="red">$:_('No <strong>%(path_id)s</strong> directly matched your search', path_id=path_id)</div>
<div class="red">
$:_('No <strong>%(path_id)s</strong> directly matched your search.', path_id=path_id)
<a href="/books/add">$_('Add a new book?')</a>
</div>
<hr>
</center>
<div id="fulltext-search-suggestion" data-query="$query">
Expand Down
Loading