0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-18 22:31:04 +00:00

Updated user and shelf views to new design

This commit is contained in:
Dan Brown 2019-02-03 13:45:45 +00:00
parent 880d4f35da
commit 138f5d5c4f
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
44 changed files with 719 additions and 597 deletions
app/Http/Controllers

View file

@ -289,15 +289,20 @@ class UserController extends Controller
}
/**
* Change the stored sort type for the books view.
* @param $id
* Change the stored sort type for a particular view.
* @param string $id
* @param string $type
* @param Request $request
* @return \Illuminate\Http\RedirectResponse
*/
public function changeBooksSort($id, Request $request)
public function changeSort(string $id, string $type, Request $request)
{
// TODO - Test this endpoint
return $this->changeListSort($id, $request, 'books');
$validSortTypes = ['books', 'bookshelves'];
if (!in_array($type, $validSortTypes)) {
return redirect()->back(500);
}
return $this->changeListSort($id, $request, $type);
}
/**