All files / app/component/action/action-list action-list.component.html

12.12% Statements 8/66
21.73% Branches 5/23
0% Functions 0/5
16.66% Lines 6/36

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 49 50 51 52 53 54 55 568x                     8x                                       4x       4x                                 3x 4x    
@for (a of groupedActions | keyvalue; track a.key; let i = $index) {
  @if (i < actions - hiddenActions) {
    @if (a.value[0].confirm) {
      <app-confirm-action [action]="apply$(a.value)"
                          [appTitle]="a.value">{{ a.key }}</app-confirm-action>
    } @else {
      <app-inline-button [action]="apply$(a.value)"
                         [appTitle]="a.value">{{ a.key }}</app-inline-button>
    }
  }
}
@if (advanced || hiddenActions || mediaAttachment) {
  <span class="fake-link show-more"
        (click)="showAdvanced($event)"></span>
  <ng-template #actionsMenu>
    <div class="context-menu advanced-actions" (click)="$event.stopPropagation()">
      @if (hiddenActions) {
        @for (a of groupedActions | keyvalue; track a.key; let i = $index) {
          @if (i >= actions - hiddenActions) {
            @if (a.value[0].confirm) {
              <app-confirm-action [action]="apply$(a.value)"
                                  [appTitle]="a.value">{{ a.key }}</app-confirm-action>
            } @else {
              <app-inline-button [action]="apply$(a.value)"
                                 [appTitle]="a.value">{{ a.key }}</app-inline-button>
            }
          }
        }
      }
      @if (showDownload) {
        <a class="fake-link"
           (click)="download()" i18n>download</a>
      }
      @if (mediaAttachment) {
      <a class="fake-link"
         (click)="downloadMedia()" i18n>media</a>
      }
      @if (groupedAdvancedActions) {
        @for (a of groupedAdvancedActions | keyvalue; track a.key) {
          @if (a.value[0].confirm) {
            <app-confirm-action [message]="a.value[0].confirm!"
                                [action]="apply$(a.value)"
                                [appTitle]="a.value">{{ a.key }}</app-confirm-action>
          } @else {
            <app-inline-button [action]="apply$(a.value)"
                               [appTitle]="a.value">{{ a.key }}</app-inline-button>
          }
        }
      }
    </div>
  </ng-template>
} @else if (showDownload) {
  <a class="fake-link"
     (click)="download()" i18n>download</a>
}