1 import { Component } from '@angular/core';
3 import { NotificationsService } from 'angular2-notifications';
5 import { Utils, VideoAbuseService, VideoAbuse} from '../../../shared';
8 selector: 'my-video-abuse-list',
9 templateUrl: './video-abuse-list.component.html',
10 styleUrls: [ './video-abuse-list.component.scss' ]
12 export class VideoAbuseListComponent {
13 videoAbusesSource = null;
40 title: 'Reporter pod host',
44 title: 'Reporter username',
51 valuePrepareFunction: this.buildVideoLink
54 title: 'Created Date',
55 valuePrepareFunction: Utils.dateToHuman
61 private notificationsService: NotificationsService,
62 private videoAbuseService: VideoAbuseService
64 this.videoAbusesSource = this.videoAbuseService.getDataSource();
67 buildVideoLink(videoId: string) {
68 // TODO: transform to routerLink
69 // https://github.com/akveo/ng2-smart-table/issues/57
70 return `<a href="/videos/${videoId}" title="Go to the video">${videoId}</a>`;