experimenting with layout and stripping courses functionality
authorJason Etheridge <jason@EquinoxOLI.org>
Mon, 3 Oct 2022 05:58:21 +0000 (01:58 -0400)
committerJason Etheridge <jason@EquinoxOLI.org>
Wed, 4 Jan 2023 13:44:00 +0000 (08:44 -0500)
Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html
Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.ts

index 56438fa..95af1a6 100644 (file)
   </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">
index 0a02364..ca2f76b 100644 (file)
@@ -1,6 +1,5 @@
 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';
@@ -14,8 +13,6 @@ import {CatalogService} from '@eg/share/catalog/catalog.service';
 export class BibStaffViewComponent implements OnInit {
 
     initDone = false;
-    hasCourse = false;
-    courses: any;
 
     // True / false if the display is vertically expanded
     private _exp: boolean;
@@ -36,7 +33,6 @@ export class BibStaffViewComponent implements OnInit {
         this.summary = s;
         if (this.initDone && this.summary) {
             this.summary.getBibCallNumber();
-            this.loadCourseInformation(this.summary.record.id());
         }
     }
 
@@ -44,8 +40,7 @@ export class BibStaffViewComponent implements OnInit {
         private bib: BibRecordService,
         private org: OrgService,
         private store: ServerStoreService,
-        private cat: CatalogService,
-        private course: CourseService
+        private cat: CatalogService
     ) {}
 
     ngOnInit() {
@@ -55,8 +50,7 @@ export class BibStaffViewComponent implements OnInit {
         .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();
@@ -70,27 +64,10 @@ export class BibStaffViewComponent implements OnInit {
     }
 
     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();
         });
     }