Skip to content
Snippets Groups Projects
comment-list.component.html 1.12 KiB
Newer Older
<div fxLayout="row" id="search-container">
Lukas Mauß's avatar
Lukas Mauß committed
  <mat-label fxLayoutAlign="center center">
    <mat-icon class="search-icon">search</mat-icon>
  </mat-label>
  <input #searchBox placeholder="{{ 'comment-list-page.search-box-placeholder-text' | translate }}"
Lukas Mauß's avatar
Lukas Mauß committed
         (input)="searchComments(searchBox.value)">
Lukas Mauß's avatar
Lukas Mauß committed
  <button mat-button *ngIf="searchBox.value" (click)="hideCommentsList=false; searchBox.value=''">
Lukas Mauß's avatar
Lukas Mauß committed
    <mat-icon>close</mat-icon>
  </button>
Thisari Muthuwahandi's avatar
Thisari Muthuwahandi committed

  <button mat-button *ngIf="!searchBox.value && userRole == '1'" color="accent" [matTooltip]="'Export comments'" (click)="export(true)">
    <mat-icon class="add-icon">cloud_download</mat-icon>
  </button>

Lukas Mauß's avatar
Lukas Mauß committed
  <button mat-button *ngIf="!searchBox.value" color="accent" (click)="openSubmitDialog()">
    <mat-icon class="add-icon">add_circle</mat-icon>
  </button>
Lukas Mauß's avatar
Lukas Mauß committed
<mat-card class="outer-card" *ngIf="hideCommentsList">
  <app-comment *ngFor="let current of filteredComments" [comment]="current"> </app-comment>
</mat-card>
<mat-card class="outer-card" *ngIf="!hideCommentsList">
Lukas Mauß's avatar
Lukas Mauß committed
  <app-comment *ngFor="let current of comments | orderBy: 'score'" [comment]="current"> </app-comment>
Lukas Mauß's avatar
Lukas Mauß committed
</mat-card>