Implement templates for frontend

This commit is contained in:
Kelvin Zhang 2015-10-29 14:37:25 +00:00
parent 58e49cc2f5
commit 7686533d64
2 changed files with 12 additions and 2 deletions

View file

@ -5,7 +5,12 @@
Downloads
</a>
<ul class="dropdown-menu" ng-show="album.is_downloadable == 1">
<li bindonce ng-repeat="format in album.formats"><a target="_blank" bo-href="format.url"><span bo-text="format.name"></span> <small bo-text="'(' + format.size + ')'"></small></a></li>
<li bindonce ng-repeat="format in album.formats" ng-hide="isEncoding">
<a target="_blank" ng-if="!format.isCacheable" bo-href="format.url"><span bo-text="format.name"></span> <small bo-text="'(' + format.size + ')'"></small></a>
<a ng-if="format.isCacheable" ng-click="getCachedAlbum(album.id, format.name);" href=""><span bo-text="format.name"></span> <small bo-text="'(' + format.size + ')'"></small></a>
</li>
<li ng-show="isEncoding" class="cache-loading"><img src="/images/loading.gif" /></li>
<li ng-show="isEncoding" class="cache-loading"><small>We&#39;re getting your download ready! This may take up to a few minutes .</small></li>
</ul>
</li>
<li><a href="#" class="btn" pfm-eat-click ng-click="share()">Share</a></li>

View file

@ -5,7 +5,12 @@
Downloads
</a>
<ul class="dropdown-menu" ng-show="track.is_downloadable == 1">
<li bindonce ng-repeat="format in track.formats"><a target="_blank" bo-href="format.url"><span bo-text="format.name"></span> <small bo-text="'(' + format.size + ')'"></small></a></li>
<li bindonce ng-repeat="format in track.formats" ng-hide="isEncoding">
<a target="_blank" ng-if="!format.isCacheable" bo-href="format.url"><span bo-text="format.name"></span> <small bo-text="'(' + format.size + ')'"></small></a>
<a ng-if="format.isCacheable" ng-click="getCachedTrack(track.id, format.name);" href=""><span bo-text="format.name"></span> <small bo-text="'(' + format.size + ')'"></small></a>
</li>
<li ng-show="isEncoding" class="cache-loading"><img src="/images/loading.gif" /></li>
<li ng-show="isEncoding" class="cache-loading"><small>We&#39;re getting your download ready! This'll take a few seconds.</small></li>
</ul>
</li>
<li class="dropdown">