| @@ 31-42 (lines=12) @@ | ||
| 28 | /** |
|
| 29 | * @Route("/comments", name="admin_comments") |
|
| 30 | */ |
|
| 31 | public function indexAction(Request $request) |
|
| 32 | { |
|
| 33 | $comments = $this->getDoctrine()->getRepository('AppBundle:Comment')->getDisabledComments(); |
|
| 34 | $paginator = $this->get('knp_paginator'); |
|
| 35 | $pagination = $paginator->paginate( |
|
| 36 | $comments, |
|
| 37 | $request->query->getInt('page', 1), |
|
| 38 | 20 |
|
| 39 | ); |
|
| 40 | return $this->render('AppBundle::admin/comment/comments.html.twig', array('pagination' => $pagination)); |
|
| 41 | ||
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @Route("/comment/show/{id}", name="admin_comment_show") |
|
| @@ 44-54 (lines=11) @@ | ||
| 41 | * @Route("/estates", name="admin_estates") |
|
| 42 | * @Method("GET") |
|
| 43 | */ |
|
| 44 | public function estatesAction(Request $request) |
|
| 45 | { |
|
| 46 | $estates = $this->getDoctrine()->getRepository('AppBundle:Estate')->findAll(); |
|
| 47 | $paginator = $this->get('knp_paginator'); |
|
| 48 | $pagination = $paginator->paginate( |
|
| 49 | $estates, |
|
| 50 | $request->query->getInt('page', 1), |
|
| 51 | 10 |
|
| 52 | ); |
|
| 53 | return $this->render('@App/admin/estate/estates.html.twig', array('pagination' => $pagination)); |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @Route("/estate/show/{slug}", name="admin_estate_show") |
|
| @@ 23-33 (lines=11) @@ | ||
| 20 | * @Route("/users", name="admin_users") |
|
| 21 | * @Method("GET") |
|
| 22 | */ |
|
| 23 | public function usersAction(Request $request) |
|
| 24 | { |
|
| 25 | $users = $this->getDoctrine()->getRepository('AppBundle:User')->findAll(); |
|
| 26 | $paginator = $this->get('knp_paginator'); |
|
| 27 | $pagination = $paginator->paginate( |
|
| 28 | $users, |
|
| 29 | $request->query->getInt('page', 1), |
|
| 30 | 10 |
|
| 31 | ); |
|
| 32 | return $this->render('@App/admin/user/users.html.twig', array('pagination' => $pagination)); |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * @Route("/users/managers", name="admin_users_managers") |
|
| @@ 39-49 (lines=11) @@ | ||
| 36 | * @Route("/users/managers", name="admin_users_managers") |
|
| 37 | * @Method("GET") |
|
| 38 | */ |
|
| 39 | public function usersManagersAction(Request $request) |
|
| 40 | { |
|
| 41 | $users = $this->getDoctrine()->getRepository('AppBundle:User')->findByRole('ROLE_MANAGER'); |
|
| 42 | $paginator = $this->get('knp_paginator'); |
|
| 43 | $pagination = $paginator->paginate( |
|
| 44 | $users, |
|
| 45 | $request->query->getInt('page', 1), |
|
| 46 | 10 |
|
| 47 | ); |
|
| 48 | return $this->render('@App/admin/user/users.html.twig', array('pagination' => $pagination)); |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * @Route("/estates/{slug}", name="admin_estates_manager") |
|