Skip to content
Draft
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
3 changes: 2 additions & 1 deletion openlibrary/plugins/worksearch/subjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def GET(self, key):
# q=public_scan_b:true+OR+lending_edition_s:*
subj = get_subject(
key,
details=True,
details=False,
filters={'public_scan_b': 'false', 'lending_edition_s': '*'},
sort=web.input(sort='readinglog').sort,
request_label='SUBJECT_ENGINE_PAGE',
Expand Down Expand Up @@ -336,6 +336,7 @@ def get_subject(
work_count=result.num_found,
works=add_availability([self.work_wrapper(d) for d in result.docs]),
)
subject.has_details = details

if details:
result.facet_counts = {
Expand Down
14 changes: 8 additions & 6 deletions openlibrary/templates/subjects.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ <h3>$_("Disambiguations")</h3>
$else:
$# Only show default carousel if subject doesn't have an associated Tag
$:macros.QueryCarousel(query=page.solr_query, sort='trending,trending_score_hourly_sum', user_lang_only=True, fallback=True)
$:macros.PublishingHistory(page.publishing_history)

<div class="clearfix"></div>
$:macros.RelatedSubjects(page)
$if page.has_details:
$:macros.PublishingHistory(page.publishing_history)

<div class="clearfix"></div>
$:macros.ProlificAuthors(page.authors)
<div class="clearfix"></div>
$:macros.RelatedSubjects(page)

<div class="section clearfix"></div>
<div class="clearfix"></div>
$:macros.ProlificAuthors(page.authors)

<div class="section clearfix"></div>
</div>
Loading