|
@@ 204-217 (lines=14) @@
|
| 201 |
|
/** |
| 202 |
|
* @Route("/ec-timecard/{project}/{username}", name="EditCounterTimeCard") |
| 203 |
|
*/ |
| 204 |
|
public function timecardAction($project, $username) |
| 205 |
|
{ |
| 206 |
|
$this->setUpEditCounter($project); |
| 207 |
|
$this->labsHelper->databasePrepare($project); |
| 208 |
|
$username = ucfirst($username); |
| 209 |
|
$isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
| 210 |
|
$datasets = $this->editCounterHelper->getTimeCard($username); |
| 211 |
|
return $this->render('editCounter/timecard.html.twig', [ |
| 212 |
|
'xtTitle' => 'tool-ec', |
| 213 |
|
'xtPage' => 'ec', |
| 214 |
|
'is_sub_request' => $isSubRequest, |
| 215 |
|
'datasets' => $datasets, |
| 216 |
|
]); |
| 217 |
|
} |
| 218 |
|
|
| 219 |
|
/** |
| 220 |
|
* @Route("/ec-yearcounts/{project}/{username}", name="EditCounterYearCounts") |
|
@@ 222-236 (lines=15) @@
|
| 219 |
|
/** |
| 220 |
|
* @Route("/ec-yearcounts/{project}/{username}", name="EditCounterYearCounts") |
| 221 |
|
*/ |
| 222 |
|
public function yearcountsAction($project, $username) |
| 223 |
|
{ |
| 224 |
|
$this->setUpEditCounter($project); |
| 225 |
|
$this->labsHelper->databasePrepare($project); |
| 226 |
|
$username = ucfirst($username); |
| 227 |
|
$isSubRequest = $this->container->get('request_stack')->getParentRequest() !== null; |
| 228 |
|
$yearcounts = $this->editCounterHelper->getYearCounts($username); |
| 229 |
|
return $this->render('editCounter/yearcounts.html.twig', [ |
| 230 |
|
'xtTitle' => 'tool_ec', |
| 231 |
|
'xtPage' => 'ec', |
| 232 |
|
'is_sub_request' => $isSubRequest, |
| 233 |
|
'namespaces' => $this->apiHelper->namespaces($project), |
| 234 |
|
'yearcounts' => $yearcounts, |
| 235 |
|
]); |
| 236 |
|
} |
| 237 |
|
|
| 238 |
|
/** |
| 239 |
|
* @Route("/ec-monthcounts/{project}/{username}", name="EditCounterMonthCounts") |
|
@@ 241-255 (lines=15) @@
|
| 238 |
|
/** |
| 239 |
|
* @Route("/ec-monthcounts/{project}/{username}", name="EditCounterMonthCounts") |
| 240 |
|
*/ |
| 241 |
|
public function monthcountsAction($project, $username) |
| 242 |
|
{ |
| 243 |
|
$this->setUpEditCounter($project); |
| 244 |
|
$this->labsHelper->databasePrepare($project); |
| 245 |
|
$username = ucfirst($username); |
| 246 |
|
$monthlyTotalsByNamespace = $this->editCounterHelper->getMonthCounts($username); |
| 247 |
|
$isSubRequest = $this->container->get('request_stack')->getParentRequest() !== null; |
| 248 |
|
return $this->render('editCounter/monthcounts.html.twig', [ |
| 249 |
|
'xtTitle' => 'tool_ec', |
| 250 |
|
'xtPage' => 'ec', |
| 251 |
|
'is_sub_request' => $isSubRequest, |
| 252 |
|
'month_counts' => $monthlyTotalsByNamespace, |
| 253 |
|
'namespaces' => $this->apiHelper->namespaces($project), |
| 254 |
|
]); |
| 255 |
|
} |
| 256 |
|
|
| 257 |
|
/** |
| 258 |
|
* @Route("/ec-latestglobal/{project}/{username}", name="EditCounterLatestGlobal") |