]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
9896d56206d256e1cc0f864da3a148644abedcb8
[ceph.git] /
1 <div class="btn-group">
2   <ng-container *ngIf="currentAction">
3     <button type="button"
4             title="{{ useDisableDesc(currentAction) }}"
5             class="btn btn-{{btnColor}}"
6             [ngClass]="{'disabled': disableSelectionAction(currentAction)}"
7             (click)="useClickAction(currentAction)"
8             [routerLink]="useRouterLink(currentAction)"
9             data-testid="table-action-button"
10             [preserveFragment]="currentAction.preserveFragment ? '' : null">
11       <i [ngClass]="[currentAction.icon]"></i>
12       <span>{{ currentAction.name }}</span>
13     </button>
14   </ng-container>
15   <div class="btn-group"
16        ngbDropdown
17        role="group"
18        *ngIf="dropDownActions.length > 1"
19        aria-label="Button group with nested dropdown">
20     <button class="btn btn-{{btnColor}} dropdown-toggle-split"
21             ngbDropdownToggle>
22       <ng-container *ngIf="dropDownOnly">{{ dropDownOnly }} </ng-container>
23       <span *ngIf="!dropDownOnly"
24             class="sr-only"></span>
25     </button>
26     <div class="dropdown-menu"
27          ngbDropdownMenu>
28       <ng-container *ngFor="let action of dropDownActions">
29         <button ngbDropdownItem
30                 class="{{ toClassName(action) }}"
31                 title="{{ useDisableDesc(action) }}"
32                 (click)="useClickAction(action)"
33                 [routerLink]="useRouterLink(action)"
34                 [preserveFragment]="action.preserveFragment ? '' : null"
35                 [disabled]="disableSelectionAction(action)">
36           <i [ngClass]="[action.icon]"></i>
37           <span>{{ action.name }}</span>
38         </button>
39       </ng-container>
40     </div>
41   </div>
42 </div>