1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 22:39:26 +00:00
Files
stratos/views/tests.hbs

70 lines
1.3 KiB
Handlebars

<section class='tests adminSection'>
<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>
{{> test
id='1'
name='Organic Synthesis'
class='MKA_133'
subject='Chemistry'
date='01/08/2021'
}}
{{> test
id='2'
name='Organic Synthesis'
class='MKA_133'
subject='Chemistry'
date='01/08/2021'
}}
{{> test
id='3'
name='Organic Synthesis'
class='MKA_133'
subject='Chemistry'
date='01/08/2021'
}}
{{> test
id='4'
name='Organic Synthesis'
class='MKA_133'
subject='Chemistry'
date='01/08/2021'
}}
{{> test
id='5'
name='Organic Synthesis'
class='MKA_133'
subject='Chemistry'
date='01/08/2021'
}}
{{> test
id='6'
name='Organic Synthesis'
class='MKA_133'
subject='Chemistry'
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>