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