<ng-container *ngIf="hasMrConstituentRecords(summary)">
<a routerLink="/staff/catalog/search"
[queryParams]="appendFromMrParam(summary)">
- <eg-bib-display-field [summary]="summary" field="title"
+ <eg-bib-display-field [summary]="summary" field="title"
[usePlaceholder]="true"></eg-bib-display-field>
</a>
</ng-container>
<ng-container *ngIf="!hasMrConstituentRecords(summary)">
<a routerLink="/staff/catalog/record/{{summary.id}}"
[queryParams]="currentParams()">
- <eg-bib-display-field [summary]="summary" field="title"
+ <eg-bib-display-field [summary]="summary" field="title"
[usePlaceholder]="true"></eg-bib-display-field>
</a>
</ng-container>
<div class="col-lg-12">
<a routerLink="/staff/catalog/search"
[queryParams]="getAuthorSearchParams(summary)">
- <eg-bib-display-field [summary]="summary" field="author"
+ <eg-bib-display-field [summary]="summary" field="author"
[usePlaceholder]="true"></eg-bib-display-field>
</a>
</div>
<div class="col-lg-12">
<ng-container *ngIf="summary.display.physical_description">
<!-- [].concat() to avoid modifying the summary arrays -->
- <div class="pb-1" i18n>Phys. Desc.:
- <eg-bib-display-field [summary]="summary"
+ <div class="pb-1" i18n>Phys. Desc.:
+ <eg-bib-display-field [summary]="summary"
field="physical_description" joiner=","></eg-bib-display-field>
</div>
</ng-container>
<ng-container *ngIf="summary.display.edition">
- <div class="pb-1" i18n>Edition:
- <eg-bib-display-field [summary]="summary"
+ <div class="pb-1" i18n>Edition:
+ <eg-bib-display-field [summary]="summary"
field="edition" joiner=","></eg-bib-display-field>
</div>
</ng-container>
</div>
</ng-container>
<ng-template #pubDate>
- <div class="pb-1" i18n>Pub Date:
+ <div class="pb-1" i18n>Pub Date:
<eg-bib-display-field [summary]="summary" field="pubdate">
</eg-bib-display-field>
</div>
</ng-template>
</ng-container>
<ng-container *ngIf="summary.display.isbn">
- <div class="pb-1" i18n>ISBN:
- <eg-bib-display-field [summary]="summary"
+ <div class="pb-1" i18n>ISBN:
+ <eg-bib-display-field [summary]="summary"
field="isbn" joiner=","></eg-bib-display-field>
</div>
</ng-container>
<ng-container *ngIf="summary.display.upc">
- <div class="pb-1" i18n>UPC:
- <eg-bib-display-field [summary]="summary"
+ <div class="pb-1" i18n>UPC:
+ <eg-bib-display-field [summary]="summary"
field="upc" joiner=","></eg-bib-display-field>
</div>
</ng-container>
<ng-container *ngIf="summary.display.issn">
- <div i18n>ISSN:
- <eg-bib-display-field [summary]="summary"
+ <div i18n>ISSN:
+ <eg-bib-display-field [summary]="summary"
field="issn" joiner=","></eg-bib-display-field>
</div>
</ng-container>
- <ng-container *ngIf="has_course">
+ <ng-container *ngIf="hasCourse">
<div i18n>Associated Courses:
<span *ngFor="let course of courses; let isLast=last">
<a routerLink="/staff/admin/local/asset/course_list/{{course.id()}}">
</div>
</div>
<div class="col-lg-2">
- <div class="row" [ngClass]="{'pt-2':copyIndex > 0}"
+ <div class="row" [ngClass]="{'pt-2':copyIndex > 0}"
*ngFor="let copyCount of summary.holdingsSummary; let copyIdx = index">
<div class="float-left text-left w-50">
<span class="pr-1">
<div class="float-right small-text-1">
Created {{summary.record.create_date() | date:'shortDate'}} by
<!-- creator if fleshed after the initial data set is loaded -->
- <a *ngIf="summary.record.creator().usrname" target="_self"
+ <a *ngIf="summary.record.creator().usrname" target="_self"
href="/eg/staff/circ/patron/{{summary.record.creator().id()}}/checkout">
{{summary.record.creator().usrname()}}
</a>
<div class="col-lg-12">
<div class="float-right small-text-1" i18n>
Edited {{summary.record.edit_date() | date:'shortDate'}} by
- <a *ngIf="summary.record.editor().usrname" target="_self"
+ <a *ngIf="summary.record.editor().usrname" target="_self"
href="/eg/staff/circ/patron/{{summary.record.editor().id()}}/checkout">
{{summary.record.editor().usrname()}}
</a>
</div>
<div class="flex-1"></div>
<div>
- <a class="with-material-icon no-href text-primary"
+ <a class="with-material-icon no-href text-primary"
title="Show More" i18n-title
*ngIf="!expand" (click)="expand=true">
<span class="material-icons">expand_more</span>
</a>
- <a class="with-material-icon no-href text-primary"
+ <a class="with-material-icon no-href text-primary"
title="Show Less" i18n-title
*ngIf="expand" (click)="expand=false">
<span class="material-icons">expand_less</span>
</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="card-body">
<div class="flex-1">{{summary.record.edit_date() | date:'short'}}</div>
</div>
</li>
- <ng-container *ngIf="expand && has_course">
+ <ng-container *ngIf="expand && hasCourse">
<li class="list-group-item">
<div class="d-flex">
<div class="flex-1 font-weight-bold" i18n>Associated Courses</div>
-import { Observable } from 'rxjs';
+import {Observable} from 'rxjs';
+import {tap} from 'rxjs/operators';
import {Injectable} from '@angular/core';
import {AuthService} from '@eg/core/auth.service';
import {EventService} from '@eg/core/event.service';
});
}
- fetchCopiesInCourseFromRecord(record_id) {
- const cp_list = [];
- return new Promise((resolve, reject) => {
- this.net.request(
- 'open-ils.cat',
- 'open-ils.cat.asset.copy_tree.global.retrieve',
- this.auth.token(), record_id
- ).subscribe(copy_tree => {
- copy_tree.forEach(cn => {
- cn.copies().forEach(cp => {
- cp_list.push(cp.id());
- });
- });
- }, err => reject(err),
- () => {
- resolve(this.getCoursesFromMaterial(cp_list));
- });
- });
+ fetchCoursesForRecord(recordId) {
+ const courseIds = [];
+ return this.pcrud.search(
+ 'acmcm', {record: recordId}, {atomic: false}
+ ).pipe(tap(material => {
+ if (courseIds.indexOf(material.course()) === -1) {
+ courseIds.push(material.course());
+ }
+ })).toPromise().then(() => this.getCourses(courseIds));
}
// Creating a new acmcm Entry