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

49 lines
2.3 KiB
HTML
Raw Normal View History

2013-07-28 10:35:31 +02:00
<form novalidate ng-submit="saveAlbum()">
2013-07-28 09:09:10 +02:00
<ul class="toolbar">
<li>
2013-07-28 19:45:21 +02:00
<button type="submit" class="btn" ng-class="{disabled: (!isDirty && !isNew) || isSaving, 'btn-primary': isDirty || isNew}">
<span ng-show="isNew">Create Album</span>
<span ng-hide="isNew">Save Changes</span>
2013-07-28 09:09:10 +02:00
<i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i>
</button>
</li>
2013-07-28 10:35:31 +02:00
<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>
2013-07-28 09:09:10 +02:00
</ul>
2013-07-28 19:45:21 +02:00
<div class="stretch-to-bottom">
2013-07-28 09:09:10 +02:00
<div class="form-row" ng-class="{'has-error': errors.title != null}">
<label for="title" class="strong">Title:</label>
<input ng-disabled="isSaving" ng-change="touchModel()" placeholder="Album Title" type="text" id="title" ng-model="album.title" />
<div class="error">{{errors.title}}</div>
</div>
2013-07-28 10:35:31 +02:00
<div class="form-row">
2013-07-28 09:09:10 +02:00
<label for="description" class="strong">Description:</label>
<textarea ng-disabled="isSaving" ng-change="touchModel()" placeholder="Description (optional)" id="description" ng-model="album.description"></textarea>
<div class="error">{{errors.description}}</div>
</div>
<div class="form-row" ng-class="{'has-error': errors.cover != null}">
<label class="strong">Album Cover: </label>
2013-07-28 19:45:21 +02:00
<pfm-image-upload set-image="setCover" image="album.cover" />
</div>
<div class="form-row track-selector">
<a pfm-popup="track-selector,right" href="#" class="btn btn-small pull-right btn-info">Add Tracks</a>
<label class="strong">Album Tracks</label>
<div id="track-selector" class="pfm-popup">
<ul>
<li ng-repeat="track in data.tracksDb" ng-class="{selected: trackIds[track.id]}">
<a pfm-eat-click href="#" ng-click="toggleTrack(track); $event.stopPropagation();">{{track.title}}</a>
</li>
</ul>
</div>
<ul class="album-track-listing" ui-sortable="{handle: '.handle', axis: 'y', forcePlaceholderSizeType: true, update: sortTracks}" ng-model="tracks">
<li ng-repeat="track in tracks">
<div>
<span class="btn btn-small pull-left handle"><i class="icon-sort"></i></span>
<a href="#" class="btn btn-small pull-right" ng-click="toggleTrack(track)" pfm-eat-click><i class="icon-remove"></i></a>
<span>{{track.title}}</span>
</div>
</li>
</ul>
2013-07-28 09:09:10 +02:00
</div>
</div>
</form>