</div>
<input type="text" class="flex-grow-1" id="associate-item-barcode"
[(ngModel)]="barcodeInput" (click)="$event.target.select()"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'"
(keyup.enter)="associateItem(barcodeInput, relationshipInput)" />
</div>
</div>
<span class="input-group-text" i18n>Relationship</span>
</div>
<input type="text" [(ngModel)]="relationshipInput"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'" placeholder-i18n
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'" placeholder-i18n
placeholder="e.g. Required" class="flex-grow-1" />
</div>
</div>
</div>
</div>
<input type="text" [(ngModel)]="tempCallNumber" label="associate-item-temp-call-number"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'"
(input)="isModifyingCallNumber = true" class="flex-grow-1" />
<div class="input-group-append">
<div class="input-group-text">
<input type="checkbox" [(ngModel)]="isModifyingCallNumber"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'"
aria-label="Checkbox for setting a temporary Call Number" />
</div>
</div>
</div>
</div>
<eg-combobox i18n-placeholder placeholder="Circulation Modifier..." idlClass="ccm" idlField="name"
- [displayTemplate]="idlClassLabel" [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+ [displayTemplate]="idlClassLabel" [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'"
[asyncSupportsEmptyTermClick]="true" class="flex-grow-1"
(onChange)="tempCircMod = $event.id; isModifyingCircMod = true">
</eg-combobox>
<div class="input-group-append">
<div class="input-group-text">
<input type="checkbox" [(ngModel)]="isModifyingCircMod"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'"
aria-label="Checkbox for setting a temporary Circulation Modifier" />
</div>
</div>
</div>
</div>
<eg-combobox i18n-placeholder placeholder="Item Status..." idlClass="ccs" idlField="name"
- [displayTemplate]="idlClassLabel" [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+ [displayTemplate]="idlClassLabel" [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'"
[asyncSupportsEmptyTermClick]="true" class="flex-grow-1"
(onChange)="tempStatus = $event.id; isModifyingStatus = true">
</eg-combobox>
<div class="input-group-append">
<div class="input-group-text">
<input type="checkbox" [(ngModel)]="isModifyingStatus"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'"
aria-label="Checkbox for setting a temporary Item Status" />
</div>
</div>
</div>
</div>
<eg-item-location-select permFilter="MANAGE_RESERVES" class="flex-grow-1"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'" [(ngModel)]="tempLocation"
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'" [(ngModel)]="tempLocation"
(valueChange)="isModifyingLocation = true">
</eg-item-location-select>
<div class="input-group-append">
<div class="input-group-text">
<input type="checkbox" [(ngModel)]="isModifyingLocation"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'"
aria-label="Checkbox for setting a temporary Shelving Location" />
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-lg-12 text-right">
- <button class="btn btn-primary" [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+ <button class="btn btn-primary" [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'"
(click)="associateItem(barcodeInput, relationshipInput)" i18n [disabled]="!barcodeInput">
Add Material
</button>
<span class="input-group-text" i18n>Relationship</span>
</div>
<input type="text" [(ngModel)]="relationshipInput"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'" placeholder-i18n
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'" placeholder-i18n
placeholder="e.g. Required" class="flex-grow-1" />
</div>
</div>
<label for="bib-id" class="input-group-text" i18n>Bibliographic Record ID</label>
</div>
<input type="text" [(ngModel)]="bibId" id="bib-id"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'" class="flex-grow-1" />
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'" class="flex-grow-1" />
</div>
</div>
<div class="d-flex" [ngClass]="isDialog() ? 'col-md-6' : 'col-md-12 mt-3'">
<span class="input-group-text" i18n>Relationship</span>
</div>
<input type="text" [(ngModel)]="relationshipInput"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'" class="flex-grow-1" />
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'" class="flex-grow-1" />
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-lg-12 text-right">
<button class="btn btn-primary" i18n (click)="associateElectronicBibRecord()"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'">
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'">
Add Material
</button>
</div>
</div>
<input type="text" class="flex-grow-1" id="associate-user-barcode"
[(ngModel)]="userBarcode" (click)="$event.target.select()"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'"
(keyup.enter)="associateUser(userBarcode)" />
<button class="btn btn-outline-dark btn-sm" (click)="searchPatrons()">
<span class="material-icons mat-icon-in-button align-middle"
<label for="associate-user-role" class="input-group-text" i18n>Role</label>
</div>
<eg-combobox idlClass="acmr" [(ngModel)]="userRoleInput"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'">
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'">
</eg-combobox>
</div>
</div>
<div class="row mt-3">
<div class="text-right" [ngClass]="isDialog() ? 'col-md-2' : 'col-md-6'">
<button class="btn btn-primary"
- [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+ [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'"
i18n [disabled]="!userBarcode" (click)="associateUser(userBarcode)">
Add User
</button>
<eg-staff-banner
bannerText=" {{currentCourse.course_number()}}: {{currentCourse.name()}}"
i18n-bannerText class="mb-3" *ngIf="currentCourse"
- [bannerStyle]="currentCourse.is_archived() == 't' ? 'alert-secondary' : null"
- [bannerIcon]="currentCourse.is_archived() == 't' ? 'lock' : null">
+ [bannerStyle]="(courseIsArchived || currentCourse.is_archived()) == 't' ? 'alert-secondary' : null"
+ [bannerIcon]="(courseIsArchived || currentCourse.is_archived()) == 't' ? 'lock' : null">
</eg-staff-banner>
<div class="row">
<div class="col text-right">
<button class="btn btn-danger"
- (click)="archiveCourse()" [disabled]="currentCourse && currentCourse.is_archived() == 't'">
+ (click)="archiveCourse()" [disabled]="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't' ">
<i class="material-icons align-middle"
- *ngIf="currentCourse && currentCourse.is_archived() == 't'">block</i>
+ *ngIf="currentCourse && (courseIsArchived || currentCourse.is_archived()) == 't'">block</i>
<span class="align-middle">Archive Course</span>
</button>
<a class="btn btn-warning ml-3" routerLink="/staff/admin/local/asset/course_list" i18n>
<a ngbNavLink i18n>Course materials</a>
<ng-template ngbNavContent>
<eg-course-associate-material-dialog [courseId]="courseId"
- [currentCourse]="currentCourse" displayMode="inline">
+ [currentCourse]="currentCourse" displayMode="inline"
+ [courseIsArchived]="courseIsArchived">
</eg-course-associate-material-dialog>
</ng-template>
</li>
<a ngbNavLink i18n>Course users</a>
<ng-template ngbNavContent>
<eg-course-associate-users-dialog [courseId]="courseId"
- [currentCourse]="currentCourse" displayMode="inline">
+ [currentCourse]="currentCourse" displayMode="inline"
+ [courseIsArchived]="courseIsArchived">
</eg-course-associate-users-dialog>
</ng-template>
</li>