1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 13:59:25 +00:00

Generalise testTables more

This commit is contained in:
2022-04-21 13:16:33 +00:00
parent 6d8e66eeb6
commit 586f84d65c
2 changed files with 29 additions and 27 deletions

View File

@@ -1,12 +1,32 @@
{{#if tests.length}}
<table>
{{#each tests}}
{{> dashboardTest
id=id
name=template.name
date=date
}}
{{/each}}
<table class='tests'>
{{#if full}}
<thead>
<tr>
<th>Name</th>
<th>Class</th>
<th>Subject</th>
<th>Date</th>
</tr>
</thead>
{{#each tests}}
{{> test
id=id
name=template.name
class=class.name
subject=class.subject.name
date=date
}}
{{/each}}
{{else}}
{{#each tests}}
{{> dashboardTest
id=id
name=template.name
date=date
}}
{{/each}}
{{/if}}
</table>
{{else}}
No tests found

View File

@@ -10,25 +10,7 @@
<div class='adminItem'>
<h2>Tests</h2>
<div class='adminTable'>
<table>
<thead>
<tr>
<th>Name</th>
<th>Class</th>
<th>Subject</th>
<th>Date</th>
</tr>
</thead>
{{#each tests}}
{{> test
id=id
name=template.name
class=class.name
subject=class.subject.name
date=date
}}
{{/each}}
</table>
{{> testTable tests=tests full=true }}
</div>
</div>
</section>