-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
made correction on reading logs page when no matches found #8812
made correction on reading logs page when no matches found #8812
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Ayush1404! Will be happy to merge this once the suggested changes have been made.
<input type="submit"/> | ||
</form> | ||
$ query = query_param('q') | ||
<center> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<center> | |
<div class="center"> |
The <center>
element has been deprecated since HTML 4.
$ query = query_param('q') | ||
<center> | ||
<hr> | ||
<div class="red">$_("No results found in %s" %key) </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div class="red">$_("No results found in %s" %key) </div> | |
<div class="red">$_("No results found in this shelf") </div> |
The value of key
is not suitable for the UI, and no UI strings for shelf names are readily available in this template. Let's change the message to something that works more generally.
<div> | ||
<a href="/search/inside?$urlencode(dict(q=query))">$_('Search all of Open Library for "%s"?' % query)</a> | ||
</div> | ||
</center> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</center> | |
</div> |
<div class="red">$_("No results found in %s" %key) </div> | ||
<hr> | ||
<div> | ||
<a href="/search/inside?$urlencode(dict(q=query))">$_('Search all of Open Library for "%s"?' % query)</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<a href="/search/inside?$urlencode(dict(q=query))">$_('Search all of Open Library for "%s"?' % query)</a> | |
<a href="/search?$urlencode(dict(q=query))">$_('Search all of Open Library for "%s"?' % query)</a> |
Use book search instead of full-text search.
<form method="GET" class="olform pagesearchbox"> | ||
<input type="text" minlength="3" placeholder="$_('Search your reading log')" name="q" value="$(query_param('q', ''))"/> | ||
<input type="submit"/> | ||
</form> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh also let's not duplicate this bit ; this appears higher up in the file, let's change the if
statement up there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Ayush1404! Will commit my suggested change and merge this work.
Closes #8811
Searches on the reading log with no matches incorrectly show the "No books on this shelf" screen, this PR fixes it by showing correct error messages and other changes mentioned in issue #8811.
Technical
Testing
zScreenshot
Stakeholders
@cdrini