mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 16:19:26 +00:00
Generalise testTables more
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user