LP1966342 Highlight Zero Holdings in Staff Catalog
authorTerran McCanna <tmccanna@georgialibraries.org>
Mon, 4 Apr 2022 21:02:13 +0000 (17:02 -0400)
committerTerran McCanna <tmccanna@georgialibraries.org>
Mon, 4 Apr 2022 21:02:13 +0000 (17:02 -0400)
This highlights the holdings on the staff catalog search results page
when there are zero holdings as such:

- Dark gray if no copies, not transcendant, and not unshadowed
- Medium gray if no copies and not transcendant
- Blue if no copies (but opac-visible)

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/eg2/src/app/staff/catalog/result/record.component.html

index 7b070fe..5bcd73f 100644 (file)
       </div>
       <div class="col-lg-2">
         <div class="row" [ngClass]="{'pt-2':copyIndex > 0}"
-          *ngFor="let copyCount of getHoldingsSummaries(); let copyIdx = index">
+          *ngFor="let copyCount of getHoldingsSummaries(); let copyIdx = index"
+                 [ngClass]="{
+            'text-light bg-dark' : copyCount.count == 0 && (copyCount.transcendant == 0 || !copyCount.transcendant) && copyCount.unshadow == 0,
+            'text-light bg-secondary' : copyCount.count == 0 && (copyCount.transcendant == 0 || !copyCount.transcendant),
+                       'text-light bg-info' : copyCount.count == 0
+            }">
           <div class="float-left text-left w-50">
             <span class="pr-1">
             {{copyCount.available}} / {{copyCount.count}} items