|
|
@@ -212,11 +212,20 @@ final class SprintController
|
|
|
return Response::text('Not Found', 404);
|
|
|
}
|
|
|
|
|
|
+ // Sprint switcher: every sprint (current included), ordered newest start
|
|
|
+ // first to match the home listing.
|
|
|
+ $presentSprintChoices = [];
|
|
|
+ foreach ($this->sprints->allWithCounts() as $row) {
|
|
|
+ $s = $row['sprint'];
|
|
|
+ $presentSprintChoices[] = ['id' => $s->id, 'name' => $s->name];
|
|
|
+ }
|
|
|
+
|
|
|
// Present view extends layout-bare.twig instead of the shared layout.twig.
|
|
|
return Response::html($this->view->render('sprints/present', [
|
|
|
- 'title' => $data['sprint']->name . ' — present',
|
|
|
- 'currentUser' => $actor,
|
|
|
- 'csrfToken' => SessionGuard::csrfToken(),
|
|
|
+ 'title' => $data['sprint']->name . ' — present',
|
|
|
+ 'currentUser' => $actor,
|
|
|
+ 'csrfToken' => SessionGuard::csrfToken(),
|
|
|
+ 'presentSprintChoices' => $presentSprintChoices,
|
|
|
] + $data));
|
|
|
}
|
|
|
|