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 19:27:12 +0000 (14:27 -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 57d9db6..73dfbd7 100644 (file)
@@ -490,6 +490,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 ad73baf..1158ba0 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">