</div>
</ng-template>
+<ng-template #holdableTemplate let-row="row" let-userContext="userContext">
+ <ng-container *ngIf="row.copy">
+ <ng-container *ngIf="userContext.copyIsHoldable(row.copy); else notHoldable">
+ <span i18n>Yes</span>
+ </ng-container>
+ <ng-template #notHoldable><span i18n>No</span></ng-template>
+ </ng-container>
+</ng-template>
+
<div class='eg-copies w-100 mt-3'>
<eg-grid #holdingsGrid [dataSource]="gridDataSource"
<eg-grid-column i18n-label label="Age Hold Protection"
path="copy.age_protect.name"></eg-grid-column>
- <!--
<eg-grid-column i18n-label label="Holdable?" name="holdable"
- [cellTemplate]="holdableTemplate" [cellContext]="copyContext">
+ [cellTemplate]="holdableTemplate" [cellContext]="gridTemplateContext">
</eg-grid-column>
- -->
</eg-grid>
</div>
}
this.holdingsGrid.reload();
+ },
+
+ copyIsHoldable: (copy: IdlObject): boolean => {
+ return copy.holdable() === 't'
+ && copy.location().holdable() === 't'
+ && copy.status().holdable() === 't';
}
}
}
this.renderFromPrefs = false;
}
+
fetchHoldings(pager: Pager): Observable<any> {
if (!this.recId) { return of([]); }