LP1913807 Staff catalog shows preferred lib holdings counts
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / staff / catalog / result / record.component.html
index 602d768..115d92a 100644 (file)
           </div>
           <div class="row pt-2">
             <div class="col-lg-12">
+              <ng-container *ngIf="summary.firstCallNumber">
+                <div class="pb-1" i18n>Call Number:
+                  {{summary.firstCallNumber.call_number_prefix_label}}
+                  {{summary.firstCallNumber.call_number_label}}
+                  {{summary.firstCallNumber.call_number_suffix_label}}
+                </div>
+              </ng-container>
               <ng-container *ngIf="summary.display.physical_description">
                 <!-- [].concat() to avoid modifying the summary arrays -->
                 <div class="pb-1" i18n>Phys. Desc.:
       </div>
       <div class="col-lg-2">
         <div class="row" [ngClass]="{'pt-2':copyIndex > 0}"
-          *ngFor="let copyCount of summary.holdingsSummary; let copyIdx = index">
+          *ngFor="let copyCount of getHoldingsSummaries(); let copyIdx = index">
           <div class="float-left text-left w-50">
             <span class="pr-1">
             {{copyCount.available}} / {{copyCount.count}} items
         <div class="row pt-2">
           <div class="col-lg-12">
             <div class="float-right">
-              <span>
-                <button (click)="placeHold()"
-                  class="btn btn-sm btn-success label-with-material-icon small-text-1">
-                  <span class="material-icons">check</span>
-                  <span i18n>Place Hold</span>
-                </button>
-              </span>
+              <ng-container *ngIf="summary.record.deleted() == 't'">
+                <span class="text-danger" i18n>(Deleted)</span>
+              </ng-container>
+              <ng-container *ngIf="summary.record.deleted() == 'f'">
+                <span>
+                  <button (click)="placeHold()"
+                    class="btn btn-sm btn-success label-with-material-icon small-text-1">
+                    <span class="material-icons">check</span>
+                    <span i18n>Place Hold</span>
+                  </button>
+                </span>
+              </ng-container>
             </div>
           </div>
         </div>
       </div><!-- col -->
     </div><!-- row -->
+    <div class="row" *ngIf="searchContext.showResultExtras && summary.eResourceUrls.length">
+      <div class="col-lg-12 mt-2">
+        <div class="w-auto ml-2 mr-2">
+          <div class="row p-1 mt-1 mb-1 border-top" *ngFor="let url of summary.eResourceUrls">
+            <div class="col-lg-2">
+              <span class="font-weight-bold">
+                <ng-container [ngSwitch]="url.ind2">
+                  <ng-container *ngSwitchCase="'0'" i18n>Electronic Resource:</ng-container>
+                  <ng-container *ngSwitchCase="'1'" i18n>Version of Resource:</ng-container>
+                  <ng-container *ngSwitchCase="'2'" i18n>Related Resource:</ng-container>
+                  <ng-container *ngSwitchDefault i18n>Electronic Resource</ng-container>
+                  </ng-container>
+               </span>
+            </div>
+            <div class="col-lg"><a href="{{url.href}}">{{url.label}}</a> {{url.note}}</div>
+          </div>
+        </div>
+      </div>
+    </div><!-- row -->
+    <div class="row" *ngIf="searchContext.showResultExtras && summary.copies">
+      <div class="col-lg-12 mt-2">
+        <div class="w-auto ml-2 mr-2">
+          <ng-container *ngIf="summary.copies.length">
+            <div class="row p-1 font-weight-bold border-top">
+              <div class="col-lg-2" i18n>Library</div>
+              <div class="col-lg-3" i18n>Shelving location</div>
+              <div class="col-lg-4" i18n>Call number</div>
+              <div class="col-lg-3" i18n>Status</div>
+            </div>
+            <div class="row p-1 mt-1 mb-1 border-top" *ngFor="let copy of summary.copies">
+              <div class="col-lg-2" i18n>{{copy.circ_lib_sn}}</div>
+              <div class="col-lg-3" i18n>{{copy.copy_location}}</div>
+              <div class="col-lg-4" i18n>
+                {{copy.call_number_prefix_label}} 
+                {{copy.call_number_label}}
+                {{copy.call_number_suffix_label}}
+              </div>
+              <div class="col-lg-3" i18n>{{copy.copy_status}}</div>
+            </div>
+          </ng-container>
+          <ng-container *ngIf="!summary.copies.length && !summary.eResourceUrls.length">
+            <span class="font-italic" i18n>No Items To Display</span>
+          </ng-container>
+        </div>
+      </div>
+    </div>
   </div><!-- card-body -->
 </div><!-- card -->