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'
11 export class VideoAbuseListComponent {
12 videoAbusesSource = null;
39 title: 'Reporter pod host',
43 title: 'Reporter username',
50 valuePrepareFunction: this.buildVideoLink
53 title: 'Created Date',
54 valuePrepareFunction: Utils.dateToHuman
60 private notificationsService: NotificationsService,
61 private videoAbuseService: VideoAbuseService
63 this.videoAbusesSource = this.videoAbuseService.getDataSource();
66 buildVideoLink(videoId: string) {
67 // TODO: transform to routerLink
68 // https://github.com/akveo/ng2-smart-table/issues/57
69 return `<a href="/videos/${videoId}" title="Go to the video">${videoId}</a>`;