diff --git a/openlibrary/core/fulltext.py b/openlibrary/core/fulltext.py index 7b8d14337088..4954293fb6c7 100644 --- a/openlibrary/core/fulltext.py +++ b/openlibrary/core/fulltext.py @@ -42,7 +42,428 @@ def fulltext_search(q, page=1, limit=100, js=False, facets=False): hits = ia_results['hits'].get('hits', []) ocaids = [hit['fields'].get('identifier', [''])[0] for hit in hits] # availability = get_availability_of_ocaids(ocaids) - availability = {'cricketintimessq0000seld': {'status': 'private', 'available_to_browse': False, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': False, 'is_previewable': True, 'identifier': 'cricketintimessq0000seld', 'isbn': '0140301836', 'oclc': None, 'openlibrary_work': 'OL15136938W', 'openlibrary_edition': 'OL32090209M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': False, '__src__': 'core.models.lending.get_availability'}, 'cricketintimessq00thom': {'status': 'private', 'available_to_browse': False, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': False, 'is_previewable': True, 'identifier': 'cricketintimessq00thom', 'isbn': None, 'oclc': None, 'openlibrary_work': 'OL15400990W', 'openlibrary_edition': 'OL24375865M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': False, '__src__': 'core.models.lending.get_availability'}, 'cricketintimessq00seld': {'status': 'private', 'available_to_browse': False, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': False, 'is_previewable': True, 'identifier': 'cricketintimessq00seld', 'isbn': None, 'oclc': None, 'openlibrary_work': 'OL15136938W', 'openlibrary_edition': 'OL24204364M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': False, '__src__': 'core.models.lending.get_availability'}, 'cricketintimes00geor': {'status': 'private', 'available_to_browse': False, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': False, 'is_previewable': True, 'identifier': 'cricketintimes00geor', 'isbn': '0440715636', 'oclc': None, 'openlibrary_work': 'OL8125719W', 'openlibrary_edition': 'OL7522718M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': False, '__src__': 'core.models.lending.get_availability'}, 'cricketintimessq0000seld_j8o3': {'status': 'private', 'available_to_browse': False, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': False, 'is_previewable': True, 'identifier': 'cricketintimessq0000seld_j8o3', 'isbn': '0312380038', 'oclc': None, 'openlibrary_work': 'OL4111010W', 'openlibrary_edition': 'OL10389352M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': False, '__src__': 'core.models.lending.get_availability'}, 'cricketintimessq00seld_0': {'status': 'private', 'available_to_browse': False, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': False, 'is_previewable': True, 'identifier': 'cricketintimessq00seld_0', 'isbn': '9780374316501', 'oclc': None, 'openlibrary_work': 'OL4111022W', 'openlibrary_edition': 'OL21463417M', 'last_loan_date': '2020-09-08T14:55:59Z', 'num_waitlist': '0', 'last_waitlist_date': '2020-08-30T07:43:40Z', 'is_restricted': True, 'is_browseable': False, '__src__': 'core.models.lending.get_availability'}, 'cricketintime00seld': {'status': 'private', 'available_to_browse': False, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': False, 'is_previewable': True, 'identifier': 'cricketintime00seld', 'isbn': '0440415632', 'oclc': None, 'openlibrary_work': 'OL16036066W', 'openlibrary_edition': 'OL24937942M', 'last_loan_date': '2020-09-04T17:49:15Z', 'num_waitlist': '0', 'last_waitlist_date': '2020-07-13T23:25:52Z', 'is_restricted': True, 'is_browseable': False, '__src__': 'core.models.lending.get_availability'}, 'cricketintimessq0000seld_a5b6': {'status': 'private', 'available_to_browse': False, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': False, 'is_previewable': True, 'identifier': 'cricketintimessq0000seld_a5b6', 'isbn': '0440415632', 'oclc': None, 'openlibrary_work': 'OL4111022W', 'openlibrary_edition': 'OL17434687M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': False, '__src__': 'core.models.lending.get_availability'}, 'cricketintimessq0000seld_i1z0': {'status': 'private', 'available_to_browse': False, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': False, 'is_previewable': True, 'identifier': 'cricketintimessq0000seld_i1z0', 'isbn': '046002759X', 'oclc': None, 'openlibrary_work': 'OL15136938W', 'openlibrary_edition': 'OL32090210M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': False, '__src__': 'core.models.lending.get_availability'}, 'isbn_9781780331232': {'status': 'borrow_available', 'available_to_browse': True, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': True, 'is_previewable': True, 'identifier': 'isbn_9781780331232', 'isbn': '9781780339061', 'oclc': None, 'openlibrary_work': 'OL17413435W', 'openlibrary_edition': 'OL25995305M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': True, '__src__': 'core.models.lending.get_availability'}, 'fieldofshadows0000wadd': {'status': 'borrow_available', 'available_to_browse': True, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': True, 'is_previewable': True, 'identifier': 'fieldofshadows0000wadd', 'isbn': '9780593072615', 'oclc': None, 'openlibrary_work': 'OL21094714W', 'openlibrary_edition': 'OL35333008M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': True, '__src__': 'core.models.lending.get_availability'}, 'sloggingslavspar0000bell': {'status': 'borrow_available', 'available_to_browse': True, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': True, 'is_previewable': True, 'identifier': 'sloggingslavspar0000bell', 'isbn': '0955433207', 'oclc': None, 'openlibrary_work': 'OL24851412W', 'openlibrary_edition': 'OL33031114M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': True, '__src__': 'core.models.lending.get_availability'}, 'caughtincourtsel0000scot': {'status': 'borrow_available', 'available_to_browse': True, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': True, 'is_previewable': True, 'identifier': 'caughtincourtsel0000scot', 'isbn': '0233984798', 'oclc': None, 'openlibrary_work': 'OL759678W', 'openlibrary_edition': 'OL10197946M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': True, '__src__': 'core.models.lending.get_availability'}, 'battingonbosphor0000bell': {'status': 'borrow_available', 'available_to_browse': True, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': True, 'is_previewable': True, 'identifier': 'battingonbosphor0000bell', 'isbn': '9781926812007', 'oclc': None, 'openlibrary_work': 'OL17537914W', 'openlibrary_edition': 'OL26127661M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': True, '__src__': 'core.models.lending.get_availability'}, 'battinginbaltic10000bell': {'status': 'borrow_available', 'available_to_browse': True, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': True, 'is_previewable': True, 'identifier': 'battinginbaltic10000bell', 'isbn': '9780143024224', 'oclc': None, 'openlibrary_work': 'OL28590891W', 'openlibrary_edition': 'OL39200969M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': True, '__src__': 'core.models.lending.get_availability'}, 'battingonbosphor0000bell_w5e6': {'status': 'borrow_available', 'available_to_browse': True, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': True, 'is_previewable': True, 'identifier': 'battingonbosphor0000bell_w5e6', 'isbn': '9781847672902', 'oclc': None, 'openlibrary_work': 'OL17536282W', 'openlibrary_edition': 'OL26125971M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': True, '__src__': 'core.models.lending.get_availability'}, 'beyondfarpavilio0000unse': {'status': 'borrow_available', 'available_to_browse': True, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': True, 'is_previewable': True, 'identifier': 'beyondfarpavilio0000unse', 'isbn': '0099494108', 'oclc': None, 'openlibrary_work': 'OL19030435W', 'openlibrary_edition': 'OL17316354M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': True, '__src__': 'core.models.lending.get_availability'}, 'cricketonairsele0000unse': {'status': 'borrow_available', 'available_to_browse': True, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': True, 'is_previewable': True, 'identifier': 'cricketonairsele0000unse', 'isbn': '0563203439', 'oclc': None, 'openlibrary_work': 'OL8400585W', 'openlibrary_edition': 'OL17062964M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': True, '__src__': 'core.models.lending.get_availability'}, 'parachutistatfin0000unse': {'status': 'borrow_available', 'available_to_browse': True, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': True, 'is_previewable': True, 'identifier': 'parachutistatfin0000unse', 'isbn': '9781845132569', 'oclc': None, 'openlibrary_work': 'OL17583672W', 'openlibrary_edition': 'OL26186839M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': True, '__src__': 'core.models.lending.get_availability'}, 'benaudonreflecti0000bena': {'status': 'borrow_available', 'available_to_browse': True, 'available_to_borrow': False, 'available_to_waitlist': False, 'is_printdisabled': True, 'is_readable': False, 'is_lendable': True, 'is_previewable': True, 'identifier': 'benaudonreflecti0000bena', 'isbn': '0002180340', 'oclc': None, 'openlibrary_work': 'OL2232494W', 'openlibrary_edition': 'OL17373735M', 'last_loan_date': None, 'num_waitlist': None, 'last_waitlist_date': None, 'is_restricted': True, 'is_browseable': True, '__src__': 'core.models.lending.get_availability'}} + availability = { + 'cricketintimessq0000seld': { + 'status': 'private', + 'available_to_browse': False, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': False, + 'is_previewable': True, + 'identifier': 'cricketintimessq0000seld', + 'isbn': '0140301836', + 'oclc': None, + 'openlibrary_work': 'OL15136938W', + 'openlibrary_edition': 'OL32090209M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': False, + '__src__': 'core.models.lending.get_availability', + }, + 'cricketintimessq00thom': { + 'status': 'private', + 'available_to_browse': False, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': False, + 'is_previewable': True, + 'identifier': 'cricketintimessq00thom', + 'isbn': None, + 'oclc': None, + 'openlibrary_work': 'OL15400990W', + 'openlibrary_edition': 'OL24375865M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': False, + '__src__': 'core.models.lending.get_availability', + }, + 'cricketintimessq00seld': { + 'status': 'private', + 'available_to_browse': False, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': False, + 'is_previewable': True, + 'identifier': 'cricketintimessq00seld', + 'isbn': None, + 'oclc': None, + 'openlibrary_work': 'OL15136938W', + 'openlibrary_edition': 'OL24204364M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': False, + '__src__': 'core.models.lending.get_availability', + }, + 'cricketintimes00geor': { + 'status': 'private', + 'available_to_browse': False, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': False, + 'is_previewable': True, + 'identifier': 'cricketintimes00geor', + 'isbn': '0440715636', + 'oclc': None, + 'openlibrary_work': 'OL8125719W', + 'openlibrary_edition': 'OL7522718M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': False, + '__src__': 'core.models.lending.get_availability', + }, + 'cricketintimessq0000seld_j8o3': { + 'status': 'private', + 'available_to_browse': False, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': False, + 'is_previewable': True, + 'identifier': 'cricketintimessq0000seld_j8o3', + 'isbn': '0312380038', + 'oclc': None, + 'openlibrary_work': 'OL4111010W', + 'openlibrary_edition': 'OL10389352M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': False, + '__src__': 'core.models.lending.get_availability', + }, + 'cricketintimessq00seld_0': { + 'status': 'private', + 'available_to_browse': False, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': False, + 'is_previewable': True, + 'identifier': 'cricketintimessq00seld_0', + 'isbn': '9780374316501', + 'oclc': None, + 'openlibrary_work': 'OL4111022W', + 'openlibrary_edition': 'OL21463417M', + 'last_loan_date': '2020-09-08T14:55:59Z', + 'num_waitlist': '0', + 'last_waitlist_date': '2020-08-30T07:43:40Z', + 'is_restricted': True, + 'is_browseable': False, + '__src__': 'core.models.lending.get_availability', + }, + 'cricketintime00seld': { + 'status': 'private', + 'available_to_browse': False, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': False, + 'is_previewable': True, + 'identifier': 'cricketintime00seld', + 'isbn': '0440415632', + 'oclc': None, + 'openlibrary_work': 'OL16036066W', + 'openlibrary_edition': 'OL24937942M', + 'last_loan_date': '2020-09-04T17:49:15Z', + 'num_waitlist': '0', + 'last_waitlist_date': '2020-07-13T23:25:52Z', + 'is_restricted': True, + 'is_browseable': False, + '__src__': 'core.models.lending.get_availability', + }, + 'cricketintimessq0000seld_a5b6': { + 'status': 'private', + 'available_to_browse': False, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': False, + 'is_previewable': True, + 'identifier': 'cricketintimessq0000seld_a5b6', + 'isbn': '0440415632', + 'oclc': None, + 'openlibrary_work': 'OL4111022W', + 'openlibrary_edition': 'OL17434687M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': False, + '__src__': 'core.models.lending.get_availability', + }, + 'cricketintimessq0000seld_i1z0': { + 'status': 'private', + 'available_to_browse': False, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': False, + 'is_previewable': True, + 'identifier': 'cricketintimessq0000seld_i1z0', + 'isbn': '046002759X', + 'oclc': None, + 'openlibrary_work': 'OL15136938W', + 'openlibrary_edition': 'OL32090210M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': False, + '__src__': 'core.models.lending.get_availability', + }, + 'isbn_9781780331232': { + 'status': 'borrow_available', + 'available_to_browse': True, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': True, + 'is_previewable': True, + 'identifier': 'isbn_9781780331232', + 'isbn': '9781780339061', + 'oclc': None, + 'openlibrary_work': 'OL17413435W', + 'openlibrary_edition': 'OL25995305M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': True, + '__src__': 'core.models.lending.get_availability', + }, + 'fieldofshadows0000wadd': { + 'status': 'borrow_available', + 'available_to_browse': True, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': True, + 'is_previewable': True, + 'identifier': 'fieldofshadows0000wadd', + 'isbn': '9780593072615', + 'oclc': None, + 'openlibrary_work': 'OL21094714W', + 'openlibrary_edition': 'OL35333008M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': True, + '__src__': 'core.models.lending.get_availability', + }, + 'sloggingslavspar0000bell': { + 'status': 'borrow_available', + 'available_to_browse': True, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': True, + 'is_previewable': True, + 'identifier': 'sloggingslavspar0000bell', + 'isbn': '0955433207', + 'oclc': None, + 'openlibrary_work': 'OL24851412W', + 'openlibrary_edition': 'OL33031114M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': True, + '__src__': 'core.models.lending.get_availability', + }, + 'caughtincourtsel0000scot': { + 'status': 'borrow_available', + 'available_to_browse': True, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': True, + 'is_previewable': True, + 'identifier': 'caughtincourtsel0000scot', + 'isbn': '0233984798', + 'oclc': None, + 'openlibrary_work': 'OL759678W', + 'openlibrary_edition': 'OL10197946M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': True, + '__src__': 'core.models.lending.get_availability', + }, + 'battingonbosphor0000bell': { + 'status': 'borrow_available', + 'available_to_browse': True, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': True, + 'is_previewable': True, + 'identifier': 'battingonbosphor0000bell', + 'isbn': '9781926812007', + 'oclc': None, + 'openlibrary_work': 'OL17537914W', + 'openlibrary_edition': 'OL26127661M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': True, + '__src__': 'core.models.lending.get_availability', + }, + 'battinginbaltic10000bell': { + 'status': 'borrow_available', + 'available_to_browse': True, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': True, + 'is_previewable': True, + 'identifier': 'battinginbaltic10000bell', + 'isbn': '9780143024224', + 'oclc': None, + 'openlibrary_work': 'OL28590891W', + 'openlibrary_edition': 'OL39200969M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': True, + '__src__': 'core.models.lending.get_availability', + }, + 'battingonbosphor0000bell_w5e6': { + 'status': 'borrow_available', + 'available_to_browse': True, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': True, + 'is_previewable': True, + 'identifier': 'battingonbosphor0000bell_w5e6', + 'isbn': '9781847672902', + 'oclc': None, + 'openlibrary_work': 'OL17536282W', + 'openlibrary_edition': 'OL26125971M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': True, + '__src__': 'core.models.lending.get_availability', + }, + 'beyondfarpavilio0000unse': { + 'status': 'borrow_available', + 'available_to_browse': True, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': True, + 'is_previewable': True, + 'identifier': 'beyondfarpavilio0000unse', + 'isbn': '0099494108', + 'oclc': None, + 'openlibrary_work': 'OL19030435W', + 'openlibrary_edition': 'OL17316354M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': True, + '__src__': 'core.models.lending.get_availability', + }, + 'cricketonairsele0000unse': { + 'status': 'borrow_available', + 'available_to_browse': True, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': True, + 'is_previewable': True, + 'identifier': 'cricketonairsele0000unse', + 'isbn': '0563203439', + 'oclc': None, + 'openlibrary_work': 'OL8400585W', + 'openlibrary_edition': 'OL17062964M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': True, + '__src__': 'core.models.lending.get_availability', + }, + 'parachutistatfin0000unse': { + 'status': 'borrow_available', + 'available_to_browse': True, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': True, + 'is_previewable': True, + 'identifier': 'parachutistatfin0000unse', + 'isbn': '9781845132569', + 'oclc': None, + 'openlibrary_work': 'OL17583672W', + 'openlibrary_edition': 'OL26186839M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': True, + '__src__': 'core.models.lending.get_availability', + }, + 'benaudonreflecti0000bena': { + 'status': 'borrow_available', + 'available_to_browse': True, + 'available_to_borrow': False, + 'available_to_waitlist': False, + 'is_printdisabled': True, + 'is_readable': False, + 'is_lendable': True, + 'is_previewable': True, + 'identifier': 'benaudonreflecti0000bena', + 'isbn': '0002180340', + 'oclc': None, + 'openlibrary_work': 'OL2232494W', + 'openlibrary_edition': 'OL17373735M', + 'last_loan_date': None, + 'num_waitlist': None, + 'last_waitlist_date': None, + 'is_restricted': True, + 'is_browseable': True, + '__src__': 'core.models.lending.get_availability', + }, + } if 'error' in availability: return [] editions = web.ctx.site.get_many( diff --git a/openlibrary/i18n/messages.pot b/openlibrary/i18n/messages.pot index ef7dd136ba22..93c4e1034294 100644 --- a/openlibrary/i18n/messages.pot +++ b/openlibrary/i18n/messages.pot @@ -820,15 +820,6 @@ msgstr "" msgid "No results found." msgstr "" -#: search/lists.html work_search.html -#, python-format -msgid "Search for books containing the phrase \"%s\"?" -msgstr "" - -#: work_search.html -msgid "Add a new book to Open Library?" -msgstr "" - #: account/reading_log.html search/authors.html search/subjects.html #: work_search.html #, python-format @@ -1192,8 +1183,8 @@ msgstr "" msgid "Thanks!" msgstr "" -#: BookByline.html SearchResultsWork.html account/notes.html -#: account/observations.html +#: BookByline.html FulltextSearchSuggestionItem.html SearchResultsWork.html +#: account/notes.html account/observations.html msgid "Unknown author" msgstr "" @@ -2782,10 +2773,10 @@ msgstr "" msgid "Links" msgstr "" -#: IABook.html SearchResultsWork.html books/edition-sort.html -#: jsdef/LazyWorkPreview.html lists/list_overview.html lists/preview.html -#: lists/snippet.html lists/widget.html my_books/dropdown_content.html -#: type/work/editions.html +#: FulltextSearchSuggestionItem.html IABook.html SearchResultsWork.html +#: books/edition-sort.html jsdef/LazyWorkPreview.html lists/list_overview.html +#: lists/preview.html lists/snippet.html lists/widget.html +#: my_books/dropdown_content.html type/work/editions.html #, python-format msgid "Cover of: %(title)s" msgstr "" @@ -4996,6 +4987,11 @@ msgstr "" msgid "Search Lists" msgstr "" +#: search/lists.html +#, python-format +msgid "Search for books containing the phrase \"%s\"?" +msgstr "" + #: search/publishers.html msgid "Publishers Search" msgstr "" @@ -6102,6 +6098,19 @@ msgstr "" msgid "Follow" msgstr "" +#: FulltextSearchSuggestion.html +msgid "Search Inside Icon" +msgstr "" + +#: FulltextSearchSuggestion.html FulltextSuggestionSnippet.html +msgid "search inside icon" +msgstr "" + +#: FulltextSearchSuggestion.html +#, python-format +msgid "%(results_count)s Search Inside Matches" +msgstr "" + #: IABook.html #, python-format msgid "Borrowed from Internet Archive: %(title)s" diff --git a/static/css/components/fulltext-search-suggestion-item.less b/static/css/components/fulltext-search-suggestion-item.less index cd1de9ca9c35..36d5a12f94a5 100644 --- a/static/css/components/fulltext-search-suggestion-item.less +++ b/static/css/components/fulltext-search-suggestion-item.less @@ -57,7 +57,7 @@ flex-direction: column; // display: inline-flex; gap: 10px; - margin: 5px 10px 0 10px; + margin: 5px 10px 0; @media (min-width: @width-breakpoint-tablet) { // flex-direction: row; align-items: flex-start; @@ -79,10 +79,10 @@ } // &__booktitle-container { - // overflow: auto; - // margin: 0 !important; - // font-family: @lucida_sans_serif-1; - // color: @grey; + // overflow: auto; + // margin: 0 !important; + // font-family: @lucida_sans_serif-1; + // color: @grey; // } &__book-title, @@ -95,10 +95,7 @@ } &__book-title { margin: 0 !important; - font-family: @lucida_sans_serif-1; - color: @grey; display: block; - margin: 0; padding: 0; color: @dark-grey; font-weight: 700; @@ -131,4 +128,4 @@ // width: auto; // } // } -} \ No newline at end of file +} diff --git a/static/css/components/fulltext-search-suggestion.less b/static/css/components/fulltext-search-suggestion.less index f7434520ca27..63590cb4adb1 100644 --- a/static/css/components/fulltext-search-suggestion.less +++ b/static/css/components/fulltext-search-suggestion.less @@ -2,34 +2,34 @@ * Search Result Item * https://github.com/internetarchive/openlibrary/wiki/Design-Pattern-Library#searchresultitem */ - @import "buttonBtn.less"; - @import "buttonCta.less"; +@import "buttonBtn.less"; +@import "buttonCta.less"; - .bookauthor { - font-family: @lucida_sans_serif-6; - font-weight: 500; - } +.bookauthor { + font-family: @lucida_sans_serif-6; + font-weight: 500; +} - .fulltext-suggestions{ - list-style-type: none; - line-height: 1.5em; - background-color: @grey-fafafa; - border-radius: 5px; - padding: 5px; - margin-bottom: 3px; - border-bottom: 1px solid @light-beige; - .display-flex(); - flex-direction: column; +.fulltext-suggestions{ + list-style-type: none; + line-height: 1.5em; + background-color: @grey-fafafa; + border-radius: 5px; + padding: 5px; + margin-bottom: 3px; + border-bottom: 1px solid @light-beige; + .display-flex(); + flex-direction: column; - &__header { + &__header { display: flex; flex-direction: row; align-items: center; padding: 5px; margin-bottom: 3px; - } + } - &__title { + &__title { display: block; margin: 0; padding: 5px; @@ -39,41 +39,41 @@ @media (min-width: @width-breakpoint-tablet) { font-size: large; } - } + } - &__link { + &__link { color: #003266; text-decoration: underline; - } + } // .header { - // display: flex; - // flex-direction: row; - // align-items: center; - // padding: 5px; - // margin-bottom: 3px; - // .title { - // display: block; - // margin: 0; - // padding: 5px; - // // color: @dark-grey; - // font-size: medium; - // font-weight: 700; - // font-family: @lucida_sans_serif-6; - // @media (min-width: @width-breakpoint-tablet) { - // font-size: large; - // } - // a[href] { - // // text-decoration: none; - // // color: @dark-grey; - // color: #003266; - // text-decoration: underline; - // } - // a[href]:hover { - // color: #003266; - // text-decoration: underline; - // } - // } + // display: flex; + // flex-direction: row; + // align-items: center; + // padding: 5px; + // margin-bottom: 3px; + // .title { + // display: block; + // margin: 0; + // padding: 5px; + // // color: @dark-grey; + // font-size: medium; + // font-weight: 700; + // font-family: @lucida_sans_serif-6; + // @media (min-width: @width-breakpoint-tablet) { + // font-size: large; + // } + // a[href] { + // // text-decoration: none; + // // color: @dark-grey; + // color: #003266; + // text-decoration: underline; + // } + // a[href]:hover { + // color: #003266; + // text-decoration: underline; + // } + // } // } // .fsi__container { // .display-flex(); @@ -105,92 +105,92 @@ // grid-template-columns: 1fr 8fr; // grid-template-rows: auto 1fr; // } - // .bookDetails { - // display: flex; - // flex-direction: row; - // // display: inline-flex; - // gap: 10px; - // margin: 5px 10px 0 10px; - // @media (min-width: @width-breakpoint-tablet) { - // flex-direction: row; - // align-items: flex-start; - // gap: 20px; - // } - // } + // .bookDetails { + // display: flex; + // flex-direction: row; + // // display: inline-flex; + // gap: 10px; + // margin: 5px 10px 0 10px; + // @media (min-width: @width-breakpoint-tablet) { + // flex-direction: row; + // align-items: flex-start; + // gap: 20px; + // } + // } - // .bookcover { - // grid-area: bookcover; - // overflow: hidden; - // height: 80px; - // width: auto; - // min-width: 90px; - // border-radius: 4px; - // align-self: center; - // justify-self: center; - // margin-top: 5px; - // @media (min-width: @width-breakpoint-tablet) { - // height: 100px; - // margin-bottom: 5px; - // } - // img { - // height: 100%; - // width: 100%; - // object-fit: cover; - // } - // } - // .bookcover--blur { - // img { - // filter: blur(4px); - // } - // } - // .imageLg { - // text-align: center; - // width: 100%; - // margin: 10px 10px 0 5px; - // img { - // max-width: 100%; - // max-height: 110px; - // } - // } - // a[href] { - // text-decoration: none; - // } - // .titleAndAuthor { - // grid-area: titleAndAuthor; - // display: flex; - // flex-direction: column; - // padding: 5px 3px 0 10px; - // .resultTitle { - // overflow: auto; - // margin: 0 !important; - // font-family: @lucida_sans_serif-1; - // color: @grey; - // h3 { - // display: block; - // margin: 0; - // padding: 0; - // color: @dark-grey; - // // font-size: 1.0em; - // font-weight: 700; - // font-family: @lucida_sans_serif-6; - // line-height: 1.2em; - // @media(min-width: 425px) { - // font-size: 1.0em; - // } - // @media (min-width: @width-breakpoint-tablet) { - // font-size: 1.0em; - // } - // } - // } - // .bookauthor { - // font-size: small; - // line-height: 1.2em; - // margin: 10px 0; - // @media(min-width: 425px) { - // font-size: 1.0em; - // } - // } - // } + // .bookcover { + // grid-area: bookcover; + // overflow: hidden; + // height: 80px; + // width: auto; + // min-width: 90px; + // border-radius: 4px; + // align-self: center; + // justify-self: center; + // margin-top: 5px; + // @media (min-width: @width-breakpoint-tablet) { + // height: 100px; + // margin-bottom: 5px; + // } + // img { + // height: 100%; + // width: 100%; + // object-fit: cover; + // } + // } + // .bookcover--blur { + // img { + // filter: blur(4px); + // } + // } + // .imageLg { + // text-align: center; + // width: 100%; + // margin: 10px 10px 0 5px; + // img { + // max-width: 100%; + // max-height: 110px; + // } + // } + // a[href] { + // text-decoration: none; + // } + // .titleAndAuthor { + // grid-area: titleAndAuthor; + // display: flex; + // flex-direction: column; + // padding: 5px 3px 0 10px; + // .resultTitle { + // overflow: auto; + // margin: 0 !important; + // font-family: @lucida_sans_serif-1; + // color: @grey; + // h3 { + // display: block; + // margin: 0; + // padding: 0; + // color: @dark-grey; + // // font-size: 1.0em; + // font-weight: 700; + // font-family: @lucida_sans_serif-6; + // line-height: 1.2em; + // @media(min-width: 425px) { + // font-size: 1.0em; + // } + // @media (min-width: @width-breakpoint-tablet) { + // font-size: 1.0em; + // } + // } + // } + // .bookauthor { + // font-size: small; + // line-height: 1.2em; + // margin: 10px 0; + // @media(min-width: 425px) { + // font-size: 1.0em; + // } + // } + // } // .excerpts { // grid-area: excerpts; // display: inline; @@ -216,4 +216,3 @@ // } // } } - diff --git a/static/css/components/fulltext-suggestion-snippet.less b/static/css/components/fulltext-suggestion-snippet.less index fc127750863e..abbc8d423738 100644 --- a/static/css/components/fulltext-suggestion-snippet.less +++ b/static/css/components/fulltext-suggestion-snippet.less @@ -28,4 +28,3 @@ // } } } -