Changed where the result.add route redirects to; added some more links around the site for easier navigation

This commit is contained in:
Gregory Ballantine 2022-11-25 19:46:31 -05:00
parent ca62be49b6
commit 005b31dbd7
4 changed files with 24 additions and 12 deletions

View File

@ -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);
}

View File

@ -8,9 +8,18 @@
<div class="twelve columns">
<h1>Welcome to Colossus!</h1>
<p>Using Colossus, you can easily organize your hardware benchmark results.</p>
</div>
</div>
<hr>
<div class="row">
<div class="six columns">
<p><a href="{{ url_for('test.list') }}">View current tests</a></p>
<p><a href="{{ url_for('test.add') }}">Add a new test</a></p>
</div>
<div class="six columns">
<p><a href="{{ url_for('result.list') }}">View saved results</a></p>
<p><a href="{{ url_for('result.add') }}">Add a new result</a></p>
</div>

View File

@ -3,7 +3,7 @@
{% block title %}List of Tests{% endblock %}
{% block content %}
<p>Tests list...</p>
<p><a href="{{ url_for('test.add') }}">Create new test</a></p>
{% if tests | length > 0 %}
<table class="u-full-width">

View File

@ -15,6 +15,7 @@
<div class="row">
<div class="twelve columns">
<h3>Test results:</h3>
<p><a href="{{ url_for('result.add') }}">Add new result</a></p>
{% if test.results | length > 0 %}
<table class="u-full-width">