|
@@ 137-150 (lines=14) @@
|
| 134 |
|
* @param string $username |
| 135 |
|
* @return Response |
| 136 |
|
*/ |
| 137 |
|
public function generalStatsAction($project, $username) |
| 138 |
|
{ |
| 139 |
|
$this->setUpEditCounter($project, $username); |
| 140 |
|
$isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
| 141 |
|
return $this->render('editCounter/general_stats.html.twig', [ |
| 142 |
|
'xtTitle' => 'general-stats', |
| 143 |
|
'xtPage' => 'ec', |
| 144 |
|
'is_sub_request' => $isSubRequest, |
| 145 |
|
'is_labs' => $this->project->getRepository()->isLabs(), |
| 146 |
|
'user' => $this->user, |
| 147 |
|
'project' => $this->project, |
| 148 |
|
'ec' => $this->editCounter, |
| 149 |
|
]); |
| 150 |
|
} |
| 151 |
|
|
| 152 |
|
/** |
| 153 |
|
* Display the namespace totals section. |
|
@@ 159-174 (lines=16) @@
|
| 156 |
|
* @param string $username |
| 157 |
|
* @return Response |
| 158 |
|
*/ |
| 159 |
|
public function namespaceTotalsAction($project, $username) |
| 160 |
|
{ |
| 161 |
|
$this->setUpEditCounter($project, $username); |
| 162 |
|
$isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
| 163 |
|
return $this->render('editCounter/namespace_totals.html.twig', [ |
| 164 |
|
'xtTitle' => 'namespace-totals', |
| 165 |
|
'xtPage' => 'ec', |
| 166 |
|
'is_sub_request' => $isSubRequest, |
| 167 |
|
'is_labs' => $this->project->getRepository()->isLabs(), |
| 168 |
|
'user' => $this->user, |
| 169 |
|
'project' => $this->project, |
| 170 |
|
'ec' => $this->editCounter, |
| 171 |
|
]); |
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
/** |
| 175 |
|
* Display the timecard section. |
| 176 |
|
* @Route("/ec-timecard/{project}/{username}", name="EditCounterTimecard") |
| 177 |
|
* @param string $project |
|
@@ 207-223 (lines=17) @@
|
| 204 |
|
* @param string $username |
| 205 |
|
* @return Response |
| 206 |
|
*/ |
| 207 |
|
public function yearcountsAction($project, $username) |
| 208 |
|
{ |
| 209 |
|
$this->setUpEditCounter($project, $username); |
| 210 |
|
$isSubRequest = $this->container->get('request_stack')->getParentRequest() !== null; |
| 211 |
|
//$yearcounts = $this->editCounterHelper->getYearCounts($username); |
| 212 |
|
return $this->render('editCounter/yearcounts.html.twig', [ |
| 213 |
|
'xtTitle' => 'year-counts', |
| 214 |
|
'xtPage' => 'ec', |
| 215 |
|
'is_sub_request' => $isSubRequest, |
| 216 |
|
//'namespaces' => $this->apiHelper->namespaces($project), |
| 217 |
|
//'yearcounts' => $yearcounts, |
| 218 |
|
'is_labs' => $this->project->getRepository()->isLabs(), |
| 219 |
|
'user' => $this->user, |
| 220 |
|
'project' => $this->project, |
| 221 |
|
'ec' => $this->editCounter, |
| 222 |
|
]); |
| 223 |
|
} |
| 224 |
|
|
| 225 |
|
/** |
| 226 |
|
* Display the month counts section. |
|
@@ 258-270 (lines=13) @@
|
| 255 |
|
* @param string $username |
| 256 |
|
* @return Response |
| 257 |
|
*/ |
| 258 |
|
public function latestglobalAction($project, $username) |
| 259 |
|
{ |
| 260 |
|
$this->setUpEditCounter($project, $username); |
| 261 |
|
$isSubRequest = $this->container->get('request_stack')->getParentRequest() !== null; |
| 262 |
|
return $this->render('editCounter/latest_global.html.twig', [ |
| 263 |
|
'xtTitle' => 'latest-global-edits', |
| 264 |
|
'xtPage' => 'ec', |
| 265 |
|
'is_sub_request' => $isSubRequest, |
| 266 |
|
'user' => $this->user, |
| 267 |
|
'project' => $this->project, |
| 268 |
|
'ec' => $this->editCounter, |
| 269 |
|
]); |
| 270 |
|
} |
| 271 |
|
} |
| 272 |
|
|