Extract table
Problem on sortable
This commit is contained in:
64
dashboard/src/app/song-table/song-table.component.html
Normal file
64
dashboard/src/app/song-table/song-table.component.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<table class="table table-striped" (window:scroll)="onScroll($event)">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Album</th>
|
||||
<th>Year</th>
|
||||
<th>Artist</th>
|
||||
<th>Album Artist</th>
|
||||
<th>Play Count</th>
|
||||
<th>Genre</th>
|
||||
<th>Bit Rate</th>
|
||||
<th>Rating</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let song of songs | sortBy : 'Year':'Album':'Track Number'">
|
||||
<td>{{song['Track Number'] ? (("0" + song['Track Number']).slice(-2)) : "--"}}</td>
|
||||
<td>{{song.Name}}</td>
|
||||
<td>
|
||||
<a [routerLink]="['/album', song.Album]">{{song.Album}}</a>
|
||||
</td>
|
||||
<td>{{song.Year}}</td>
|
||||
<td>
|
||||
<a [routerLink]="['/artist', song.Artist]">{{song.Artist}}</a>
|
||||
</td>
|
||||
<td>{{song['Album Artist'] ? song['Album Artist'] : "-" }}</td>
|
||||
<td>{{song['Play Count']}}</td>
|
||||
<td>
|
||||
<a [routerLink]="['/genre', song.Genre]">{{song.Genre}}</a>
|
||||
</td>
|
||||
<td [title]="song['Bit Rate']">
|
||||
<span [class]="'signal signal-' + roundBitRate(song['Bit Rate'])"></span>
|
||||
</td>
|
||||
<td *ngIf="!song['Rating Computed']" [title]="'Rating: ' + song.Rating" class="star">
|
||||
<span *ngIf="song.Rating >= 20" class="glyphicon glyphicon-star"></span>
|
||||
<span *ngIf="song.Rating >= 40" class="glyphicon glyphicon-star"></span>
|
||||
<span *ngIf="song.Rating >= 60" class="glyphicon glyphicon-star"></span>
|
||||
<span *ngIf="song.Rating >= 80" class="glyphicon glyphicon-star"></span>
|
||||
<span *ngIf="song.Rating >= 100" class="glyphicon glyphicon-star"></span>
|
||||
</td>
|
||||
<td *ngIf="song['Rating Computed']" [title]="'Computed Rating: ' + song.Rating" class="star">
|
||||
<span *ngIf="song.Rating >= 20" class="glyphicon glyphicon-star-empty"></span>
|
||||
<span *ngIf="song.Rating >= 40" class="glyphicon glyphicon-star-empty"></span>
|
||||
<span *ngIf="song.Rating >= 60" class="glyphicon glyphicon-star-empty"></span>
|
||||
<span *ngIf="song.Rating >= 80" class="glyphicon glyphicon-star-empty"></span>
|
||||
<span *ngIf="song.Rating >= 100" class="glyphicon glyphicon-star-empty"></span>
|
||||
</td>
|
||||
<td *ngIf="song.Loved" class="loved">
|
||||
<span class="glyphicon glyphicon-heart heart"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- Go to Top Button-->
|
||||
<button type="button" class="btn btn-warning btn-top" [class.btn-top-is-visible]="bottomReached" aria-label="Top" (click)="scrollTop()"
|
||||
title="Go back to Top!">
|
||||
<span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary btn-top btn-sort" [class.btn-top-is-visible]="sortable" aria-label="Top" (click)="sort()"
|
||||
title="Sort by Album & Track Number">
|
||||
<span class="glyphicon glyphicon-sort-by-attributes" aria-hidden="true"></span>
|
||||
</button>
|
||||
Reference in New Issue
Block a user