mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 22:59:28 +00:00
Make dashboard use new testTable component
This commit is contained in:
@@ -11,15 +11,7 @@
|
|||||||
<div class='adminItem'>
|
<div class='adminItem'>
|
||||||
<h2>Recent Tests</h2>
|
<h2>Recent Tests</h2>
|
||||||
<div class='adminTable'>
|
<div class='adminTable'>
|
||||||
<table>
|
{{> testTable tests=recentTests}}
|
||||||
{{#each recentTests}}
|
|
||||||
{{> dashboardTest
|
|
||||||
id=id
|
|
||||||
name=template.name
|
|
||||||
date=date
|
|
||||||
}}
|
|
||||||
{{/each}}
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -27,26 +19,8 @@
|
|||||||
<div class='adminItem'>
|
<div class='adminItem'>
|
||||||
<h2>Upcoming Tests</h2>
|
<h2>Upcoming Tests</h2>
|
||||||
<div class='adminTable'>
|
<div class='adminTable'>
|
||||||
<table>
|
{{> testTable tests=upcomingTests}}
|
||||||
{{#each upcomingTests}}
|
|
||||||
{{> dashboardTest
|
|
||||||
id=id
|
|
||||||
name=template.name
|
|
||||||
date=date
|
|
||||||
}}
|
|
||||||
{{/each}}
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<script>
|
|
||||||
const tests = document.querySelectorAll('.adminTable tr');
|
|
||||||
tests.forEach(test => {
|
|
||||||
test.addEventListener('click', () => {
|
|
||||||
window.location.href =
|
|
||||||
`/admin/test/${test.getAttribute('data-id')}`;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user