From 005b31dbd762cac86c44e8461fcd9ce9afd70338 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Fri, 25 Nov 2022 19:46:31 -0500 Subject: [PATCH] Changed where the result.add route redirects to; added some more links around the site for easier navigation --- src/Controllers/ResultController.php | 4 +++- views/index.twig | 29 ++++++++++++++++++---------- views/test/list.twig | 2 +- views/test/view.twig | 1 + 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/Controllers/ResultController.php b/src/Controllers/ResultController.php index 44c35f0..5345d97 100644 --- a/src/Controllers/ResultController.php +++ b/src/Controllers/ResultController.php @@ -47,7 +47,9 @@ class ResultController extends Controller { $routeContext = RouteContext::fromRequest($request); $routeParser = $routeContext->getRouteParser(); return $response - ->withHeader('Location', $routeParser->urlFor('result.list')) + ->withHeader('Location', $routeParser->urlFor('test.view', [ + 'test_id' => $result->test_id + ])) ->withStatus(302); } diff --git a/views/index.twig b/views/index.twig index 9a4eef8..72c1fc8 100644 --- a/views/index.twig +++ b/views/index.twig @@ -4,16 +4,25 @@ {% block content %} -
-
-

Welcome to Colossus!

-

Using Colossus, you can easily organize your hardware benchmark results.

- -
- -

View saved results

-

Add a new result

+
+
+

Welcome to Colossus!

+

Using Colossus, you can easily organize your hardware benchmark results.

+
+
+ +
+ + -
{% endblock %} diff --git a/views/test/list.twig b/views/test/list.twig index 668b0d8..d828ea1 100644 --- a/views/test/list.twig +++ b/views/test/list.twig @@ -3,7 +3,7 @@ {% block title %}List of Tests{% endblock %} {% block content %} -

Tests list...

+

Create new test

{% if tests | length > 0 %} diff --git a/views/test/view.twig b/views/test/view.twig index 31517e5..5c792ce 100644 --- a/views/test/view.twig +++ b/views/test/view.twig @@ -15,6 +15,7 @@

Test results:

+

Add new result

{% if test.results | length > 0 %}