| @@ 209-229 (lines=21) @@ | ||
| 206 | * @return Response |
|
| 207 | * @codeCoverageIgnore |
|
| 208 | */ |
|
| 209 | public function timecardAction(Request $request) |
|
| 210 | { |
|
| 211 | $ret = $this->setUpEditCounter($request); |
|
| 212 | if ($ret instanceof RedirectResponse) { |
|
| 213 | return $ret; |
|
| 214 | } |
|
| 215 | ||
| 216 | $isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
|
| 217 | $optedInPage = $this->project |
|
| 218 | ->getRepository() |
|
| 219 | ->getPage($this->project, $this->project->userOptInPage($this->user)); |
|
| 220 | return $this->render('editCounter/timecard.html.twig', [ |
|
| 221 | 'xtTitle' => $this->user->getUsername(), |
|
| 222 | 'xtPage' => 'ec', |
|
| 223 | 'is_sub_request' => $isSubRequest, |
|
| 224 | 'user' => $this->user, |
|
| 225 | 'project' => $this->project, |
|
| 226 | 'ec' => $this->editCounter, |
|
| 227 | 'opted_in_page' => $optedInPage, |
|
| 228 | ]); |
|
| 229 | } |
|
| 230 | ||
| 231 | /** |
|
| 232 | * Display the year counts section. |
|
| @@ 263-283 (lines=21) @@ | ||
| 260 | * @return Response |
|
| 261 | * @codeCoverageIgnore |
|
| 262 | */ |
|
| 263 | public function monthcountsAction(Request $request) |
|
| 264 | { |
|
| 265 | $ret = $this->setUpEditCounter($request); |
|
| 266 | if ($ret instanceof RedirectResponse) { |
|
| 267 | return $ret; |
|
| 268 | } |
|
| 269 | ||
| 270 | $isSubRequest = $this->container->get('request_stack')->getParentRequest() !== null; |
|
| 271 | $optedInPage = $this->project |
|
| 272 | ->getRepository() |
|
| 273 | ->getPage($this->project, $this->project->userOptInPage($this->user)); |
|
| 274 | return $this->render('editCounter/monthcounts.html.twig', [ |
|
| 275 | 'xtTitle' => $this->user->getUsername(), |
|
| 276 | 'xtPage' => 'ec', |
|
| 277 | 'is_sub_request' => $isSubRequest, |
|
| 278 | 'user' => $this->user, |
|
| 279 | 'project' => $this->project, |
|
| 280 | 'ec' => $this->editCounter, |
|
| 281 | 'opted_in_page' => $optedInPage, |
|
| 282 | ]); |
|
| 283 | } |
|
| 284 | ||
| 285 | /** |
|
| 286 | * Display the latest global edits section. |
|