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

Id converted to class #4624

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
2 changes: 1 addition & 1 deletion openlibrary/macros/FulltextResults.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$ hits = results['hits'].get('hits', [])
$ num_found = results['hits'].get('total', 0)
<div id="searchResults">
<ul id="siteSearch" class="list-books">
<ul class="list-books">
$for doc in hits:
$if doc.get('edition'):
$ snippet = macros.FulltextSnippet(query, doc=doc)
Expand Down
2 changes: 1 addition & 1 deletion openlibrary/macros/SearchResults.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$ _ = i18n.get_namespace('/search')

<ul id="siteSearch">
<ul class="list-books">

$for b in results:
$if fulltext:
Expand Down
2 changes: 1 addition & 1 deletion openlibrary/templates/account/books.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h3>
</div>
<div class="mybooks-list">
$:macros.Pager(current_page, total_items, results_per_page=25)
<ul class="list-books" id="siteSearch">
<ul class="list-books">
$if items:
$ bookshelf_id = {'want-to-read': 1, 'currently-reading': 2, 'already-read': 3}.get(key, None)
$for item in items:
Expand Down
4 changes: 2 additions & 2 deletions openlibrary/templates/books/check.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1>$_("Add a Book")</h1>

<div id="contentBody">
<div id="searchResults">
<ul id="siteSearch" class="list-books">
<ul class="list-books">
$for work in matches:
<li class="workResult" id="$work.key.split('/')[-1]">
<span class="bookcover">
Expand Down Expand Up @@ -55,7 +55,7 @@ <h3 class="booktitle"><a href="javascript:;" title="$_('Select this book')">$wor
<script type="text/javascript">
<!--
window.q.push(function() {
\$("#siteSearch a").click(function() {
\$(".list-books a").click(function() {
var li = \$(this).parents('li:first');
\$("input#work").val("/works/" + li.attr("id"));
\$("form#addbook").submit();
Expand Down
8 changes: 4 additions & 4 deletions openlibrary/templates/stats/readinglog.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ <h2>$_('# Books Starred')</h2>
<div class="admin-section">
<h3>$_('Most Wanted Books (All Time)')</h3>
<div class="mybooks-list">
<ul class="list-books" id="siteSearch">
<ul class="list-books">
$for book in stats['leaderboard']['most_wanted_all']:
$:macros.SearchResultsWork(book['work'], decorations=ungettext("Added 1 time", "Added %(count)d times", book['cnt'], count=book['cnt']))
</ul>
</div>

<h3>$_('Most Wanted Books (This Month)')</h3>
<div class="mybooks-list">
<ul class="list-books" id="siteSearch">
<ul class="list-books">
$for book in stats['leaderboard']['most_wanted_month']:
$:macros.SearchResultsWork(book['work'], decorations=ungettext("Added 1 time", "Added %(count)d times", book['cnt'], count=book['cnt']))
</ul>
Expand All @@ -78,7 +78,7 @@ <h3>$_('Most Wanted Books (This Month)')</h3>
<h2>$_('Most Logged Books')</h2>
<h3>$_('Most Read Books (All Time)')</h3>
<div class="mybooks-list">
<ul class="list-books" id="siteSearch">
<ul class="list-books">
$for book in stats['leaderboard']['most_read']:
$:macros.SearchResultsWork(book['work'], decorations=ungettext("Added 1 time", "Added %(count)d times", book['cnt'], count=book['cnt']))
</ul>
Expand All @@ -87,7 +87,7 @@ <h3>$_('Most Read Books (All Time)')</h3>
<h2>$_('Most Rated Books')</h2>
<h3>$_('Most Rated Books (All Time)')</h3>
<div class="mybooks-list">
<ul class="list-books" id="siteSearch">
<ul class="list-books">
$for book in stats['leaderboard']['most_rated_all']:
$:macros.SearchResultsWork(book['work'], decorations=ungettext("Added 1 time", "Added %(count)d times", book['cnt'], count=book['cnt']))
</ul>
Expand Down
2 changes: 1 addition & 1 deletion openlibrary/templates/type/author/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ <h2 class="collapse">
$:macros.Pager(page=safeint(query_param('page'), default=1), num_found=books.num_found)

<div id="searchResults">
<ul id="siteSearch" class="list-books">
<ul class="list-books">
$for doc in books.works:
$:macros.SearchResultsWork(doc)
</ul>
Expand Down
2 changes: 1 addition & 1 deletion openlibrary/templates/work_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
<div class="shift">$ungettext('1 hit', '%(count)s hits', num_found, count=commify(num_found))</div>
<div class="resultsContainer search-results-container">
<div id="searchResults">
<ul class="list-books" id="siteSearch">
<ul class="list-books">
$ works = add_availability([get_doc(d) for d in docs])

$for work in works:
Expand Down
7 changes: 3 additions & 4 deletions static/css/legacy.less
Original file line number Diff line number Diff line change
Expand Up @@ -1662,8 +1662,7 @@ span.actions {
// openlibrary/templates/account/books.html
// openlibrary/macros/SearchResults.html
// openlibrary/macros/FulltextResults.html
// why not form#siteSearch ?
ul#siteSearch {
ul.list-books {
> li {
.display-flex();
}
Expand Down Expand Up @@ -1715,7 +1714,7 @@ ul#siteSearch {
// openlibrary/templates/search/lists.html
// openlibrary/templates/lists/lists.html
div.wide {
ul#siteSearch {
ul.list-books {
span.resultTitle {
max-width: 850px;
}
Expand All @@ -1726,7 +1725,7 @@ div.wide {
// openlibrary/templates/type/list/view.html
// openlibrary/templates/type/work/editions.html
div.narrow {
ul#siteSearch {
ul.list-books {
span.resultTitle {
max-width: 500px !important;
}
Expand Down