LP1468132 MARC search honors search scope
authorBill Erickson <berickxx@gmail.com>
Mon, 14 Sep 2020 14:52:05 +0000 (10:52 -0400)
committerJason Boyer <JBoyer@equinoxinitiative.org>
Mon, 15 Feb 2021 18:59:30 +0000 (13:59 -0500)
Adds a 'Results from All Libraries' checkbox to the MARC search form in
the Angular staff catalog.  When unchecked, the MARC search will limit
to results with holdings in the search scope.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>
Open-ILS/src/eg2/src/app/share/catalog/search-context.ts
Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.html

index d94e5e2..908f203 100644 (file)
@@ -492,6 +492,10 @@ export class CatalogSearchContext {
             org_unit: this.searchOrg.id()
         };
 
+        if (this.global) {
+            args.depth = this.org.root().ou_type().depth();
+        }
+
         if (this.sort) {
             const parts = this.sort.split(/\./);
             args.sort = parts[0]; // title, author, etc.
index 51f84e1..03e75c3 100644 (file)
               </div>
             </div>
           </div>
+          <div class="row mt-2">
+            <div class="checkbox pl-3">
+              <label>
+                <input type="checkbox" [(ngModel)]="context.global"/>
+                <span class="pl-1" i18n>Results from All Libraries</span>
+              </label>
+            </div>
+          </div>
         </ng-template>
       </ngb-tab>
       <ngb-tab title="Browse" i18n-title id="browse">