aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/shared/buttons/action-dropdown.component.html
blob: 114b1d71f68ab2953c9ccfeac092ee3b7186e2c6 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                               



                                                                                                                           
                                                                                      
                                                                  

        
                                             
                                                       
 







                                                                                                                              
                     


                                          

                   
      
<div class="dropdown-root" ngbDropdown [placement]="placement">
  <div
    class="action-button" [ngClass]="{ small: buttonSize === 'small', grey: theme === 'grey', orange: theme === 'orange' }"
    ngbDropdownToggle role="button"
  >
    <my-global-icon *ngIf="!label" class="more-icon" iconName="more"></my-global-icon>
    <span *ngIf="label" class="dropdown-toggle">{{ label }}</span>
  </div>

  <div ngbDropdownMenu class="dropdown-menu">
    <ng-container *ngFor="let actions of getActions()">

      <ng-container *ngFor="let action of actions">
        <ng-container *ngIf="action.isDisplayed === undefined || action.isDisplayed(entry) === true">
          <a *ngIf="action.linkBuilder" class="dropdown-item" [routerLink]="action.linkBuilder(entry)">{{ action.label }}</a>

          <span *ngIf="!action.linkBuilder" class="custom-action dropdown-item" (click)="action.handler(entry)" role="button">
            {{ action.label }}
          </span>
        </ng-container>
      </ng-container>

      <div class="dropdown-divider"></div>

    </ng-container>
  </div>
</div>