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}}
|
{{#if tests.length}}
|
||||||
<table>
|
<table class='tests'>
|
||||||
{{#each tests}}
|
{{#if full}}
|
||||||
{{> dashboardTest
|
<thead>
|
||||||
id=id
|
<tr>
|
||||||
name=template.name
|
<th>Name</th>
|
||||||
date=date
|
<th>Class</th>
|
||||||
}}
|
<th>Subject</th>
|
||||||
{{/each}}
|
<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>
|
</table>
|
||||||
{{else}}
|
{{else}}
|
||||||
No tests found
|
No tests found
|
||||||
|
|||||||
@@ -10,25 +10,7 @@
|
|||||||
<div class='adminItem'>
|
<div class='adminItem'>
|
||||||
<h2>Tests</h2>
|
<h2>Tests</h2>
|
||||||
<div class='adminTable'>
|
<div class='adminTable'>
|
||||||
<table>
|
{{> testTable tests=tests full=true }}
|
||||||
<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>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user