aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/search/search.component.html
blob: da2ace54de3790ed8d8de52e4ec4a171416f5ba5 (plain) (tree)
1
2
3
4
5
6
7
8
                                                                                                  
                              
                            




                                                                                 


            
                                                                                                                        
                                                                                     

                                              



                                                                                                          


            
                                                                        
                                                                                                         


          
                                                                                           
                    

        



                                                                    

          




                                                                                                 
 

                                                                                               
 
                                                                         
          
 
                                                     
                                                                                                    
          

                 
      
<div myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" class="search-result">
  <div class="results-header">
    <div class="first-line">
      <div class="results-counter" *ngIf="pagination.totalItems">
        <span i18n>{{ pagination.totalItems | myNumberFormatter }} results</span>
        <span *ngIf="currentSearch" i18n>
          for <span class="search-value">{{ currentSearch }}</span>
        </span>
      </div>

      <div
        class="results-filter-button ml-auto" (click)="isSearchFilterCollapsed = !isSearchFilterCollapsed" role="button"
        [attr.aria-expanded]="!isSearchFilterCollapsed" aria-controls="collapseBasic"
      >
        <span class="icon icon-filter"></span>
        <ng-container i18n>
          Filters
          <span *ngIf="numberOfFilters() > 0" class="badge badge-secondary">{{ numberOfFilters() }}</span>
        </ng-container>
      </div>
    </div>

    <div class="results-filter" [ngbCollapse]="isSearchFilterCollapsed">
      <my-search-filters [advancedSearch]="advancedSearch" (filtered)="onFiltered()"></my-search-filters>
    </div>
  </div>

  <div i18n *ngIf="pagination.totalItems === 0 && results.length === 0" class="no-results">
    No results found
  </div>

  <ng-container *ngFor="let result of results">
    <div *ngIf="isVideoChannel(result)" class="entry video-channel">
      <a [routerLink]="[ '/video-channels', result.nameWithHost ]">
        <img [src]="result.avatarUrl" alt="Avatar" />
      </a>

      <div class="video-channel-info">
        <a [routerLink]="[ '/video-channels', result.nameWithHost ]" class="video-channel-names">
          <div class="video-channel-display-name">{{ result.displayName }}</div>
          <div class="video-channel-name">{{ result.nameWithHost }}</div>
        </a>

        <div i18n class="video-channel-followers">{{ result.followersCount }} subscribers</div>
      </div>

      <my-subscribe-button [videoChannel]="result"></my-subscribe-button>
    </div>

    <div *ngIf="isVideo(result)" class="entry video">
      <my-video-miniature [video]="result" [user]="user" [displayAsRow]="true"></my-video-miniature>
    </div>
  </ng-container>

</div>