add human-friendly labels for the name column in the holdings definitions grid
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 9 Jul 2020 15:52:32 +0000 (11:52 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 9 Jul 2020 15:52:32 +0000 (11:52 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/acq/provider/provider-holdings.component.html

index 50ac04c..1713c52 100644 (file)
@@ -5,6 +5,22 @@
 <eg-string #deleteFailedString i18n-text text="Delete of Provider Holdings Subfield failed or was not allowed"></eg-string>
 <eg-string #deleteSuccessString i18n-text text="Delete of Provider Holdings Subfield succeeded"></eg-string>
 
+<ng-template #nameCellTemplate let-row="row">
+  <ng-container [ngSwitch]="row.name()">
+    <ng-container *ngSwitchCase="'barcode'" i18n>Barcode</ng-container>
+    <ng-container *ngSwitchCase="'call_number'" i18n>Call Number</ng-container>
+    <ng-container *ngSwitchCase="'circ_modifier'" i18n>Circulation Modifier</ng-container>
+    <ng-container *ngSwitchCase="'collection_code'" i18n>Collection Code</ng-container>
+    <ng-container *ngSwitchCase="'estimated_price'" i18n>Estimated Price</ng-container>
+    <ng-container *ngSwitchCase="'fund_code'" i18n>Fund Code</ng-container>
+    <ng-container *ngSwitchCase="'note'" i18n>Note</ng-container>
+    <ng-container *ngSwitchCase="'owning_lib'" i18n>Owning Library</ng-container>
+    <ng-container *ngSwitchCase="'quantity'" i18n>Quantity</ng-container>
+    <ng-container *ngSwitchCase="'copy_location'" i18n>Shelving Location</ng-container>
+    <ng-container *ngSwitchDefault i18n>{{row.name()}}</ng-container>
+  </ng-container>
+</ng-template>
+
 <eg-fm-record-editor #providerTagEdit
   idlClass="acqpro"
   mode="update"
   <eg-grid-toolbar-action label="Edit Selected" i18n-label (onClick)="editSelected($event)"></eg-grid-toolbar-action>
   <eg-grid-toolbar-action label="Delete Selected" i18n-label (onClick)="deleteSelected($event)"></eg-grid-toolbar-action>
 
+  <eg-grid-column path="id"></eg-grid-column>
+  <eg-grid-column path="name" [cellTemplate]="nameCellTemplate"></eg-grid-column>
+  <eg-grid-column path="subfield"></eg-grid-column>
+
 </eg-grid>
 
 <ng-template #nameTemplate let-field="field" let-record="record">