1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 18:19:25 +00:00
Files
stratos/views/classUsers.hbs

26 lines
688 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('click', (e) => {
const userId = e.path[1].getAttribute('data-uid');
window.location.href = `${window.location.href}/${userId}/remove`;
});
});
</script>