LP#1849208 - Add PostgreSQL 10 Makfile.install targets
[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">
15     <div class="row ml-2">
16       <span class="text-white bg-dark p-2" i18n>
17         Your Expression: {{expressionAsString()}}
18       </span>
19     </div>
20     <div class="row ml-2 mt-4">
21       <span class="mr-2" i18n>Add New:</span>
22       <button class="btn btn-outline-dark mr-2" *ngIf="matchSetType=='biblio'"
23         (click)="newPointType='attr'" i18n>Record Attribute</button>
24       <button class="btn btn-outline-dark mr-2" 
25         (click)="newPointType='marc'" i18n>MARC Tag and Subfield</button>
26       <button class="btn btn-outline-dark mr-2" *ngIf="matchSetType=='authority'"
27         (click)="newPointType='heading'" i18n>Normalized Authority Heading</button>
28       <button class="btn btn-outline-dark mr-2" 
29         (click)="newPointType='bool'" i18n>Boolean Operator</button>
30     </div>
31     <eg-match-set-new-point #newPoint [pointType]="newPointType">
32     </eg-match-set-new-point>
33     <div class="row mt-2 ml-2" *ngIf="newPointType">
34       <button class="btn btn-success" (click)="addChildNode()" 
35         [disabled]="!selectedIsBool()" i18n>
36         Add To Selected Node
37       </button>
38     </div>
39     <div class="row mt-2 ml-2 font-italic" *ngIf="newPointType">
40       <ol i18n>
41         <li>Define a new match point using the above fields.</li>
42         <li>Select a boolean node in the tree.</li>
43         <li>Click the "Add..." button to add the new matchpoint
44           as a child of the selected node.</li>
45       </ol>
46     </div>
47   </div>
48   <div class="col-lg-5">
49     <ng-container *ngIf="tree">
50       <div class="d-flex">
51         <button class="btn btn-warning mr-1" (click)="deleteNode()" 
52           [disabled]="!hasSelectedNode() || isRootNode()" i18n>
53           Remove Selected Node
54         </button>
55         <button class="btn btn-success mr-1" (click)="saveTree()"
56           [disabled]="!changesMade" i18n>
57           Save Changes 
58         </button>
59       </div>
60       <div class="pt-2">
61         <eg-tree
62           [tree]="tree" 
63           (nodeClicked)="nodeClicked($event)">
64         </eg-tree>
65       </div>
66     </ng-container>
67   </div>
68 </div>
69