Added genres to track pages

This commit is contained in:
Peter Deltchev 2017-09-22 05:10:26 -07:00
parent 8eaa22733b
commit df917890e3
2 changed files with 4 additions and 1 deletions

View file

@ -555,7 +555,8 @@ class Track extends Model implements Searchable, Commentable, Favouritable
[
'id' => (int) $track->genre->id,
'slug' => $track->genre->slug,
'name' => $track->genre->name
'name' => $track->genre->name,
'url' => $track->genre->url,
] : null,
'track_type_id' => $track->track_type_id,
'covers' => [

View file

@ -17,6 +17,8 @@
</div>
<ul class="stats">
<li ng-if="track.genre">Genre: <strong><a href="{{::track.genre.url}}">{{::track.genre.name}}</a></strong></li>
<li ng-if="!track.genre">Genre: <strong>Unknown</strong></li>
<li>Published: <strong>{{formatPublishedDate(track)}}</strong></li>
<li>Views: <strong>{{::track.stats.views}}</strong></li>
<li>Plays: <strong>{{::track.stats.plays}}</strong></li>