1 <eg-string #materialDeleteFailedString i18n-text text="Disassociation of Course Material failed or was not allowed">
3 <eg-string #materialDeleteSuccessString i18n-text text="Disassociation of Course Material succeeded"></eg-string>
4 <eg-string #materialAddSuccessString i18n-text text="Association of Course Material succeeded"></eg-string>
5 <eg-string #materialAddFailedString i18n-text text="Association of Course Material failed or was not allowed">
7 <eg-string #materialEditSuccessString i18n-text text="Update of Course Material succeeded"></eg-string>
8 <eg-string #materialEditFailedString i18n-text text="Update of Course Material failed or was not allowed"></eg-string>
9 <eg-string #MaterialAddDifferentLibraryString i18n-text text="Material exists at a different library"></eg-string>
11 <ng-template #dialogContent>
12 <div class="modal-header bg-info" [ngClass]="isDialog() ? 'modal-header' : 'alert mt-3'">
13 <h4 class="modal-title" i18n>Course Materials</h4>
14 <ng-container *ngIf="isDialog()">
15 <button type="button" class="close" i18n-aria-label aria-label="Close" (click)="close()">
16 <span aria-hidden="true">×</span>
20 <div [ngClass]="isDialog() ? 'modal-body' : ''">
22 <ngb-tabset [ngClass]="isDialog() ? 'col-md-12' : 'col-md-4'" type="tabs">
23 <ngb-tab title="Associate item" i18n-title>
24 <ng-template ngbTabContent>
25 <div class="row" [ngClass]="isDialog() ? '' : 'mt-3'">
26 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12'">
27 <div class="input-group">
28 <div class="input-group-prepend">
29 <span class="input-group-text" i18n>Barcode</span>
31 <input type="text" class="flex-grow-1" [(ngModel)]="barcodeInput" (click)="$event.target.select()"
32 [disabled]="currentCourse && currentCourse.is_archived() == 't'"
33 (keyup.enter)="associateItem(barcodeInput, relationshipInput)" />
36 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
37 <div class="input-group">
38 <div class="input-group-prepend">
39 <span class="input-group-text" i18n>Relationship</span>
41 <input type="text" [(ngModel)]="relationshipInput"
42 [disabled]="currentCourse && currentCourse.is_archived() == 't'" placeholder-i18n
43 placeholder="e.g. Required" class="flex-grow-1" />
47 <div class="row mt-3">
48 <div class="col-lg-12 text-right">
49 <button class="btn btn-primary" [disabled]="currentCourse && currentCourse.is_archived() == 't'"
50 (click)="associateItem(barcodeInput, relationshipInput)" i18n [disabled]="!barcodeInput">
55 <div class="row justify-content-center mt-3">
57 <h5 i18n>The following fields will be applied to the material
58 added, and reverted once the course is no longer associated
59 with the material.</h5>
62 <div class="row mt-3">
63 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12'">
64 <div class="input-group">
65 <div class="input-group-prepend">
66 <div class="input-group-text">
67 <span i18n>Call Number</span>
70 <input type="text" [(ngModel)]="tempCallNumber"
71 [disabled]="currentCourse && currentCourse.is_archived() == 't'"
72 (input)="isModifyingCallNumber = true" class="flex-grow-1" />
73 <div class="input-group-append">
74 <div class="input-group-text">
75 <input type="checkbox" [(ngModel)]="isModifyingCallNumber"
76 [disabled]="currentCourse && currentCourse.is_archived() == 't'"
77 aria-label="Checkbox for setting a temporary Call Number" />
82 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
83 <div class="input-group">
84 <div class="input-group-prepend">
85 <div class="input-group-text">
86 <span i18n>Circulation Modifier</span>
89 <eg-combobox i18n-placeholder placeholder="Circulation Modifier..." idlClass="ccm" idlField="name"
90 [displayTemplate]="idlClassLabel" [disabled]="currentCourse && currentCourse.is_archived() == 't'"
91 [asyncSupportsEmptyTermClick]="true" class="flex-grow-1"
92 (onChange)="tempCircMod = $event.id; isModifyingCircMod = true">
94 <div class="input-group-append">
95 <div class="input-group-text">
96 <input type="checkbox" [(ngModel)]="isModifyingCircMod"
97 [disabled]="currentCourse && currentCourse.is_archived() == 't'"
98 aria-label="Checkbox for setting a temporary Circulation Modifier" />
104 <div class="row mt-3">
105 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12'">
106 <div class="input-group">
107 <div class="input-group-prepend">
108 <div class="input-group-text">
109 <span i18n>Item Status</span>
112 <eg-combobox i18n-placeholder placeholder="Item Status..." idlClass="ccs" idlField="name"
113 [displayTemplate]="idlClassLabel" [disabled]="currentCourse && currentCourse.is_archived() == 't'"
114 [asyncSupportsEmptyTermClick]="true" class="flex-grow-1"
115 (onChange)="tempStatus = $event.id; isModifyingStatus = true">
117 <div class="input-group-append">
118 <div class="input-group-text">
119 <input type="checkbox" [(ngModel)]="isModifyingStatus"
120 [disabled]="currentCourse && currentCourse.is_archived() == 't'"
121 aria-label="Checkbox for setting a temporary Item Status" />
126 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
127 <div class="input-group">
128 <div class="input-group-prepend">
129 <div class="input-group-text">
130 <span i18n>Shelving Location</span>
133 <eg-item-location-select permFilter="MANAGE_RESERVES" class="flex-grow-1"
134 [disabled]="currentCourse && currentCourse.is_archived() == 't'" [(ngModel)]="tempLocation"
135 (valueChange)="isModifyingLocation = true">
136 </eg-item-location-select>
137 <div class="input-group-append">
138 <div class="input-group-text">
139 <input type="checkbox" [(ngModel)]="isModifyingLocation"
140 [disabled]="currentCourse && currentCourse.is_archived() == 't'"
141 aria-label="Checkbox for setting a temporary Shelving Location" />
149 <ngb-tab title="Associate brief record" i18n-title>
150 <ng-template ngbTabContent>
151 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
152 <div class="input-group">
153 <div class="input-group-prepend">
154 <span class="input-group-text" i18n>Relationship</span>
156 <input type="text" [(ngModel)]="relationshipInput"
157 [disabled]="currentCourse && currentCourse.is_archived() == 't'" placeholder-i18n
158 placeholder="e.g. Required" class="flex-grow-1" />
161 <eg-marc-simplified-editor (xmlRecordEvent)="associateBriefRecord($event)" buttonLabel="Add material" i18n-buttonLabel>
162 <eg-marc-simplified-editor-field tag="245" subfield="a"></eg-marc-simplified-editor-field>
163 <eg-marc-simplified-editor-field tag="856" subfield="u"></eg-marc-simplified-editor-field>
164 <eg-marc-simplified-editor-field tag="856" subfield="9" defaultValue="CONS"></eg-marc-simplified-editor-field>
165 <eg-marc-simplified-editor-field tag="990" subfield="a" i18n-defaultValue
166 defaultValue="This record was created using the Course Materials Module -- please edit it there">
167 </eg-marc-simplified-editor-field>
168 </eg-marc-simplified-editor>
171 <ngb-tab title="Associate electronic resource from catalog" i18n-title>
172 <ng-template ngbTabContent>
173 <div class="row" [ngClass]="isDialog() ? '' : 'mt-3'">
174 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
175 <div class="input-group">
176 <div class="input-group-prepend">
177 <label for="bib-id" class="input-group-text" i18n>Bibliographic Record ID</label>
179 <input type="text" [(ngModel)]="bibId" id="bib-id"
180 [disabled]="currentCourse && currentCourse.is_archived() == 't'" class="flex-grow-1" />
183 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
184 <div class="input-group">
185 <div class="input-group-prepend">
186 <span class="input-group-text" i18n>Relationship</span>
188 <input type="text" [(ngModel)]="relationshipInput"
189 [disabled]="currentCourse && currentCourse.is_archived() == 't'" class="flex-grow-1" />
193 <div class="row mt-3">
194 <div class="col-lg-12 text-right">
195 <button class="btn btn-primary" i18n (click)="associateElectronicBibRecord()"
196 [disabled]="currentCourse && currentCourse.is_archived() == 't'">
205 <div class="mt-3" [ngClass]="isDialog() ? 'col-md-12' : 'col-md-8'">
206 <eg-grid #materialsGrid [dataSource]="materialsDataSource" [useLocalSort]="true">
207 <eg-grid-toolbar-action label="Remove Selected" i18n-label (onClick)="deleteSelectedMaterials($event)">
208 </eg-grid-toolbar-action>
209 <eg-grid-toolbar-action label="Edit Selected" i18n-label (onClick)="editSelectedMaterials($event)">
210 </eg-grid-toolbar-action>
211 <eg-grid-column path="id" [index]=true [hidden]="true" label="ID" i18n-label></eg-grid-column>
212 <eg-grid-column label="Barcode" i18n-label name="barcode" [cellTemplate]="barcodeCellTemplate"></eg-grid-column>
213 <eg-grid-column label="Title" i18n-label name="title" flex="3" [cellTemplate]="titleCellTemplate"></eg-grid-column>
214 <eg-grid-column path="call_number.label" label="Call Number" i18n-label></eg-grid-column>
215 <eg-grid-column path="call_number.prefix.label" [hidden]="true" label="Call Number Prefix" i18n-label hidden>
217 <eg-grid-column path="call_number.suffix.label" [hidden]="true" label="Call Number Suffix" i18n-label hidden>
219 <eg-grid-column path="circ_modifier" [hidden]="true" label="Circulation Modifier" i18n-label></eg-grid-column>
220 <eg-grid-column path="circ_lib.shortname" label="Circulation Library" i18n-label></eg-grid-column>
221 <eg-grid-column path="location.name" [hidden]="true" label="Shelving Location" i18n-label></eg-grid-column>
222 <eg-grid-column path="status.name" [hidden]="true" label="Copy Status" i18n-label></eg-grid-column>
223 <eg-grid-column path="relationship" label="Relationship" i18n-label></eg-grid-column>
229 <ng-template #barcodeCellTemplate let-entry="row">
230 <span *ngIf="entry.item()">
231 <a class="pl-1" href="/eg/staff/cat/item/{{entry.item().id()}}">
232 {{entry.item().barcode()}}
236 <ng-template #titleCellTemplate let-entry="row">
237 <a class="pl-1" routerLink="/staff/catalog/record/{{entry.record().id()}}">
238 {{entry.record().wide_display_entry().title()}}
241 <ng-template #idlClassLabel let-r="result" i18n>
245 <ng-container *ngIf="!isDialog()">
246 <!-- in "inline" mode, render the grid pane right here -->
247 <ng-container *ngTemplateOutlet="dialogContent">
251 <eg-fm-record-editor #editDialog idlClass='acmcm' [fieldOptions]="{course: {linkedSearchField: 'course_number'}}"
252 [preloadLinkedValues]="true"
253 hiddenFields="id,item,original_callnumber,original_status,original_location,original_circ_modifier,record">
254 </eg-fm-record-editor>