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

164 lines
7.8 KiB
HTML
Raw Normal View History

2013-07-25 23:33:04 +02:00
<ul class="dropdowns">
<li class="dropdown">
<a class="dropdown-toggle btn">
Published: <strong>{{filter.published.title}}</strong>
</a>
<ul class="dropdown-menu">
<li ng-repeat="filter in filters.published">
<a pfm-eat-click href="#" ng-click="updateFilter('published', filter)">{{filter.title}}</a>
</li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle btn">
Sort: <strong>{{filter.sort.title}}</strong>
</a>
<ul class="dropdown-menu">
<li ng-repeat="filter in filters.sort">
<a pfm-eat-click href="#" ng-click="updateFilter('sort', filter)">{{filter.title}}</a>
</li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle btn">
Type: <strong>{{titles.trackTypes}}</strong>
</a>
<ul class="dropdown-menu">
<li ng-repeat="type in taxonomies.trackTypes" ng-class="{selected: filter.trackTypes[type.id]}">
<a pfm-eat-click href="#" ng-click="toggleFilter('trackTypes', type.id); $event.stopPropagation();">{{type.title}}</a>
</li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle btn">
Genera: <strong>{{titles.genres}}</strong>
</a>
<ul class="dropdown-menu">
<li ng-repeat="genre in taxonomies.genres" ng-class="{selected: filter.genres[genre.id]}">
<a pfm-eat-click href="#" ng-click="toggleFilter('genres', genre.id); $event.stopPropagation();">{{genre.name}}</a>
</li>
</ul>
</li>
</ul>
<div class="two-pane-view" ng-class="{open: selectedTrack != null, closed: selectedTrack == null}">
<div class="list">
<ul class="account-tracks-listing strech-to-bottom">
<li ng-repeat="track in tracks" ng-class="{selected: track.id == selectedTrack.id, 'is-published': track.is_published}">
<a href="/account/content/tracks/{{track.id}}">
2013-07-27 02:15:07 +02:00
<img class="image" src="{{track.cover_url}}" />
2013-07-25 23:33:04 +02:00
<span class="title">{{track.title}}</span>
<span class="published">{{track.created_at | pfmdate:'MM/dd/yyyy'}}</span>
</a>
</li>
</ul>
</div>
<div class="editor">
<form novalidate ng-submit="updateTrack(edit)">
<ul class="toolbar">
<li>
2013-07-27 05:00:45 +02:00
<button type="submit" class="btn" ng-class="{disabled: (selectedTrack.is_published && !isDirty) || isSaving, 'btn-primary': !selectedTrack.is_published || isDirty}">
<span ng-show="selectedTrack.is_published">
Save Changes
<i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i>
</span>
<span ng-hide="selectedTrack.is_published">
Publish Track
<i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i>
</span>
2013-07-25 23:33:04 +02:00
</button>
</li>
2013-07-27 05:00:45 +02:00
<li class="delete"><a ng-class="{disabled: isSaving}" class="btn btn-danger" href="#" ng-click="deleteTrack(selectedTrack)" pfm-eat-click>Delete Track</a></li>
2013-07-25 23:33:04 +02:00
</ul>
<div class="strech-to-bottom">
<div class="form-row" ng-class="{'has-error': errors.title != null}">
<label for="title" class="strong">Title:</label>
2013-07-27 05:00:45 +02:00
<input ng-disabled="isSaving" ng-change="touchModel()" placeholder="Track Title" type="text" id="title" ng-model="edit.title" />
2013-07-25 23:33:04 +02:00
<div class="error">{{errors.title}}</div>
</div>
<div class="row-fluid">
<div class="span6 form-row" ng-class="{'has-error': errors.description != null}">
<label for="description" class="strong">Description:</label>
2013-07-27 05:00:45 +02:00
<textarea ng-disabled="isSaving" ng-change="touchModel()" placeholder="Description (optional)" id="description" ng-model="edit.description"></textarea>
2013-07-25 23:33:04 +02:00
<div class="error">{{errors.description}}</div>
</div>
<div class="span6 form-row" ng-class="{'has-error': errors.lyrics != null}">
2013-07-27 05:00:45 +02:00
<label for="is_vocal" class="strong"><input ng-disabled="isSaving" ng-change="touchModel(); updateIsVocal()" id="is_vocal" type="checkbox" ng-model="edit.is_vocal" /> Is Vocal</label>
<textarea ng-disabled="isSaving" ng-change="touchModel()" ng-show="edit.is_vocal" ng-animate="'fade'" placeholder="Lyrics (required)" id="lyrics" ng-model="edit.lyrics"></textarea>
2013-07-25 23:33:04 +02:00
<div class="error">{{errors.lyrics}}</div>
</div>
</div>
<div class="row-fluid">
<div class="form-row span6" ng-class="{'has-error': errors.track_type_id != null}">
<label for="track_type" class="strong">This track is...</label>
2013-07-27 05:00:45 +02:00
<select ng-disabled="isSaving" id="track_type" ng-change="touchModel()" ng-model="edit.track_type_id" ng-options="type.id as type.editor_title for type in taxonomies.trackTypes">
2013-07-25 23:33:04 +02:00
<option value="">Please select a type...</option>
</select>
<div class="error">{{errors.track_type_id}}</div>
</div>
<div class="form-row span6" ng-class="{'has-error': errors.genre_id != null}">
<label for="genre" class="strong">Genre:</label>
2013-07-27 05:00:45 +02:00
<select ng-disabled="isSaving" id="genre" ng-change="touchModel()" ng-model="edit.genre_id" ng-options="genre.id as genre.name for genre in taxonomies.genres">
2013-07-25 23:33:04 +02:00
<option value="">Please select a genre...</option>
</select>
<div class="error">{{errors.genre_id}}</div>
</div>
</div>
<div class="row-fluid">
<div class="form-row span6" ng-class="{'has-error': errors.cover != null}">
<label class="strong">Track Cover: </label>
<div class="cover-upload">
2013-07-27 02:15:07 +02:00
<div class="preview" ng-class="{canOpen: isCoverLoaded}" ng-click="previewCover()"><img id="coverPreview" ng-show="isCoverLoaded" /></div>
2013-07-25 23:33:04 +02:00
<p>
Track cover must be a PNG that is at least 350x350. <br />
<input type="file" id="coverImage" onchange="angular.element(this).scope().setCoverImage(this)" />
</p>
2013-07-27 02:15:07 +02:00
<div class="btn-group">
2013-07-27 05:00:45 +02:00
<a href="#" pfm-popup="image-selector" class="btn btn-small"><i class="icon-picture"></i> Gallery</a>
2013-07-27 02:15:07 +02:00
<a href="#" pfm-eat-click ng-click="uploadTrackCover()" class="btn btn-info btn-small"><i class="icon-upload"></i> Upload</a>
2013-07-27 05:00:45 +02:00
<a href="#" pfm-eat-click ng-click="clearTrackCover()" class="btn btn-danger btn-small" ng-show="edit.cover || edit.cover_id"><i class="icon-remove"></i></a>
</div>
<div id="image-selector" class="pfm-popup image-selector" ng-controller="account-image-select">
<ul>
<li ng-repeat="image in images" ng-click="selectGalleryImage(image)">
<img src="{{image.url}}" />
</li>
</ul>
2013-07-27 02:15:07 +02:00
</div>
2013-07-25 23:33:04 +02:00
<div class="error">{{errors.cover}}</div>
</div>
</div>
<div class="form-row span6" ng-class="{'has-error': errors.released_at != null}">
<label for="released_at" class="strong">Release Date:</label>
2013-07-27 05:00:45 +02:00
<input ng-disabled="isSaving" type="text" id="released_at" ui-date ng-model="edit.released_at" ng-change="touchModel()" ui-date-format="yy-mm-dd" />
2013-07-25 23:33:04 +02:00
<div class="error">{{errors.released_at}}</div>
</div>
</div>
<div class="row-fluid">
<div class="span6 form-row">
2013-07-27 05:00:45 +02:00
<label for="is_explicit"><input ng-disabled="isSaving" ng-change="touchModel()" id="is_explicit" type="checkbox" ng-model="edit.is_explicit" /> Contains Explicit Content</label>
2013-07-25 23:33:04 +02:00
</div>
<div class="span6 form-row">
2013-07-27 05:00:45 +02:00
<label for="is_downloadable"><input ng-disabled="isSaving" ng-change="touchModel()" id="is_downloadable" type="checkbox" ng-model="edit.is_downloadable" /> Is Downloadable</label>
2013-07-25 23:33:04 +02:00
</div>
</div>
<div class="form-row">
<label class="strong">Choose a License:</label>
<ul class="license-grid">
<li ng-repeat="license in taxonomies.licenses" ng-class="{selected: edit.license_id == license.id}">
<div ng-click="edit.license_id = license.id; touchModel()">
<strong>{{license.title}}</strong>
<p>{{license.description}}</p>
2013-07-27 05:00:45 +02:00
<a href="#" pfm-eat-click class="btn" ng-class="{'btn-primary': edit.license_id == license.id, 'disabled': isSaving}">
2013-07-25 23:33:04 +02:00
<span ng-hide="edit.license_id == license.id">Select</span>
<span ng-show="edit.license_id == license.id">Selected</span>
</a>
</div>
</li>
</ul>
</div>
</div>
</form>
</div>
</div>