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>
10 <eg-alert-dialog #otherLibraryNoPermissionsAlert
11 i18n-dialogTitle i18n-dialogBody
12 dialogTitle="Insufficient permissions"
13 dialogBody="This material has {{itemCircLib}} as its circulation library, where you do not have UPDATE_COPY permissions. You cannot attach this item without UPDATE_COPY permissions.">
16 <eg-confirm-dialog #confirmOtherLibraryDialog
17 i18n-dialogTitle i18n-dialogBody
18 dialogTitle="Material from a different library"
19 dialogBody="This material has {{itemCircLib}} as its circulation library. Are you sure you want to add it to {{currentCourse.course_number()}}?">
22 <ng-template #dialogContent>
23 <div class="modal-header" [ngClass]="isDialog() ? 'modal-header' : 'alert mt-3'">
24 <h4 class="modal-title" i18n>Course Materials</h4>
25 <ng-container *ngIf="isDialog()">
26 <button type="button" class="btn-close btn-close-white" i18n-aria-label aria-label="Close" (click)="close()"> </button>
29 <div [ngClass]="isDialog() ? 'modal-body' : ''">
31 <div [ngClass]="isDialog() ? 'col-md-12' : 'col-md-4'">
32 <ul ngbNav #associateNav="ngbNav" class="nav-tabs" [keyboard]="true" [roles]="false" role="tablist">
33 <li role="presentation" ngbNavItem>
34 <a role="tab" ngbNavLink i18n>Associate item</a>
35 <ng-template ngbNavContent>
36 <div class="row" [ngClass]="isDialog() ? '' : 'mt-3'">
37 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12'">
38 <div class="input-group">
39 <label for="associate-item-barcode" class="form-label input-group-text" i18n>Barcode</label>
40 <input type="text" class="flex-grow-1" id="associate-item-barcode"
41 [(ngModel)]="barcodeInput" (click)="$event.target.select()"
42 [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'"
46 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
47 <div class="input-group">
48 <label for="associate-item-relationship" class="form-label input-group-text" i18n>Relationship</label>
49 <input type="text" [(ngModel)]="relationshipInput" id="associate-item-relationship"
50 [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'" placeholder-i18n
51 placeholder="e.g. Required" class="flex-grow-1" />
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">
66 <label class="form-label input-group-text" for="associate-item-temp-call-number" i18n>Call Number</label>
68 <input type="text" [(ngModel)]="tempCallNumber" id="associate-item-temp-call-number"
69 [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'"
70 (input)="isModifyingCallNumber = true" class="flex-grow-1" />
72 <div class="input-group-text">
73 <input type="checkbox" [(ngModel)]="isModifyingCallNumber"
74 [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'"
75 aria-label="Checkbox for setting a temporary Call Number" />
79 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
80 <div class="input-group">
81 <label class="form-label input-group-text" for="temp-circ-mod" i18n>Circulation Modifier</label>
82 <eg-combobox i18n-placeholder placeholder="Circulation Modifier..." idlClass="ccm" idlField="name"
83 [displayTemplate]="idlClassLabel" [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'"
84 [asyncSupportsEmptyTermClick]="true" class="flex-grow-1"
86 (onChange)="tempCircMod = $event.id; isModifyingCircMod = true">
88 <div class="input-group-text">
89 <input type="checkbox" [(ngModel)]="isModifyingCircMod"
90 [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'"
91 aria-label="Checkbox for setting a temporary Circulation Modifier" />
96 <div class="row mt-3">
97 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12'">
98 <div class="input-group">
99 <label class="form-label input-group-text" for="temp-item-status" i18n>Item Status</label>
100 <eg-combobox i18n-placeholder placeholder="Item Status..." idlClass="ccs" idlField="name"
101 [displayTemplate]="idlClassLabel" [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'"
102 [asyncSupportsEmptyTermClick]="true" class="flex-grow-1"
103 domId="temp-item-status"
104 (onChange)="tempStatus = $event.id; isModifyingStatus = true">
106 <div class="input-group-text">
107 <input type="checkbox" [(ngModel)]="isModifyingStatus"
108 [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'"
109 aria-label="Checkbox for setting a temporary Item Status" />
113 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
114 <div class="input-group">
115 <label class="form-label input-group-text" for="temp-location" i18n>Shelving Location</label>
116 <eg-item-location-select permFilter="MANAGE_RESERVES" class="flex-grow-1" domId="temp-location"
117 [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'" [(ngModel)]="tempLocation"
118 (valueChange)="isModifyingLocation = true">
119 </eg-item-location-select>
120 <div class="input-group-text">
121 <input type="checkbox" [(ngModel)]="isModifyingLocation"
122 [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'"
123 aria-label="Checkbox for setting a temporary Shelving Location" />
128 <div class="row mt-3">
129 <div class="col-lg-12 text-end">
130 <button type="button" class="btn btn-primary" [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'"
131 (click)="associateItem(barcodeInput, relationshipInput)" i18n [disabled]="!barcodeInput">
138 <li role="presentation" ngbNavItem>
139 <a role="tab" ngbNavLink i18n>Associate brief record</a>
140 <ng-template ngbNavContent>
141 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
142 <div class="input-group">
143 <label class="form-label input-group-text" for="brief-relationship" i18n>Relationship</label>
144 <input type="text" [(ngModel)]="relationshipInput" id="brief-relationship"
145 [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'" placeholder-i18n
146 placeholder="e.g. Required" class="flex-grow-1" />
149 <eg-marc-simplified-editor (xmlRecordEvent)="associateBriefRecord($event)"
150 buttonLabel="Add material" i18n-buttonLabel defaultMarcForm="o">
151 <eg-marc-simplified-editor-field tag="245" ind1="0" ind2="0">
152 <eg-marc-simplified-editor-subfield code="a"></eg-marc-simplified-editor-subfield>
153 </eg-marc-simplified-editor-field>
154 <eg-marc-simplified-editor-field tag="856" ind1="4" ind2="0">
155 <eg-marc-simplified-editor-subfield code="u"></eg-marc-simplified-editor-subfield>
156 <eg-marc-simplified-editor-subfield code="y"></eg-marc-simplified-editor-subfield>
157 <eg-marc-simplified-editor-subfield code="9" [defaultValue]="currentCourse.owning_lib().shortname()"></eg-marc-simplified-editor-subfield>
158 </eg-marc-simplified-editor-field>
159 <eg-marc-simplified-editor-field tag="990">
160 <eg-marc-simplified-editor-subfield code="a" i18n-defaultValue
161 defaultValue="This record was created using the Course Materials Module -- please edit it there">
162 </eg-marc-simplified-editor-subfield>
163 </eg-marc-simplified-editor-field>
164 </eg-marc-simplified-editor>
167 <li role="presentation" ngbNavItem>
168 <a ngbNavLink role="tab">Associate electronic resource from catalog</a>
169 <ng-template ngbNavContent>
170 <div class="row" [ngClass]="isDialog() ? '' : 'mt-3'">
171 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
172 <div class="input-group">
173 <label for="bib-id" class="form-label input-group-text" i18n>Bibliographic Record ID</label>
174 <input type="text" [(ngModel)]="bibId" id="bib-id"
175 [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'" class="flex-grow-1" />
178 <div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
179 <div class="input-group">
180 <label class="form-label input-group-text" for="electronic-relationship" i18n>Relationship</label>
181 <input type="text" [(ngModel)]="relationshipInput" id="electronic-relationship"
182 [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'" class="flex-grow-1" />
186 <div class="row mt-3">
187 <div class="col-lg-12 text-end">
188 <button type="button" class="btn btn-primary" i18n (click)="associateElectronicBibRecord()"
189 [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) === 't'">
197 <div [ngbNavOutlet]="associateNav"></div>
200 <div class="mt-3" [ngClass]="isDialog() ? 'col-md-12' : 'col-md-8'">
201 <eg-grid #materialsGrid [dataSource]="materialsDataSource" [useLocalSort]="true" [disablePaging]="true">
202 <eg-grid-toolbar-action label="Remove Selected" i18n-label (onClick)="deleteSelectedMaterials($event)">
203 </eg-grid-toolbar-action>
204 <eg-grid-toolbar-action label="Edit Selected" i18n-label (onClick)="editSelectedMaterials($event)">
205 </eg-grid-toolbar-action>
206 <eg-grid-column path="id" [index]=true [hidden]="true" label="ID" i18n-label></eg-grid-column>
207 <eg-grid-column label="Barcode" i18n-label name="barcode" [cellTemplate]="barcodeCellTemplate"></eg-grid-column>
208 <eg-grid-column label="Title" i18n-label name="title" flex="3" [cellTemplate]="titleCellTemplate"></eg-grid-column>
209 <eg-grid-column path="item.call_number.label" label="Call Number" i18n-label></eg-grid-column>
210 <eg-grid-column path="item.call_number.prefix.label" [hidden]="true" label="Call Number Prefix" i18n-label hidden>
212 <eg-grid-column path="item.call_number.suffix.label" [hidden]="true" label="Call Number Suffix" i18n-label hidden>
214 <eg-grid-column path="item.circ_modifier.name" [hidden]="true" label="Circulation Modifier" i18n-label></eg-grid-column>
215 <eg-grid-column path="item.circ_lib.shortname" label="Circulation Library" i18n-label></eg-grid-column>
216 <eg-grid-column path="item.location.name" [hidden]="true" label="Shelving Location" i18n-label></eg-grid-column>
217 <eg-grid-column path="item.status.name" [hidden]="true" label="Item Status" i18n-label></eg-grid-column>
218 <eg-grid-column path="original_circ_modifier.name" [hidden]="true" label="Original Circulation Modifier" i18n-label></eg-grid-column>
219 <eg-grid-column path="original_location.name" [hidden]="true" label="Original Shelving Location" i18n-label></eg-grid-column>
220 <eg-grid-column path="original_status.name" [hidden]="true" label="Original Item Status" i18n-label></eg-grid-column>
221 <eg-grid-column path="relationship" label="Relationship" i18n-label></eg-grid-column>
227 <ng-template #barcodeCellTemplate let-entry="row">
228 <span *ngIf="entry.item()">
229 <a class="ps-1" href="/eg/staff/cat/item/{{entry.item().id()}}">
230 {{entry.item().barcode()}}
234 <ng-template #titleCellTemplate let-entry="row">
235 <a class="ps-1" routerLink="/staff/catalog/record/{{entry.record().id()}}">
236 {{entry.record().wide_display_entry().title()}}
239 <ng-template #idlClassLabel let-r="result" i18n>
242 <ng-template #acmcTemplate
243 let-field="field" let-record="record">
244 <eg-combobox idlClass="acmc" [required]="true"
245 [selectedId]="record['course']()"
246 (onChange)="($event) ? record['course']($event.id) : ''">
250 <ng-container *ngIf="!isDialog()">
251 <!-- in "inline" mode, render the grid pane right here -->
252 <ng-container *ngTemplateOutlet="dialogContent">
256 <eg-fm-record-editor #editDialog idlClass='acmcm' [fieldOptions]="{course: {customTemplate:{template:acmcTemplate}}}"
257 [preloadLinkedValues]="true"
258 hiddenFields="id,item,original_callnumber,original_status,original_location,original_circ_modifier,record,temporary_record">
259 </eg-fm-record-editor>