</div>
<div class="row">
- <!-- in expanded display, show the jacket image along the left -->
- <ng-container *ngIf="expand">
- <div class="col-lg-1 pr-0">
- <a href="/opac/extras/ac/jacket/large/r/{{summary.id}}">
- <img class="jacket jacket-medium"
- alt="Jacket Image" i18n-alt
- src="/opac/extras/ac/jacket/medium/r/{{summary.id}}"/>
- </a>
- </div>
- </ng-container>
-
- <!-- make room for the jacket image when expanded -->
- <div [ngClass]="{'col-lg-11 pl-0': expand, 'col-lg-12': !expand}">
+ <div class='col-lg-11 pl-0'>
<div class="card-body">
<ul class="list-group list-group-flush">
<li class="list-group-item">
import {Component, OnInit, Input} from '@angular/core';
import {OrgService} from '@eg/core/org.service';
-import {CourseService} from '@eg/staff/share/course.service';
import {BibRecordService, BibRecordSummary
} from '@eg/share/catalog/bib-record.service';
import {ServerStoreService} from '@eg/core/server-store.service';
export class BibStaffViewComponent implements OnInit {
initDone = false;
- hasCourse = false;
- courses: any;
// True / false if the display is vertically expanded
private _exp: boolean;
this.summary = s;
if (this.initDone && this.summary) {
this.summary.getBibCallNumber();
- this.loadCourseInformation(this.summary.record.id());
}
}
private bib: BibRecordService,
private org: OrgService,
private store: ServerStoreService,
- private cat: CatalogService,
- private course: CourseService
+ private cat: CatalogService
) {}
ngOnInit() {
.then(_ => this.cat.fetchCcvms())
.then(_ => {
if (this.summary) {
- return this.loadCourseInformation(this.summary.record.id())
- .then(__ => this.summary.getBibCallNumber());
+ return this.summary.getBibCallNumber();
} else {
if (this.recordId) {
return this.loadSummary();
}
loadSummary(): Promise<any> {
- return this.loadCourseInformation(this.recordId)
- .then(_ => {
- return this.bib.getBibSummary(this.recordId).toPromise()
- .then(summary => {
- this.summary = summary;
- return summary.getBibCallNumber();
- });
- });
- }
-
- loadCourseInformation(recordId): Promise<any> {
- return this.org.settings('circ.course_materials_opt_in')
- .then(setting => {
- if (setting['circ.course_materials_opt_in']) {
- this.course.fetchCoursesForRecord(recordId).then(courseList => {
- if (courseList) {
- this.courses = courseList;
- this.hasCourse = true;
- }
- });
- }
+ return this.bib.getBibSummary(this.recordId).toPromise()
+ .then(summary => {
+ this.summary = summary;
+ return summary.getBibCallNumber();
});
}