1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 22:59:28 +00:00
Files
stratos/views/classUsers.hbs
2022-04-22 03:07:54 +00:00

27 lines
753 B
Handlebars

<section class='adminSection adminSection--buttons'>
{{#eq userType 'account'}}
<div class='classes__buttons'>
{{> button style='full' colour='primary' to=addLink content=addContent size='lg' }}
</div>
{{/eq}}
</section>
<section class='adminSection classUsers'>
<div class="adminItem">
<h2>{{pageTitle}}</h2>
{{#each users as |user|}}
{{> classUser userType=../userType user=user }}
{{/each}}
</div>
</section>
<script>
document.querySelectorAll('.classUser i').forEach(elem => {
elem.addEventListener(touchEvent, (e) => {
const path = e.path || (e.composedPath && e.composedPath());
const userId = path[1].getAttribute('data-uid');
window.location.href = `${window.location.href}/${userId}/remove`;
});
});
</script>