Pony.fm/public/templates/tracks/frame.html
2016-08-04 20:32:01 +01:00

79 lines
3.8 KiB
HTML

<div class="resource-details track-details">
<ul class="dropdowns">
<li class="dropdown">
<a href="#" class="btn btn-primary dropdown-toggle" bs-dropdown ng-disabled="track.is_downloadable == 0" auto-close="outsideClick">
Downloads
</a>
<ul class="dropdown-menu" ng-show="track.is_downloadable == 1">
<li ng-repeat="format in ::track.formats" ng-hide="isInProgress">
<a target="_blank" ng-if="::!format.isCacheable" ng-href="{{::format.url}}">
<span>{{::format.name}}</span>
<small>({{::format.size}})</small>
</a>
<a ng-if="format.isCacheable" ng-click="getCachedTrack(track.id, format.name);" href="">
<span>{{::format.name}}</span>
<small>({{::format.size}})</small>
</a>
</li>
<li ng-show="isInProgress" class="cache-loading"><img src="/images/loading.gif" /></li>
<li ng-show="isInProgress" class="cache-loading"><small>We&#39;re getting your download ready! This&#39;ll take a few seconds.</small></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="btn btn-default dropdown-toggle" bs-dropdown ng-show="::auth.isLogged">Add to Playlist</a>
<ul class="dropdown-menu">
<li ng-repeat="playlist in playlists track by playlist.id">
<a ng-class="{disabled: playlist.message, 'btn-success': playlist.message}"
ng-href="{{::playlist.url}}"
pfm-eat-click
ng-click="addToPlaylist(playlist); $event.stopPropagation()"
>
<span ng-hide="playlist.message">{{::playlist.title}}</span>
<span ng-show="playlist.message">{{playlist.message}}</span>
</a>
</li>
<li><a href="#" class="add-btn btn-default" pfm-eat-click ng-click="addToNewPlaylist()">Add to New Playlist</a></li>
</ul>
</li>
<li><a href="#" class="btn btn-default" pfm-eat-click ng-click="share()">Share or Embed</a></li>
<li><pfm-favourite-button resource="::track" type="track"></pfm-favourite-button></li>
<li ng-show="::track.permissions.edit"><a class="btn btn-default" ng-href="/tracks/{{::track.id}}-{{::track.slug}}/edit">Edit</a></li>
<md-button class="md-icon-button" aria-label="Download">
<md-tooltip md-direction="bottom" md-delay="200">Download</md-tooltip>
<md-icon>file_download</md-icon>
</md-button>
<md-button class="md-icon-button" aria-label="Favourite">
<md-tooltip md-direction="bottom" md-delay="200">Favourite</md-tooltip>
<md-icon>favorite_border</md-icon>
</md-button>
<md-button class="md-icon-button" aria-label="Add to playlist">
<md-tooltip md-direction="bottom" md-delay="200">Add to playlist</md-tooltip>
<md-icon>playlist_add</md-icon>
</md-button>
<md-button class="md-icon-button" aria-label="Share or embed">
<md-tooltip md-direction="bottom" md-delay="200">Share or embed</md-tooltip>
<md-icon>share</md-icon>
</md-button>
</ul>
<header>
<pfm-track-player class="hidden-xs" track="::track"></pfm-track-player>
<h1>{{track.title}}</h1>
<h2>
<span ng-if="track.album">
from: <a ng-href="{{::track.album.url}}">{{::track.album.title}}</a>
</span>
by: <a ng-href="{{::track.user.url}}">{{::track.user.name}}</a>
</h2>
</header>
<pfm-track-player class="visible-xs-block" track="::track" size="normal"></pfm-track-player>
<div ui-view></div>
</div>