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

Added tests page

This commit is contained in:
2022-02-06 20:31:29 +00:00
parent c0e1a770b3
commit b6e43df0e3
3 changed files with 81 additions and 0 deletions

69
views/tests.hbs Normal file
View File

@@ -0,0 +1,69 @@
<section class='tests adminSection'>
<div class='adminItem'>
<h2>Tests</h2>
<div class='adminTable'>
<table>
<thead>
<tr>
<th>Name</th>
<th>Subject</th>
<th>Class</th>
<th>Date</th>
</tr>
</thead>
{{> test
id='1'
name='Organic Synthesis'
subject='Chemistry'
class='MKA_133'
date='01/08/2021'
}}
{{> test
id='2'
name='Organic Synthesis'
subject='Chemistry'
class='MKA_133'
date='01/08/2021'
}}
{{> test
id='3'
name='Organic Synthesis'
subject='Chemistry'
class='MKA_133'
date='01/08/2021'
}}
{{> test
id='4'
name='Organic Synthesis'
subject='Chemistry'
class='MKA_133'
date='01/08/2021'
}}
{{> test
id='5'
name='Organic Synthesis'
subject='Chemistry'
class='MKA_133'
date='01/08/2021'
}}
{{> test
id='6'
name='Organic Synthesis'
subject='Chemistry'
class='MKA_133'
date='01/08/2021'
}}
</table>
</div>
</div>
</section>
<script>
const tests = document.querySelectorAll('.tests tbody tr');
tests.forEach(t => {
t.addEventListener('click', () => {
window.location.href =
`/admin/test/${t.getAttribute('data-id')}`;
});
});
</script>