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); $routeContext = RouteContext::fromRequest($request);
$routeParser = $routeContext->getRouteParser(); $routeParser = $routeContext->getRouteParser();
return $response return $response
->withHeader('Location', $routeParser->urlFor('result.list')) ->withHeader('Location', $routeParser->urlFor('test.view', [
'test_id' => $result->test_id
]))
->withStatus(302); ->withStatus(302);
} }

View File

@ -4,16 +4,25 @@
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="twelve columns"> <div class="twelve columns">
<h1>Welcome to Colossus!</h1> <h1>Welcome to Colossus!</h1>
<p>Using Colossus, you can easily organize your hardware benchmark results.</p> <p>Using Colossus, you can easily organize your hardware benchmark results.</p>
</div>
<hr> </div>
<p><a href="{{ url_for('result.list') }}">View saved results</a></p> <hr>
<p><a href="{{ url_for('result.add') }}">Add a new result</a></p>
<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>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

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

View File

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