]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set-expression.component.html
LP 2061136 follow-up: ng lint --fix
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / cat / vandelay / match-set-expression.component.html
1 <ng-template #nodeStrTmpl let-point="point" let-showmatch="showmatch" i18n>
2   <ng-container *ngIf="point">
3     <span *ngIf="point.negate()">NOT </span>
4     <span *ngIf="point.heading()">Normalized Heading</span>
5     <span>{{point.bool_op()}}{{point.svf()}}{{point.tag()}}</span>
6     <span *ngIf="point.subfield()"> ‡{{point.subfield()}}</span>
7     <span *ngIf="showmatch && !point.bool_op()"> | Match score {{point.quality()}}</span>
8   </ng-container>
9 </ng-template>
10 <eg-string key="staff.cat.vandelay.matchpoint.label" 
11   [template]="nodeStrTmpl"></eg-string>
12
13 <div class="row mt-2">
14   <div class="col-lg-7 m2-2">
15     <span class="text-white bg-dark p-2" i18n>
16         Your Expression: {{expressionAsString()}}
17     </span>
18     
19     <div class="row row-cols-auto ms-2 mt-4">
20       <div class="col">
21         <span class="me-2" i18n>Add New:</span>
22         <button type="button" class="btn btn-outline-dark me-2" *ngIf="matchSetType==='biblio'"
23           (click)="newPointType='attr'" i18n>Record Attribute</button>
24         <button type="button" class="btn btn-outline-dark me-2" 
25           (click)="newPointType='marc'" i18n>MARC Tag and Subfield</button>
26         <button type="button" class="btn btn-outline-dark me-2" *ngIf="matchSetType==='authority'"
27           (click)="newPointType='heading'" i18n>Normalized Authority Heading</button>
28         <button type="button" class="btn btn-outline-dark me-2" 
29           (click)="newPointType='bool'" i18n>Boolean Operator</button>
30       </div>
31     </div>
32     <eg-match-set-new-point #newPoint [pointType]="newPointType">
33     </eg-match-set-new-point>
34     <div class="row row-cols-auto mt-2 ms-2" *ngIf="newPointType">
35       <div class="col">
36         <button type="button" class="btn btn-success me-2" (click)="addChildNode()" 
37           [disabled]="!selectedIsBool()" i18n>
38           Add To Selected Node
39         </button>
40
41         <button type="button" class="btn btn-success ms-2" (click)="addChildNode(true)"
42           [disabled]="!hasSelectedNode() ||
43             (newPointType !== 'bool' && selectedIsBool())" i18n>
44           Replace Selected Node
45         </button>
46       </div>
47     </div>
48     <div class="row mt-2 ms-2 fst-italic" *ngIf="newPointType">
49       <ol i18n>
50         <li>Define a new match point using the above fields.</li>
51         <li>Select a boolean node in the tree.</li>
52         <li>Click the "Add..." button to add the new matchpoint
53           as a child of the selected node.</li>
54       </ol>
55     </div>
56   </div>
57   <div class="col-lg-5">
58     <ng-container *ngIf="tree">
59       <div class="d-flex">
60         <button type="button" class="btn btn-destroy me-1" (click)="deleteNode()" 
61           [disabled]="!hasSelectedNode() || isRootNode()" i18n>
62           Remove Selected Node
63         </button>
64         <button type="button" class="btn btn-success me-1" (click)="saveTree()"
65           [disabled]="!changesMade" i18n>
66           Save Changes 
67         </button>
68       </div>
69       <div class="pt-2">
70         <eg-tree
71           [tree]="tree" 
72           (nodeClicked)="nodeClicked($event)">
73         </eg-tree>
74       </div>
75     </ng-container>
76   </div>
77 </div>
78