diff --git a/public/templates/favourites/_layout.html b/public/templates/favourites/_layout.html
deleted file mode 100644
index 8c21650e..00000000
--- a/public/templates/favourites/_layout.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/public/templates/favourites/albums.html b/public/templates/favourites/albums.html
deleted file mode 100644
index fb7e2ed1..00000000
--- a/public/templates/favourites/albums.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/public/templates/favourites/playlists.html b/public/templates/favourites/playlists.html
deleted file mode 100644
index 76615fb0..00000000
--- a/public/templates/favourites/playlists.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/public/templates/favourites/tracks.html b/public/templates/favourites/tracks.html
deleted file mode 100644
index 6f12f17a..00000000
--- a/public/templates/favourites/tracks.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/resources/assets/scripts/app/app.coffee b/resources/assets/scripts/app/app.coffee
index 4da6bcec..f223b598 100644
--- a/resources/assets/scripts/app/app.coffee
+++ b/resources/assets/scripts/app/app.coffee
@@ -141,33 +141,6 @@ ponyfm.config [
url: '/errors/invalid'
templateUrl: '/templates/errors/400.html'
- # Upload
-
- state.state 'uploader',
- url: '/account/uploader'
- templateUrl: '/templates/uploader/index.html'
- controller: 'uploader'
-
- state.state 'favourites',
- url: '/account/favourites'
- abstract: true
- templateUrl: '/templates/favourites/_layout.html'
-
- state.state 'favourites.tracks',
- url: '/tracks'
- templateUrl: '/templates/favourites/tracks.html'
- controller: 'favourites-tracks'
-
- state.state 'favourites.playlists',
- url: '/playlists'
- templateUrl: '/templates/favourites/playlists.html'
- controller: 'favourites-playlists'
-
- state.state 'favourites.albums',
- url: '/albums'
- templateUrl: '/templates/favourites/albums.html'
- controller: 'favourites-albums'
-
# Tracks
state.state 'content',
@@ -334,6 +307,13 @@ ponyfm.config [
abstract: true
templateUrl: '/templates/account/_layout.html'
+ # Upload
+
+ state.state 'content.artist.account.uploader',
+ url: '/uploader'
+ templateUrl: '/templates/uploader/index.html'
+ controller: 'uploader'
+
state.state 'content.artist.account.settings',
url: ''
templateUrl: '/templates/account/settings.html'
diff --git a/resources/assets/scripts/app/controllers/account-albums-edit.coffee b/resources/assets/scripts/app/controllers/account-albums-edit.coffee
index 2cc5bf1d..b8dd052b 100644
--- a/resources/assets/scripts/app/controllers/account-albums-edit.coffee
+++ b/resources/assets/scripts/app/controllers/account-albums-edit.coffee
@@ -89,7 +89,7 @@ module.exports = angular.module('ponyfm').controller "account-albums-edit", [
if $scope.isNew
$scope.isDirty = false
$scope.$emit 'album-created'
- $state.transitionTo 'account.albums.edit', {album_id: response.id}
+ $state.go '^.edit', {album_id: response.id}
else
$scope.isDirty = false
$scope.data.selectedAlbum.title = $scope.album.title
@@ -120,7 +120,7 @@ module.exports = angular.module('ponyfm').controller "account-albums-edit", [
$.post('/api/web/albums/delete/' + $scope.album.id)
.then -> $scope.$apply ->
$scope.$emit 'album-deleted'
- $state.transitionTo 'account.albums'
+ $state.go '^'
$scope.setCover = (image, type) ->
delete $scope.album.cover_id
diff --git a/resources/assets/scripts/app/controllers/account-tracks.coffee b/resources/assets/scripts/app/controllers/account-tracks.coffee
index 520abd48..1d0012d9 100644
--- a/resources/assets/scripts/app/controllers/account-tracks.coffee
+++ b/resources/assets/scripts/app/controllers/account-tracks.coffee
@@ -55,4 +55,8 @@ module.exports = angular.module('ponyfm').controller "account-tracks", [
$state.transitionTo 'account.tracks'
tracks.clearCache()
tracks.refresh(null, true).done setTracks
+
+ $scope.$on 'track-updated', () ->
+ tracks.clearCache()
+ tracks.refresh(null, true).done setTracks
]
diff --git a/resources/assets/scripts/app/controllers/favourites-albums.coffee b/resources/assets/scripts/app/controllers/favourites-albums.coffee
deleted file mode 100644
index 3403b5da..00000000
--- a/resources/assets/scripts/app/controllers/favourites-albums.coffee
+++ /dev/null
@@ -1,28 +0,0 @@
-# Pony.fm - A community for pony fan music.
-# Copyright (C) 2015 Peter Deltchev
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see
.
-
-window.pfm.preloaders['favourites-albums'] = [
- 'favourites'
- (favourites) ->
- favourites.fetchAlbums(true)
-]
-
-module.exports = angular.module('ponyfm').controller "favourites-albums", [
- '$scope', 'favourites'
- ($scope, favourites) ->
- favourites.fetchAlbums().done (res) ->
- $scope.albums = res.albums
-]
diff --git a/resources/assets/scripts/app/controllers/favourites-playlists.coffee b/resources/assets/scripts/app/controllers/favourites-playlists.coffee
deleted file mode 100644
index b74de9bc..00000000
--- a/resources/assets/scripts/app/controllers/favourites-playlists.coffee
+++ /dev/null
@@ -1,28 +0,0 @@
-# Pony.fm - A community for pony fan music.
-# Copyright (C) 2015 Peter Deltchev
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see
.
-
-window.pfm.preloaders['favourites-playlists'] = [
- 'favourites'
- (favourites) ->
- favourites.fetchPlaylists(true)
-]
-
-module.exports = angular.module('ponyfm').controller "favourites-playlists", [
- '$scope', 'favourites'
- ($scope, favourites) ->
- favourites.fetchPlaylists().done (res) ->
- $scope.playlists = res.playlists
-]
diff --git a/resources/assets/scripts/app/controllers/favourites-tracks.coffee b/resources/assets/scripts/app/controllers/favourites-tracks.coffee
deleted file mode 100644
index 7c229ed2..00000000
--- a/resources/assets/scripts/app/controllers/favourites-tracks.coffee
+++ /dev/null
@@ -1,28 +0,0 @@
-# Pony.fm - A community for pony fan music.
-# Copyright (C) 2015 Peter Deltchev
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see
.
-
-window.pfm.preloaders['favourites-tracks'] = [
- 'favourites'
- (favourites) ->
- favourites.fetchTracks(true)
-]
-
-module.exports = angular.module('ponyfm').controller "favourites-tracks", [
- '$scope', 'favourites'
- ($scope, favourites) ->
- favourites.fetchTracks().done (res) ->
- $scope.tracks = res.tracks
-]
diff --git a/resources/views/shared/_app_layout.blade.php b/resources/views/shared/_app_layout.blade.php
index 2902efec..6fb95a9b 100644
--- a/resources/views/shared/_app_layout.blade.php
+++ b/resources/views/shared/_app_layout.blade.php
@@ -77,8 +77,8 @@
Forum
@if (Auth::check())
-
- Upload Music
+
+ Upload Music
@can('access-admin-area')