add-pua-control.component.html 2.22 KB
Newer Older
naji's avatar
naji committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<div>
  <!-- The selected items -->
  <div *ngIf="addedItems?.length > 0" class="pastis-container-selected-items">
    <div *ngFor="let item of addedItems;let i =index" style="display: inline-flex">
      <div class="selected-items-box">
                <span style="padding: 12px;">
                  <span class="item-text">{{item}}</span>
                </span>
        <mat-divider class="selected-items-separator" vertical></mat-divider>
        <span (click)="onRemoveSelectedElement(item)" class="selected-items-close">&times;</span>
      </div>
    </div>
  </div>

  <!-- The list of items to be selected-->
  <mat-list *ngIf="allowedChildren?.length; else noItemsLeftToAdd" class="list-box-head">
        <span class="list-box-content-title">
          <span [ngStyle]="{'margin-top': atLeastOneIsSelected ? '40px' : '0px'}"
                class="paragraph-metadata-subtitle">Les contrôles à ajouter</span>
          <i class="vitamui-icon vitamui-icon-chevron-down" style="margin-left: 20px; font-weight: bold;"></i>
        </span>
    <i class="vita"></i>
    <mat-divider class="pastis-popup-separator"></mat-divider>
    <mat-selection-list [disableRipple]="true"
                        [ngModel]="addedItems" class="list-box">
      <mat-list *ngFor="let element of allowedChildren"
                class="list-item">
                            <span class="list-box-content">
                                <span
                                  [matTooltipShowDelay]="0"
                                  class="text medium"
                                  matTooltip={{getDefinition(element)}}
                                  matTooltipClass="pastis-tooltip-class"
                                  placement="right">{{element}}</span>
                            </span>
        <span (click)="onAddSelectedElement(element)" class="ajouter">{{'USER_ACTION.ADD_METADATA.BOUTON_AJOUTER' | translate}}</span>
        <mat-divider class="pastis-popup-separator"></mat-divider>

      </mat-list>
    </mat-selection-list>
  </mat-list>

  <ng-template #noItemsLeftToAdd>
    <p class="paragraph-metadata-subtitle" style="margin-top: 40px;">
      {{'USER_ACTION.ADD_METADATA.MESSAGE_PLUS_METADONNEE' | translate}}</p>
  </ng-template>

</div>