| @@ 162-178 (lines=17) @@ | ||
| 159 | * @param string $username |
|
| 160 | * @return Response |
|
| 161 | */ |
|
| 162 | public function generalStatsAction($project, $username) |
|
| 163 | { |
|
| 164 | $ret = $this->setUpEditCounter($project, $username); |
|
| 165 | if ($ret instanceof RedirectResponse) { |
|
| 166 | return $ret; |
|
| 167 | } |
|
| 168 | ||
| 169 | $isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
|
| 170 | return $this->render('editCounter/general_stats.html.twig', [ |
|
| 171 | 'xtTitle' => $this->user->getUsername(), |
|
| 172 | 'xtPage' => 'ec', |
|
| 173 | 'is_sub_request' => $isSubRequest, |
|
| 174 | 'user' => $this->user, |
|
| 175 | 'project' => $this->project, |
|
| 176 | 'ec' => $this->editCounter, |
|
| 177 | ]); |
|
| 178 | } |
|
| 179 | ||
| 180 | /** |
|
| 181 | * Display the namespace totals section. |
|
| @@ 188-204 (lines=17) @@ | ||
| 185 | * @param string $username |
|
| 186 | * @return Response |
|
| 187 | */ |
|
| 188 | public function namespaceTotalsAction(Request $request, $project, $username) |
|
| 189 | { |
|
| 190 | $ret = $this->setUpEditCounter($project, $username); |
|
| 191 | if ($ret instanceof RedirectResponse) { |
|
| 192 | return $ret; |
|
| 193 | } |
|
| 194 | ||
| 195 | $isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
|
| 196 | return $this->render('editCounter/namespace_totals.html.twig', [ |
|
| 197 | 'xtTitle' => $this->user->getUsername(), |
|
| 198 | 'xtPage' => 'ec', |
|
| 199 | 'is_sub_request' => $isSubRequest, |
|
| 200 | 'user' => $this->user, |
|
| 201 | 'project' => $this->project, |
|
| 202 | 'ec' => $this->editCounter, |
|
| 203 | ]); |
|
| 204 | } |
|
| 205 | ||
| 206 | /** |
|
| 207 | * Display the timecard section. |
|
| @@ 242-258 (lines=17) @@ | ||
| 239 | * @param string $username |
|
| 240 | * @return Response |
|
| 241 | */ |
|
| 242 | public function yearcountsAction($project, $username) |
|
| 243 | { |
|
| 244 | $ret = $this->setUpEditCounter($project, $username); |
|
| 245 | if ($ret instanceof RedirectResponse) { |
|
| 246 | return $ret; |
|
| 247 | } |
|
| 248 | ||
| 249 | $isSubRequest = $this->container->get('request_stack')->getParentRequest() !== null; |
|
| 250 | return $this->render('editCounter/yearcounts.html.twig', [ |
|
| 251 | 'xtTitle' => $this->user->getUsername(), |
|
| 252 | 'xtPage' => 'ec', |
|
| 253 | 'is_sub_request' => $isSubRequest, |
|
| 254 | 'user' => $this->user, |
|
| 255 | 'project' => $this->project, |
|
| 256 | 'ec' => $this->editCounter, |
|
| 257 | ]); |
|
| 258 | } |
|
| 259 | ||
| 260 | /** |
|
| 261 | * Display the month counts section. |
|
| @@ 298-315 (lines=18) @@ | ||
| 295 | * @param string $username The username. |
|
| 296 | * @return Response |
|
| 297 | */ |
|
| 298 | public function latestglobalAction(Request $request, $project, $username) |
|
| 299 | { |
|
| 300 | $ret = $this->setUpEditCounter($project, $username); |
|
| 301 | if ($ret instanceof RedirectResponse) { |
|
| 302 | return $ret; |
|
| 303 | } |
|
| 304 | ||
| 305 | $isSubRequest = $request->get('htmlonly') |
|
| 306 | || $this->container->get('request_stack')->getParentRequest() !== null; |
|
| 307 | return $this->render('editCounter/latest_global.html.twig', [ |
|
| 308 | 'xtTitle' => $this->user->getUsername(), |
|
| 309 | 'xtPage' => 'ec', |
|
| 310 | 'is_sub_request' => $isSubRequest, |
|
| 311 | 'user' => $this->user, |
|
| 312 | 'project' => $this->project, |
|
| 313 | 'ec' => $this->editCounter, |
|
| 314 | ]); |
|
| 315 | } |
|
| 316 | ||
| 317 | ||
| 318 | /** |
|