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