dnet40/modules/uoa-services-portal/trunk/portal-2/src/app/landingPages/tabTable.component.ts @ 45392
1 |
import {Component, Input} from '@angular/core'; |
---|---|
2 |
|
3 |
|
4 |
@Component({ |
5 |
selector: 'tabTable', |
6 |
template: ` |
7 |
<table class="uk-table uk-table-striped">
|
8 |
<thead>
|
9 |
<tr>
|
10 |
<th>Title</th>
|
11 |
<th>Trust</th>
|
12 |
</tr>
|
13 |
</thead>
|
14 |
<tbody>
|
15 |
<tr *ngFor="let item of info" class="{{item['class']}}">
|
16 |
<td *ngIf="item != undefined">
|
17 |
<span *ngIf="item['class'] == 'dataset'" class="glyphicon glyphicon-star" aria-hidden="true">
|
18 |
|
19 |
</span>
|
20 |
<a *ngIf="item['url'] != '' && item['name'] != ''" href="{{item['url']}}">
|
21 |
{{item['name']}}
|
22 |
</a>
|
23 |
<p *ngIf="item['url'] == '' && item['name'] != ''">{{item['name']}}</p>
|
24 |
<span *ngIf="item['date'] != ''">
|
25 |
({{item['date']}})
|
26 |
</span>
|
27 |
</td>
|
28 |
<td>
|
29 |
<div *ngIf="item['trust'] != ''" class="uk-progress uk-progress-warning">
|
30 |
<div class="uk-progress-bar" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "item['trust']">
|
31 |
{{item['trust']}}
|
32 |
</div>
|
33 |
<!--div class="uk-progress-bar" style="width: 40%;">40%</div-->
|
34 |
</div>
|
35 |
<div *ngIf="item['trust'] == ''">
|
36 |
<p>no trust found</p>
|
37 |
</div>
|
38 |
</td>
|
39 |
</tr>
|
40 |
</tbody>
|
41 |
</table>
|
42 |
`
|
43 |
|
44 |
})
|
45 |
|
46 |
export class TabTableComponent { |
47 |
@Input() info: { "name": string, "url": string, "date": string, "trust": string}[];//Map<string, string[]>; |
48 |
|
49 |
constructor () { |
50 |
console.info('tabTable constructor'); |
51 |
}
|
52 |
|
53 |
ngOnInit() { |
54 |
console.info('tabTable ngOnInit'); |
55 |
}
|
56 |
}
|
- « Previous
- 1
- …
- 7
- 8
- 9
- Next »