]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/admin/server/org-unit-type.component.html
LP#1823393: various usability improvements
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / admin / server / org-unit-type.component.html
1 <eg-staff-banner bannerText="Org Unit Type Configuration" i18n-bannerText>
2 </eg-staff-banner>
3
4 <ng-template #editStrTmpl i18n>Org Unit Type Update Succeeded</ng-template>
5 <eg-string #editString [template]="editStrTmpl"></eg-string>
6
7 <ng-template #createStrTmpl i18n>Org Unit Type Succeessfully Created</ng-template>
8 <eg-string #createString [template]="createStrTmpl"></eg-string>
9
10 <ng-template #errorStrTmpl i18n>Org Unit Type Update Failed</ng-template>
11 <eg-string #errorString [template]="errorStrTmpl"></eg-string>
12
13 <eg-confirm-dialog #delConfirm 
14   i18n-dialogTitle i18n-dialogBody
15   dialogTitle="Confirm Delete"
16   dialogBody="Delete Org Unit Type {{selected ? selected.label : ''}}?">
17 </eg-confirm-dialog>
18
19 <eg-fm-record-editor #editDialog idlClass="aout" readonlyFields="depth,parent"
20   [fieldOptions]="{name:{isRequired:true},opac_label:{isRequired:true}}"
21 >
22 </eg-fm-record-editor>
23
24 <div class="row">
25   <div class="col-lg-4">
26     <h3 i18n>Org Unit Types</h3>
27     <eg-tree [tree]="tree" (nodeClicked)="nodeClicked($event)"></eg-tree>
28   </div>
29   <div class="col-lg-8">
30     <h3 i18n class="mb-3">Selected Org Unit Type</h3>
31     <ng-container *ngIf="!selected">
32       <div class="alert alert-info font-italic" i18n>
33         Select an org unit type from the tree on the left.
34       </div>
35     </ng-container>
36     <div *ngIf="selected" class="common-form striped-even">
37       <div class="row">
38         <div class="col-lg-3">
39           <label i18n>Actions for Selected: </label>
40         </div>
41         <div class="col-lg-9">
42           <button class="btn btn-info mr-2" (click)="edit()" i18n>Edit</button>
43           <button class="btn btn-info mr-2" (click)="addChild()" i18n>Add Child</button>
44           <button class="btn btn-warning mr-2" (click)="remove()"
45             [disabled]="selected.callerData.aout.children().length > 0 || selected.callerData.orgCount > 0" i18n>Delete</button>
46         </div>
47       </div>
48       <div class="row">
49         <!-- TODO: use FmRecordEditPaneComponent once it exists -->
50         <div class="col-lg-4">
51           <label i18n>Name: </label>
52         </div>
53         <div class="col-lg-8 font-weight-bold">
54           {{selected.callerData.aout.name()}}
55         </div>
56       </div>
57       <div class="row">
58         <div class="col-lg-4">
59           <label i18n>Label: </label>
60         </div>
61         <div class="col-lg-8 font-weight-bold">
62           {{selected.callerData.aout.opac_label()}}
63         </div>
64       </div>
65       <div class="row">
66         <div class="col-lg-4">
67           <label i18n>Can Have Users: </label>
68         </div>
69         <div class="col-lg-8 font-weight-bold">
70           <!-- TODO: use <eg-bool/> once merged-->
71           {{selected.callerData.aout.can_have_users() == 't'}}
72         </div>
73       </div>
74       <div class="row">
75           <div class="col-lg-4">
76             <label i18n>Can Have Volumes: </label>
77           </div>
78           <div class="col-lg-8 font-weight-bold">
79             <!-- TODO: use <eg-bool/> once merged-->
80             {{selected.callerData.aout.can_have_vols() == 't'}}
81           </div>
82         </div>
83       <div class="row">
84         <div class="col-lg-4">
85           <label i18n>Depth: </label>
86         </div>
87         <div class="col-lg-8 font-weight-bold">
88           {{selected.callerData.aout.depth()}}
89         </div>
90       </div>
91       <div class="row">
92         <div class="col-lg-4">
93           <label i18n>Number of Org Units Of This Type: </label>
94         </div>
95         <div class="col-lg-8 font-weight-bold">
96           {{selected.callerData.orgCount}}
97         </div>
98       </div>
99     </div>
100   </div>
101 </div>