mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-16 18:01:38 +00:00
Added list view
This commit is contained in:
parent
34ea7be622
commit
9f01d0fde0
12 changed files with 139 additions and 17 deletions
|
@ -363,4 +363,25 @@ class ConfigController extends Controller
|
|||
|
||||
return $this->redirect($this->generateUrl('fos_user_security_login'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Switch view mode for current user.
|
||||
*
|
||||
* @Route("/config/view-mode", name="switch_view_mode")
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
*/
|
||||
public function changeViewModeAction(Request $request)
|
||||
{
|
||||
$user = $this->getUser();
|
||||
$user->getConfig()->setViewMode(!$user->getConfig()->getViewMode());
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($user);
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($request->headers->get('referer'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue