Lots of changes
This commit is contained in:
25
templates/test/create.tmpl
Normal file
25
templates/test/create.tmpl
Normal file
@ -0,0 +1,25 @@
|
||||
{{ template "header" . }}
|
||||
|
||||
<div class="row">
|
||||
<h2>Create a test</h2>
|
||||
|
||||
<form class="twelve columns" action="/test/create" method="POST">
|
||||
<div class="row">
|
||||
<label for="test_name">
|
||||
Test name:
|
||||
<input id="test_name" class="u-full-width" type="text" name="test_name" placeholder="My hardware benchmarking test">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label for="test_description">
|
||||
Test description:
|
||||
<textarea id="test_description" class="twelve columns" cols="30" rows="10" name="test_description"></textarea>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<input class="button-primary u-full-width" type="submit" value="Submit">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{{ template "footer" . }}
|
27
templates/test/list.tmpl
Normal file
27
templates/test/list.tmpl
Normal file
@ -0,0 +1,27 @@
|
||||
{{ template "header" . }}
|
||||
|
||||
<div class="row">
|
||||
<h2>Tests</h2>
|
||||
<a href="/test/create">Create a new test</a>
|
||||
|
||||
<table class="twelve columns">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Title</td>
|
||||
<td>Created at</td>
|
||||
<td>Last updated</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range $p := .tests }}
|
||||
<tr>
|
||||
<td><a href="/test/{{ $p.ID }}">{{ $p.Name }}</a></td>
|
||||
<td>{{ $p.CreatedAt.Format "01/02/2006 15:04am" }}</td>
|
||||
<td>{{ $p.UpdatedAt.Format "01/02/2006 15:04am" }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ template "footer" . }}
|
13
templates/test/view.tmpl
Normal file
13
templates/test/view.tmpl
Normal file
@ -0,0 +1,13 @@
|
||||
{{ template "header" . }}
|
||||
|
||||
<div class="row">
|
||||
<h2>{{ .test.Name }}</h2>
|
||||
|
||||
<p>{{ .test.Description }}</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<p><a href="/test">Back</a></p>
|
||||
</div>
|
||||
|
||||
{{ template "footer" . }}
|
Reference in New Issue
Block a user