| @@ 156-172 (lines=17) @@ | ||
| 153 | * @param string $username |
|
| 154 | * @return Response |
|
| 155 | */ |
|
| 156 | public function generalStatsAction($project, $username) |
|
| 157 | { |
|
| 158 | $ret = $this->setUpEditCounter($project, $username); |
|
| 159 | if ($ret instanceof RedirectResponse) { |
|
| 160 | return $ret; |
|
| 161 | } |
|
| 162 | ||
| 163 | $isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
|
| 164 | return $this->render('editCounter/general_stats.html.twig', [ |
|
| 165 | 'xtTitle' => $this->user->getUsername(), |
|
| 166 | 'xtPage' => 'ec', |
|
| 167 | 'is_sub_request' => $isSubRequest, |
|
| 168 | 'user' => $this->user, |
|
| 169 | 'project' => $this->project, |
|
| 170 | 'ec' => $this->editCounter, |
|
| 171 | ]); |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * Display the namespace totals section. |
|
| @@ 182-198 (lines=17) @@ | ||
| 179 | * @param string $username |
|
| 180 | * @return Response |
|
| 181 | */ |
|
| 182 | public function namespaceTotalsAction(Request $request, $project, $username) |
|
| 183 | { |
|
| 184 | $ret = $this->setUpEditCounter($project, $username); |
|
| 185 | if ($ret instanceof RedirectResponse) { |
|
| 186 | return $ret; |
|
| 187 | } |
|
| 188 | ||
| 189 | $isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
|
| 190 | return $this->render('editCounter/namespace_totals.html.twig', [ |
|
| 191 | 'xtTitle' => $this->user->getUsername(), |
|
| 192 | 'xtPage' => 'ec', |
|
| 193 | 'is_sub_request' => $isSubRequest, |
|
| 194 | 'user' => $this->user, |
|
| 195 | 'project' => $this->project, |
|
| 196 | 'ec' => $this->editCounter, |
|
| 197 | ]); |
|
| 198 | } |
|
| 199 | ||
| 200 | /** |
|
| 201 | * Display the timecard section. |
|
| @@ 236-252 (lines=17) @@ | ||
| 233 | * @param string $username |
|
| 234 | * @return Response |
|
| 235 | */ |
|
| 236 | public function yearcountsAction($project, $username) |
|
| 237 | { |
|
| 238 | $ret = $this->setUpEditCounter($project, $username); |
|
| 239 | if ($ret instanceof RedirectResponse) { |
|
| 240 | return $ret; |
|
| 241 | } |
|
| 242 | ||
| 243 | $isSubRequest = $this->container->get('request_stack')->getParentRequest() !== null; |
|
| 244 | return $this->render('editCounter/yearcounts.html.twig', [ |
|
| 245 | 'xtTitle' => $this->user->getUsername(), |
|
| 246 | 'xtPage' => 'ec', |
|
| 247 | 'is_sub_request' => $isSubRequest, |
|
| 248 | 'user' => $this->user, |
|
| 249 | 'project' => $this->project, |
|
| 250 | 'ec' => $this->editCounter, |
|
| 251 | ]); |
|
| 252 | } |
|
| 253 | ||
| 254 | /** |
|
| 255 | * Display the month counts section. |
|
| @@ 292-309 (lines=18) @@ | ||
| 289 | * @param string $username The username. |
|
| 290 | * @return Response |
|
| 291 | */ |
|
| 292 | public function latestglobalAction(Request $request, $project, $username) |
|
| 293 | { |
|
| 294 | $ret = $this->setUpEditCounter($project, $username); |
|
| 295 | if ($ret instanceof RedirectResponse) { |
|
| 296 | return $ret; |
|
| 297 | } |
|
| 298 | ||
| 299 | $isSubRequest = $request->get('htmlonly') |
|
| 300 | || $this->container->get('request_stack')->getParentRequest() !== null; |
|
| 301 | return $this->render('editCounter/latest_global.html.twig', [ |
|
| 302 | 'xtTitle' => $this->user->getUsername(), |
|
| 303 | 'xtPage' => 'ec', |
|
| 304 | 'is_sub_request' => $isSubRequest, |
|
| 305 | 'user' => $this->user, |
|
| 306 | 'project' => $this->project, |
|
| 307 | 'ec' => $this->editCounter, |
|
| 308 | ]); |
|
| 309 | } |
|
| 310 | ||
| 311 | ||
| 312 | /** |
|