PeerTube/client/src/app/search/search.component.html

59 lines
2.3 KiB
HTML
Raw Normal View History

<div myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" class="search-result">
2018-07-24 09:00:22 -05:00
<div class="results-header">
2018-07-20 11:31:49 -05:00
<div class="first-line">
2018-07-24 09:00:22 -05:00
<div class="results-counter" *ngIf="pagination.totalItems">
<span i18n>{{ pagination.totalItems | myNumberFormatter }} {pagination.totalItems, plural, =1 {result} other {results}}</span>
2018-07-24 09:00:22 -05:00
<span *ngIf="currentSearch" i18n>
for <span class="search-value">{{ currentSearch }}</span>
</span>
2018-07-20 11:31:49 -05:00
</div>
<div
2018-09-29 06:42:17 -05:00
class="results-filter-button ml-auto" (click)="isSearchFilterCollapsed = !isSearchFilterCollapsed" role="button"
2018-07-23 13:13:30 -05:00
[attr.aria-expanded]="!isSearchFilterCollapsed" aria-controls="collapseBasic"
2018-07-20 11:31:49 -05:00
>
<span class="icon icon-filter"></span>
<ng-container i18n>
Filters
<span *ngIf="numberOfFilters() > 0" class="badge badge-secondary">{{ numberOfFilters() }}</span>
</ng-container>
2018-07-20 11:31:49 -05:00
</div>
</div>
2019-06-12 05:40:24 -05:00
<div class="results-filter collapse-transition" [ngbCollapse]="isSearchFilterCollapsed">
2018-07-23 13:13:30 -05:00
<my-search-filters [advancedSearch]="advancedSearch" (filtered)="onFiltered()"></my-search-filters>
2018-07-20 11:31:49 -05:00
</div>
</div>
2018-08-30 07:58:00 -05:00
<div i18n *ngIf="pagination.totalItems === 0 && results.length === 0" class="no-results">
2018-07-20 11:31:49 -05:00
No results found
2018-07-19 09:17:54 -05:00
</div>
2018-08-28 09:02:02 -05:00
<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" />
2018-08-23 10:58:39 -05:00
</a>
2018-08-28 09:02:02 -05:00
<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>
2018-08-23 10:58:39 -05:00
2018-08-28 09:02:02 -05:00
<div i18n class="video-channel-followers">{{ result.followersCount }} subscribers</div>
</div>
2018-08-23 10:58:39 -05:00
<my-subscribe-button [videoChannels]="[result]"></my-subscribe-button>
2018-08-28 09:02:02 -05:00
</div>
2018-07-19 09:17:54 -05:00
2018-08-28 09:02:02 -05:00
<div *ngIf="isVideo(result)" class="entry video">
2019-04-05 03:52:27 -05:00
<my-video-miniature
[video]="result" [user]="user" [displayAsRow]="true"
(videoBlacklisted)="removeVideoFromArray(result)" (videoRemoved)="removeVideoFromArray(result)"
></my-video-miniature>
2018-07-19 09:17:54 -05:00
</div>
2018-08-28 09:02:02 -05:00
</ng-container>
2018-07-19 09:17:54 -05:00
</div>