</div>
<ngb-tabset #recordTabs [activeId]="recordTab"
(tabChange)="beforeTabChange($event)">
- <ngb-tab title="Item Table" i18n-title id="catalog">
+ <ngb-tab title="Item Table" i18n-title id="item_table">
<ng-template ngbTabContent>
<eg-catalog-copies [recordId]="recordId"></eg-catalog-copies>
</ng-template>
</eg-catalog-record-conjoined>
</ng-template>
</ngb-tab>
- <ngb-tab title="Patron View" i18n-title id="opac">
+ <ngb-tab title="Patron View" i18n-title id="catalog">
<ng-template ngbTabContent>
<eg-opac-record-detail [recordId]="recordId">
</eg-opac-record-detail>
this.defaultTab =
this.store.getLocalItem('eg.cat.default_record_tab')
- || 'catalog';
+ || 'item_table';
// Watch for URL record ID changes
// This includes the initial route.
this.searchContext = this.staffCat.searchContext;
if (!this.recordTab) {
- this.recordTab = this.defaultTab || 'catalog';
+ this.recordTab = this.defaultTab || 'item_table';
}
this.loadRecord();
});
}
+ // Map the Angular catalog-only 'item_table' tab to the AngJS
+ // 'catalog' tab.
+ function get_default_record_tab() {
+ var tab = egCore.hatch.getLocalItem('eg.cat.default_record_tab');
+ if (!tab || tab === 'item_table') { return 'catalog'; }
+ return tab;
+ }
+
// also set it when the iframe changes to a new record
$scope.handle_page = function(url) {
// or we didn't change records on the OPAC load
if (!$scope.in_opac_call && ($scope.record_id != prev_record_id)) {
if ($scope.record_id) {
- $scope.default_tab = egCore.hatch.getLocalItem( 'eg.cat.default_record_tab' );
- tab = $routeParams.record_tab || $scope.default_tab || 'catalog';
+ $scope.default_tab = get_default_record_tab();
+ tab = $routeParams.record_tab || $scope.default_tab;
} else {
tab = $routeParams.record_tab || 'catalog';
}
var tab;
if ($scope.record_id) {
- $scope.default_tab = egCore.hatch.getLocalItem( 'eg.cat.default_record_tab' );
- tab = $routeParams.record_tab || $scope.default_tab || 'catalog';
+ $scope.default_tab = get_default_record_tab();
+ tab = $routeParams.record_tab || $scope.default_tab;
} else {
tab = $routeParams.record_tab || 'catalog';