diff --git a/app/controllers/Api/Web/ArtistsController.php b/app/controllers/Api/Web/ArtistsController.php index b485db0c..63beb16b 100644 --- a/app/controllers/Api/Web/ArtistsController.php +++ b/app/controllers/Api/Web/ArtistsController.php @@ -84,13 +84,25 @@ } public function getShow($slug) { - $user = User::whereSlug($slug)->userDetails()->with(['comments' => function ($query) { $query->with('user'); }])->first(); + $user = User::whereSlug($slug) + ->userDetails() + ->with(['comments' => function ($query) { $query->with('user'); }]) + ->first(); if (!$user) App::abort(404); - $trackQuery = Track::summary()->published()->explicitFilter()->listed()->with('genre', 'cover', 'user')->userDetails()->whereUserId($user->id)->whereNotNull('published_at')->orderBy('created_at', 'desc')->take(20); - $latestTracks = []; + $trackQuery = Track::summary() + ->published() + ->explicitFilter() + ->listed() + ->with('genre', 'cover', 'user') + ->userDetails() + ->whereUserId($user->id) + ->whereNotNull('published_at') + ->orderBy('created_at', 'desc') + ->take(20); + $latestTracks = []; foreach ($trackQuery->get() as $track) { $latestTracks[] = Track::mapPublicTrackSummary($track); } @@ -116,6 +128,7 @@ 'id' => $user->id, 'name' => $user->display_name, 'slug' => $user->slug, + 'is_archived' => $user->is_archived, 'avatars' => [ 'small' => $user->getAvatarUrl(Image::SMALL), 'normal' => $user->getAvatarUrl(Image::NORMAL) @@ -153,6 +166,7 @@ 'name' => $user->display_name, 'slug' => $user->slug, 'url' => $user->url, + 'is_archived' => $user->is_archived, 'avatars' => [ 'small' => $user->getAvatarUrl(Image::SMALL), 'normal' => $user->getAvatarUrl(Image::NORMAL) diff --git a/app/database/migrations/2015_05_20_155236_add_archived_profile_field.php b/app/database/migrations/2015_05_20_155236_add_archived_profile_field.php new file mode 100644 index 00000000..6dfa4b13 --- /dev/null +++ b/app/database/migrations/2015_05_20_155236_add_archived_profile_field.php @@ -0,0 +1,31 @@ +boolean( 'is_archived' )->default(false); + } ); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table( 'users', function ( $table ) { + $table->dropColumn( 'is_archived' ); + } ); + } + +} \ No newline at end of file diff --git a/app/styles/content.less b/app/styles/content.less index 9eec5f1e..0e79b781 100644 --- a/app/styles/content.less +++ b/app/styles/content.less @@ -142,6 +142,10 @@ } } } + + &.x-archived { + background: #eee; + } } .share-buttons { diff --git a/public/templates/artists/_show_layout.html b/public/templates/artists/_show_layout.html index c642526c..6cd6948f 100644 --- a/public/templates/artists/_show_layout.html +++ b/public/templates/artists/_show_layout.html @@ -1,4 +1,4 @@ -