All files / src/app/shared/components/product/product-list-toolbar product-list-toolbar.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

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 56 57 58 59 60 61 62 63 64 65 66 67 682x                                                                                                                                      
<div class="filters-row row align-items-center">
  <div class="col-md-7 col-sm-10">
    <div class="row align-items-center">
      <div class="col-sm-3 col-4">
        <div *ngIf="itemCount >= 0" class="pagination-total text-nowrap">
          {{ 'product.items.label' | translate : { '0': itemCount } }}
        </div>
      </div>
      <div class="col-sm-9 col-8">
        <ish-product-list-paging
          *ngIf="pageIndices?.length && currentPage"
          [currentPage]="currentPage"
          [pageIndices]="pageIndices"
          [fragmentOnRouting]="fragmentOnRouting"
        />
      </div>
    </div>
  </div>
  <div
    class="col-4 col-sm-2 switch-layout"
    [ngClass]="{ 'col-md-2': sortOptions?.length, 'col-md-5': !sortOptions?.length }"
  >
    <div class="sort-by align-items-center justify-content-end">
      <a
        [routerLink]="[]"
        queryParamsHandling="merge"
        [queryParams]="{ view: 'grid' }"
        [replaceUrl]="true"
        [fragment]="fragmentOnRouting"
        class="grid-view-link"
        [ngClass]="{ 'grid-active': gridView }"
        data-testing-id="grid-view-link"
        role="button"
        [attr.aria-label]="'product.items.view.grid_view.aria_label' | translate"
      >
        <fa-icon [icon]="['fas', 'th']" />
      </a>
      <a
        [routerLink]="[]"
        queryParamsHandling="merge"
        [queryParams]="{ view: 'list' }"
        [replaceUrl]="true"
        [fragment]="fragmentOnRouting"
        class="list-view-link"
        [ngClass]="{ 'list-active': listView }"
        data-testing-id="list-view-link"
        role="button"
        [attr.aria-label]="'product.items.view.list_view.aria_label' | translate"
      >
        <fa-icon [icon]="['fas', 'list']" />
      </a>
    </div>
  </div>
  <div *ngIf="sortOptions?.length" class="col-8 col-sm-12 col-md-3 sort-by">
    <select
      class="form-control sort-by-filter"
      id="SortingAttribute"
      name="SortingAttribute"
      (change)="changeSortBy($event.target)"
    >
      <option value="default" [selected]="sortBy === 'default'">
        {{ 'product.items.sorting.default.label' | translate }}
      </option>
      <option *ngFor="let o of sortOptions" [value]="o.value" [selected]="o.value === sortBy">{{ o.label }}</option>
    </select>
  </div>
</div>