<div class="row">
</div>
-<!-- List of Edit Templates -->
-
-<div class="row d-flex">
- <div class="flex-1 p-1"><h4 class="font-weight-bold" i18n>Identification</h4></div>
- <div class="flex-1 p-1"><h4 class="font-weight-bold" i18n>Location</h4></div>
- <div class="flex-1 p-1"><h4 class="font-weight-bold" i18n>Circulation</h4></div>
- <div class="flex-1 p-1"><h4 class="font-weight-bold" i18n>Miscellaneous</h4></div>
- <div class="flex-1 p-1"><h4 class="font-weight-bold" i18n>Statistics</h4></div>
-</div>
-
<div class="row d-flex">
<!-- COLUMN 1 -->
<div class="flex-1 p-1">
+ <div class="p-1"><h4 class="font-weight-bold" i18n>Identification</h4></div>
<div class="mb-1">
<eg-batch-item-attr label="Status" i18n-label [readOnly]="true"
<!-- COLUMN 2 -->
<div class="flex-1 p-1">
+ <div class="p-1"><h4 class="font-weight-bold" i18n>Location</h4></div>
<div>
<ng-template #locationTemplate>
<!-- COLUMN 3 -->
<div class="flex-1 p-1">
+ <div class="p-1"><h4 class="font-weight-bold" i18n>Circulation</h4></div>
<div>
<ng-template #circulateTemplate>
<!-- COLUMN 4 -->
<div class="flex-1 p-1">
+
+ <div class="p-1"><h4 class="font-weight-bold" i18n>Miscellaneous</h4></div>
+
+ <div>
+ <ng-template #alertMessageTemplate>
+ <textarea rows="3" class="form-control"
+ [(ngModel)]="values['alert_message']">
+ </textarea>
+ </ng-template>
+ <eg-batch-item-attr label="Alert Message" i18n-label
+ [emptyIsUnset]="true"
+ [editTemplate]="alertMessageTemplate"
+ [labelCounts]="itemAttrCounts('alert_message')"
+ (changesSaved)="applyCopyValue('alert_message')">
+ </eg-batch-item-attr>
+ </div>
+
+ <div>
+ <ng-template #depositTemplate>
+ <select class="form-control" [(ngModel)]="values['deposit']">
+ <option value="yes" i18n>Yes</option>
+ <option value="no" i18n>No</option>
+ </select>
+ </ng-template>
+ <eg-batch-item-attr label="Deposit" i18n-label
+ displayAs="bool"
+ [editTemplate]="depositTemplate"
+ [labelCounts]="itemAttrCounts('deposit')"
+ (changesSaved)="applyCopyValue('deposit',
+ values['deposit'] === 'yes' ? 't': 'f')">
+ </eg-batch-item-attr>
+ </div>
+
+ <div>
+ <ng-template #depositAmountTemplate>
+ <input type="number" class="form-control"
+ [(ngModel)]="values['deposit_amount']"/>
+ </ng-template>
+ <eg-batch-item-attr label="Deposit Amount" i18n-label
+ displayAs="currency"
+ [editTemplate]="depositAmountTemplate"
+ [labelCounts]="itemAttrCounts('deposit_amount')"
+ (changesSaved)="applyCopyValue('deposit_amount')">
+ </eg-batch-item-attr>
+ </div>
+
+ <div>
+ <ng-template #priceTemplate>
+ <input type="number" class="form-control"
+ [(ngModel)]="values['price']"/>
+ </ng-template>
+ <eg-batch-item-attr label="Price" i18n-label
+ displayAs="currency"
+ [editTemplate]="priceTemplate"
+ [labelCounts]="itemAttrCounts('price')"
+ (changesSaved)="applyCopyValue('price')">
+ </eg-batch-item-attr>
+ </div>
+
+ <div>
+ <ng-template #opacVisibleTemplate>
+ <select class="form-control" [(ngModel)]="values['opac_visible']">
+ <option value="yes" i18n>Yes</option>
+ <option value="no" i18n>No</option>
+ </select>
+ </ng-template>
+ <eg-batch-item-attr label="OPAC Visible" i18n-label
+ displayAs="bool"
+ [editTemplate]="opacVisibleTemplate"
+ [labelCounts]="itemAttrCounts('opac_visible')"
+ (changesSaved)="applyCopyValue('opac_visible',
+ values['opac_visible'] === 'yes' ? 't': 'f')">
+ </eg-batch-item-attr>
+ </div>
+
+ <div>
+ <ng-template #refTemplate>
+ <select class="form-control" [(ngModel)]="values['ref']">
+ <option value="yes" i18n>Yes</option>
+ <option value="no" i18n>No</option>
+ </select>
+ </ng-template>
+ <eg-batch-item-attr label="Reference" i18n-label
+ displayAs="bool"
+ [editTemplate]="refTemplate"
+ [labelCounts]="itemAttrCounts('ref')"
+ (changesSaved)="applyCopyValue(
+ 'ref', values['ref'] === 'yes' ? 't': 'f')">
+ </eg-batch-item-attr>
+ </div>
+
+ <div>
+ <ng-template #costTemplate>
+ <input type="number" class="form-control"
+ [(ngModel)]="values['cost']"/>
+ </ng-template>
+ <eg-batch-item-attr label="Acquisition Cost" i18n-label
+ [emptyIsUnset]="true"
+ displayAs="currency"
+ [editTemplate]="costTemplate"
+ [labelCounts]="itemAttrCounts('cost')"
+ (changesSaved)="applyCopyValue('cost')">
+ </eg-batch-item-attr>
+ </div>
+
+ <div>
+ <eg-string #mintConditionYes i18n-text text="Good"></eg-string>
+ <eg-string #mintConditionNo i18n-text text="Damaged"></eg-string>
+
+ <ng-template #mintConditionTemplate>
+ <select class="form-control" [(ngModel)]="values['mint_condition']">
+ <option value="t" i18n>{{mintConditionYes.text}}</option>
+ <option value="f" i18n>{{mintConditionNo.text}}</option>
+ </select>
+ </ng-template>
+ <eg-batch-item-attr label="Quality" i18n-label
+ [emptyIsUnset]="true"
+ [editTemplate]="mintConditionTemplate"
+ [labelCounts]="itemAttrCounts('mint_condition')"
+ (changesSaved)="applyCopyValue('mint_condition')">
+ </eg-batch-item-attr>
+ </div>
+
</div>
<!-- COLUMN 5 -->
<div class="flex-1 p-1">
+ <div class="p-1"><h4 class="font-weight-bold" i18n>Statistics</h4></div>
</div>
</div>
@ViewChild('fineLevelHigh', {static: false})
fineLevelHigh: StringComponent;
+ @ViewChild('mintConditionYes', {static: false})
+ mintConditionYes: StringComponent;
+ @ViewChild('mintConditionNo', {static: false})
+ mintConditionNo: StringComponent;
constructor(
private router: Router,
this.circModifiers = this.circModifiers.sort(
(a, b) => a.name() < b.name() ? -1 : 1);
- console.log('MODS', this.circModifiers);
-
}).then(_ => {
return this.pcrud.retrieveAll('citm')
return this.volcopy.copyStatuses[value].name();
case 'location':
- return value.name();
+ return value.name() +
+ ' (' + this.org.get(value.owning_lib()).shortname() + ')';
case 'edit_date':
case 'create_date':
const mod = this.circModifiers.filter(
m => m.code() === value)[0];
return mod ? mod.name() : '';
+
+ case 'mint_condition':
+ if (!this.mintConditionYes) { return ''; }
+ return value === 't' ?
+ this.mintConditionYes.text : this.mintConditionNo.text;
}
return value;
<div class="border rounded m-1">
- <div class="font-weight-bold header p-2">{{label}}</div>
+ <div class="font-weight-bold header p-2" i18n>
+ {{label}} <span *ngIf="hasChanged" class="text-danger">*</span>
+ </div>
<div *ngIf="!editing" tabindex="0" class="p-2"
[ngClass]="{'has-changes': hasChanged}" (click)="toggleEditMode()">
<div class="d-flex"
<span *ngIf="count.key == 'f'" i18n>No</span>
</ng-container>
<ng-container *ngIf="displayAs == 'currency'">
- {{count.key | currency}}
+ <ng-container
+ *ngIf="emptyIsUnset && !count.key && count.key !== 0; else defaultCurrency">
+ <span i18n><Unset></span>
+ </ng-container>
+ <ng-template #defaultCurrency>{{count.key | currency}}</ng-template>
</ng-container>
<ng-container *ngIf="displayAs == null">
- <ng-container *ngIf="emptyIsUnset && !count.key && count.key !== 0; else default">
+ <ng-container
+ *ngIf="emptyIsUnset && !count.key && count.key !== 0; else default">
<span i18n><Unset></span>
</ng-container>
<ng-template #default>{{count.key}}</ng-template>