2015-11-24 06:19:23 +01:00
|
|
|
<h1>Genre Editor</h1>
|
|
|
|
|
2016-01-06 13:50:44 +01:00
|
|
|
<div class="stretch-to-bottom">
|
|
|
|
|
|
|
|
<section class="genre-creator">
|
|
|
|
<h2>Add genre</h2>
|
|
|
|
|
|
|
|
<p>Enter a genre name and press enter to create it!</p>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="x-large"
|
|
|
|
ng-class="{'x-saving': isCreating, 'x-error': hasCreationError}"
|
|
|
|
ng-model="genreToCreate"
|
|
|
|
pfm-on-enter="createGenre(genreToCreate)"
|
|
|
|
/>
|
|
|
|
|
2016-05-20 01:08:57 +02:00
|
|
|
<div class="alert alert-danger" ng-show="hasCreationError">
|
2016-01-06 13:50:44 +01:00
|
|
|
{{ createGenreError }}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="genre-list">
|
|
|
|
<h2>Rename & delete genres</h2>
|
|
|
|
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<th>Genre</th>
|
|
|
|
<th class="-status"></th>
|
|
|
|
<th># of tracks (including deleted)</th>
|
|
|
|
<th class="-actions">Actions</th>
|
|
|
|
</thead>
|
|
|
|
<tr ng-repeat="genre in genres track by genre.id">
|
|
|
|
<td>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="x-large"
|
|
|
|
ng-class="{'x-saving': genre.isSaving, 'x-error': genre.isError}"
|
|
|
|
ng-model="genre.name"
|
|
|
|
pfm-on-enter="renameGenre(genre)"
|
|
|
|
/>
|
2016-05-20 01:08:57 +02:00
|
|
|
<div class="alert alert-danger" ng-show="genre.isError">
|
2016-01-06 13:50:44 +01:00
|
|
|
{{ genre.errorMessage }}
|
|
|
|
</div>
|
|
|
|
</td>
|
2016-05-20 17:46:44 +02:00
|
|
|
<td><i ng-show="genre.isSaving" class="fa fa-cog fa-spin fa-lg"></i></td>
|
2016-01-06 13:50:44 +01:00
|
|
|
<td><a ng-href="{{ genre.url }}">{{ genre.track_count }}</a></td>
|
|
|
|
<td class="-actions">
|
|
|
|
<button class="btn btn-warning" ng-hide="mergeInProgress" ng-click="startMerge(genre)">Merge genres in…</button>
|
|
|
|
<button class="btn btn-danger" ng-show="mergeInProgress && destinationGenre.id != genre.id" ng-click="finishMerge(genre)">Merge into <em>{{ destinationGenre.name }}</em>…</button>
|
|
|
|
<button class="btn btn-warning" ng-show="mergeInProgress && destinationGenre.id == genre.id" ng-click="cancelMerge()">Cancel merge</button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</section>
|
|
|
|
</div>
|