All files / app/component/bulk bulk.component.html

29.41% Statements 20/68
12.5% Branches 2/16
0% Functions 0/2
50% Lines 15/30

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 481x   1x 2x     1x 2x 1x   1x   1x   1x   1x 1x   1x     1x                                         2x     1x  
<details class="advanced">
  <summary>
    <span i18n>Bulk tools</span>
    @if (batchRunning) {
      <app-loading [batch]="true"></app-loading>
    }
  </summary>
  @if (empty) {
    <span i18n>no results</span>
  } @else {
    <span class="fake-link" (click)="download()" i18n>download</span>
    @if (type === 'ref') {
      <a class="fake-link" (click)="toggle()" i18n>toggle</a>
      @if (store.account.user) {
        <a class="fake-link" routerLink="/submit" [queryParams]="{source: urls}" i18n>reply</a>
      }
      <app-inline-tag [action]="tag$" i18n>tag</app-inline-tag>
      <app-confirm-action [action]="copy$" i18n>copy</app-confirm-action>
    }
    <app-confirm-action class="force-delete" [action]="store.hotkey ? forceDelete$ : delete$" i18n>delete</app-confirm-action>
    @if (type === 'ref') {
      @if (admin.getPlugin('plugin/invoice')) {
        <a routerLink="/submit/invoice" [queryParams]="{url: urls}" i18n>invoice</a>
      }
      @for (f of forms; track f.tag) {
        <app-inline-plugin [action]="plugin$"
                           [plugin]="f"
                           [value]="defaults"
                           [appTitle]="f">{{ f.tag.substring('plugin/'.length) }}</app-inline-plugin>
      }
      @for (a of groupedActions | keyvalue; track a.key) {
        @if (a.value[0].confirm) {
          <app-confirm-action [message]="a.value[0].confirm!"
                              [action]="doAction$(a.value)"
                              [appTitle]="a.value">{{ a.key }}</app-confirm-action>
        } @else {
          <app-inline-button [action]="doAction$(a.value)"
                             [appTitle]="a.value">{{ a.key }}</app-inline-button>
        }
      }
    }
  }
 
  @for (e of serverError; track e) {
    <div class="error">{{ e }}</div>
  }
</details>