| @@ 159-175 (lines=17) @@ | ||
| 156 | * @return Response |
|
| 157 | * @codeCoverageIgnore |
|
| 158 | */ |
|
| 159 | public function generalStatsAction(Request $request) |
|
| 160 | { |
|
| 161 | $ret = $this->setUpEditCounter($request); |
|
| 162 | if ($ret instanceof RedirectResponse) { |
|
| 163 | return $ret; |
|
| 164 | } |
|
| 165 | ||
| 166 | $isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
|
| 167 | return $this->render('editCounter/general_stats.html.twig', [ |
|
| 168 | 'xtTitle' => $this->user->getUsername(), |
|
| 169 | 'xtPage' => 'ec', |
|
| 170 | 'is_sub_request' => $isSubRequest, |
|
| 171 | 'user' => $this->user, |
|
| 172 | 'project' => $this->project, |
|
| 173 | 'ec' => $this->editCounter, |
|
| 174 | ]); |
|
| 175 | } |
|
| 176 | ||
| 177 | /** |
|
| 178 | * Display the namespace totals section. |
|
| @@ 184-200 (lines=17) @@ | ||
| 181 | * @return Response |
|
| 182 | * @codeCoverageIgnore |
|
| 183 | */ |
|
| 184 | public function namespaceTotalsAction(Request $request) |
|
| 185 | { |
|
| 186 | $ret = $this->setUpEditCounter($request); |
|
| 187 | if ($ret instanceof RedirectResponse) { |
|
| 188 | return $ret; |
|
| 189 | } |
|
| 190 | ||
| 191 | $isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
|
| 192 | return $this->render('editCounter/namespace_totals.html.twig', [ |
|
| 193 | 'xtTitle' => $this->user->getUsername(), |
|
| 194 | 'xtPage' => 'ec', |
|
| 195 | 'is_sub_request' => $isSubRequest, |
|
| 196 | 'user' => $this->user, |
|
| 197 | 'project' => $this->project, |
|
| 198 | 'ec' => $this->editCounter, |
|
| 199 | ]); |
|
| 200 | } |
|
| 201 | ||
| 202 | /** |
|
| 203 | * Display the timecard section. |
|
| @@ 238-254 (lines=17) @@ | ||
| 235 | * @return Response |
|
| 236 | * @codeCoverageIgnore |
|
| 237 | */ |
|
| 238 | public function yearcountsAction(Request $request) |
|
| 239 | { |
|
| 240 | $ret = $this->setUpEditCounter($request); |
|
| 241 | if ($ret instanceof RedirectResponse) { |
|
| 242 | return $ret; |
|
| 243 | } |
|
| 244 | ||
| 245 | $isSubRequest = $this->container->get('request_stack')->getParentRequest() !== null; |
|
| 246 | return $this->render('editCounter/yearcounts.html.twig', [ |
|
| 247 | 'xtTitle' => $this->user->getUsername(), |
|
| 248 | 'xtPage' => 'ec', |
|
| 249 | 'is_sub_request' => $isSubRequest, |
|
| 250 | 'user' => $this->user, |
|
| 251 | 'project' => $this->project, |
|
| 252 | 'ec' => $this->editCounter, |
|
| 253 | ]); |
|
| 254 | } |
|
| 255 | ||
| 256 | /** |
|
| 257 | * Display the month counts section. |
|
| @@ 292-309 (lines=18) @@ | ||
| 289 | * @return Response |
|
| 290 | * @codeCoverageIgnore |
|
| 291 | */ |
|
| 292 | public function latestglobalAction(Request $request) |
|
| 293 | { |
|
| 294 | $ret = $this->setUpEditCounter($request); |
|
| 295 | if ($ret instanceof RedirectResponse) { |
|
| 296 | return $ret; |
|
| 297 | } |
|
| 298 | ||
| 299 | $isSubRequest = $request->get('htmlonly') |
|
| 300 | || $this->container->get('request_stack')->getParentRequest() !== null; |
|
| 301 | return $this->render('editCounter/latest_global.html.twig', [ |
|
| 302 | 'xtTitle' => $this->user->getUsername(), |
|
| 303 | 'xtPage' => 'ec', |
|
| 304 | 'is_sub_request' => $isSubRequest, |
|
| 305 | 'user' => $this->user, |
|
| 306 | 'project' => $this->project, |
|
| 307 | 'ec' => $this->editCounter, |
|
| 308 | ]); |
|
| 309 | } |
|
| 310 | ||
| 311 | ||
| 312 | /** |
|