Pony.fm/public/templates/account/album.html

52 lines
2.8 KiB
HTML
Raw Normal View History

2013-07-28 10:35:31 +02:00
<form novalidate ng-submit="saveAlbum()">
2015-10-25 03:35:37 +01:00
<ul class="toolbar">
<li>
<button type="submit" class="btn btn-default" ng-class="{disabled: (!isDirty && !isNew) || isSaving, 'btn-primary': isDirty || isNew}">
2015-10-25 03:35:37 +01:00
<span ng-show="isNew">Create Album</span>
<span ng-hide="isNew">Save Changes</span>
2016-05-20 17:46:44 +02:00
<i ng-show="isSaving" class="fa fa-cog fa-spin fa-lg"></i>
2015-10-25 03:35:37 +01:00
</button>
</li>
<li class="delete" ng-show="!isNew"><a ng-class="{disabled: isSaving}" class="btn btn-danger" href="#" ng-click="deleteAlbum()" pfm-eat-click>Delete Album</a></li>
</ul>
<div class="stretch-to-bottom">
2016-08-08 18:11:20 +02:00
<md-input-container>
<label>Title</label>
<input ng-disabled="isSaving" ng-change="touchModel()" type="text" ng-model="album.title">
</md-input-container>
<md-input-container>
<label>Description</label>
<textarea ng-disabled="isSaving" ng-change="touchModel()" ng-model="album.description"></textarea>
</md-input-container>
<md-input-container ng-show="isAdmin">
<label>User</label>
<input ng-disabled="isSaving" ng-change="touchModel()" type="text" ng-model="album.username">
</md-input-container>
2015-10-25 03:35:37 +01:00
<div class="form-row" ng-class="{'has-error': errors.cover != null}">
<label class="strong">Album Cover: </label>
<pfm-image-upload set-image="setCover" image="album.cover" user-id="album.user_id"></pfm-image-upload>
2015-10-25 03:35:37 +01:00
</div>
<div class="form-row track-selector">
<a pfm-popup="track-selector,right" pfm-popup-close-on-click href="#" class="btn btn-sm pull-right btn-info">Add Tracks</a>
2015-10-25 03:35:37 +01:00
<label class="strong">Album Tracks</label>
<div id="track-selector" class="pfm-popup">
<ul>
<li ng-repeat="track in data.tracksDb track by track.id" ng-class="{selected: trackIds[track.id]}">
<a pfm-eat-click href="#" ng-click="toggleTrack(track); $event.stopPropagation();">{{::track.title}}</a>
2015-10-25 03:35:37 +01:00
</li>
</ul>
</div>
2013-07-28 19:45:21 +02:00
2016-08-08 18:11:20 +02:00
<ul class="album-track-listing" as-sortable ng-model="tracks">
<li ng-repeat="track in tracks track by track.id" as-sortable-item>
2015-10-25 03:35:37 +01:00
<div>
2016-08-08 18:11:20 +02:00
<span class="btn btn-sm pull-left handle" as-sortable-item-handle><i class="material-icons">swap_vert</i></span>
2016-07-19 01:27:45 +02:00
<a href="#" class="btn btn-sm pull-right btn-danger" ng-click="toggleTrack(track)" pfm-eat-click><i class="material-icons">delete</i></a>
<span>{{::track.title}}</span>
2015-10-25 03:35:37 +01:00
</div>
</li>
</ul>
</div>
</div>
</form>