| @@ 151-164 (lines=14) @@ | ||
| 148 | * @param string $username |
|
| 149 | * @return Response |
|
| 150 | */ |
|
| 151 | public function generalStatsAction($project, $username) |
|
| 152 | { |
|
| 153 | $this->setUpEditCounter($project, $username); |
|
| 154 | ||
| 155 | $isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
|
| 156 | return $this->render('editCounter/general_stats.html.twig', [ |
|
| 157 | 'xtTitle' => $this->user->getUsername(), |
|
| 158 | 'xtPage' => 'ec', |
|
| 159 | 'is_sub_request' => $isSubRequest, |
|
| 160 | 'user' => $this->user, |
|
| 161 | 'project' => $this->project, |
|
| 162 | 'ec' => $this->editCounter, |
|
| 163 | ]); |
|
| 164 | } |
|
| 165 | ||
| 166 | /** |
|
| 167 | * Display the namespace totals section. |
|
| @@ 174-186 (lines=13) @@ | ||
| 171 | * @param string $username |
|
| 172 | * @return Response |
|
| 173 | */ |
|
| 174 | public function namespaceTotalsAction(Request $request, $project, $username) |
|
| 175 | { |
|
| 176 | $this->setUpEditCounter($project, $username); |
|
| 177 | $isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
|
| 178 | return $this->render('editCounter/namespace_totals.html.twig', [ |
|
| 179 | 'xtTitle' => $this->user->getUsername(), |
|
| 180 | 'xtPage' => 'ec', |
|
| 181 | 'is_sub_request' => $isSubRequest, |
|
| 182 | 'user' => $this->user, |
|
| 183 | 'project' => $this->project, |
|
| 184 | 'ec' => $this->editCounter, |
|
| 185 | ]); |
|
| 186 | } |
|
| 187 | ||
| 188 | /** |
|
| 189 | * Display the timecard section. |
|
| @@ 220-232 (lines=13) @@ | ||
| 217 | * @param string $username |
|
| 218 | * @return Response |
|
| 219 | */ |
|
| 220 | public function yearcountsAction($project, $username) |
|
| 221 | { |
|
| 222 | $this->setUpEditCounter($project, $username); |
|
| 223 | $isSubRequest = $this->container->get('request_stack')->getParentRequest() !== null; |
|
| 224 | return $this->render('editCounter/yearcounts.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 | ]); |
|
| 232 | } |
|
| 233 | ||
| 234 | /** |
|
| 235 | * Display the month counts section. |
|
| @@ 268-281 (lines=14) @@ | ||
| 265 | * @param string $username The username. |
|
| 266 | * @return Response |
|
| 267 | */ |
|
| 268 | public function latestglobalAction(Request $request, $project, $username) |
|
| 269 | { |
|
| 270 | $this->setUpEditCounter($project, $username); |
|
| 271 | $isSubRequest = $request->get('htmlonly') |
|
| 272 | || $this->container->get('request_stack')->getParentRequest() !== null; |
|
| 273 | return $this->render('editCounter/latest_global.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 | ]); |
|
| 281 | } |
|
| 282 | ||
| 283 | ||
| 284 | /** |
|