<div [ngClass]="{ 'margin-content': marginContent }">
<div class="videos-header">
<div *ngIf="titlePage" class="title-page title-page-single">
- {{ titlePage }}
+ <div placement="bottom" [ngbTooltip]="titleTooltip" container="body">
+ {{ titlePage }}
+ </div>
</div>
+
<my-feed [syndicationItems]="syndicationItems"></my-feed>
<div class="moderation-block" *ngIf="displayModerationBlock">
import { VideoService } from '../../shared/video/video.service'
import { I18n } from '@ngx-translate/i18n-polyfill'
import { ScreenService } from '@app/shared/misc/screen.service'
-import { Notifier } from '@app/core'
+import { Notifier, ServerService } from '@app/core'
@Component({
selector: 'my-videos-trending',
titlePage: string
currentRoute = '/videos/trending'
defaultSort: VideoSortField = '-trending'
+ trendingDays: number
constructor (
protected router: Router,
protected authService: AuthService,
protected location: Location,
protected screenService: ScreenService,
+ private serverService: ServerService,
protected i18n: I18n,
private videoService: VideoService
) {
super()
- this.titlePage = i18n('Trending')
+ this.trendingDays = this.serverService.getConfig().trending.videos.intervalDays
+
+ this.titlePage = this.i18n('Trending for the last ')
+ this.trendingDays === 1 ? this.titlePage += '24 hours' : this.titlePage += this.trendingDays + ' days'
+
+ this.titleTooltip = this.i18n('trending videos are those totalizing the greatest number of views during the last ')
+ this.trendingDays === 1 ? this.titleTooltip += '24 hours.' : this.titleTooltip += this.trendingDays + ' days.'
}
ngOnInit () {