| @@ 50-65 (lines=16) @@ | ||
| 47 | * |
|
| 48 | * @return Route|\Symfony\Component\HttpFoundation\Response |
|
| 49 | */ |
|
| 50 | public function indexAction(Request $request) |
|
| 51 | { |
|
| 52 | $params = $this->parseQueryParams($request); |
|
| 53 | ||
| 54 | // Redirect if we have a project. $results may also include start and/or end date. |
|
| 55 | if (isset($params['project'])) { |
|
| 56 | return $this->redirectToRoute('AdminStatsResult', $params); |
|
| 57 | } |
|
| 58 | ||
| 59 | // Otherwise render form. |
|
| 60 | return $this->render('adminStats/index.html.twig', [ |
|
| 61 | 'xtPage' => 'adminstats', |
|
| 62 | 'xtPageTitle' => 'tool-adminstats', |
|
| 63 | 'xtSubtitle' => 'tool-adminstats-desc', |
|
| 64 | ]); |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Method for rendering the AdminStats Results |
|
| @@ 28-41 (lines=14) @@ | ||
| 25 | * @param Request $request |
|
| 26 | * @return Response |
|
| 27 | */ |
|
| 28 | public function indexAction(Request $request) |
|
| 29 | { |
|
| 30 | $params = $this->parseQueryParams($request); |
|
| 31 | ||
| 32 | if (isset($params['start']) && isset($params['end'])) { |
|
| 33 | return $this->redirectToRoute('MetaResult', $params); |
|
| 34 | } |
|
| 35 | ||
| 36 | return $this->render('meta/index.html.twig', [ |
|
| 37 | 'xtPage' => 'meta', |
|
| 38 | 'xtPageTitle' => 'tool-meta', |
|
| 39 | 'xtSubtitle' => 'tool-meta-desc', |
|
| 40 | ]); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * Display the results. |
|