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

75 lines
2.1 KiB
Handlebars

<section class='classPage'>
<section class='adminSection adminSection--buttons'>
{{#eq userType 'account'}}
<div class='classes__buttons'>
<form action='{{deleteLink}}' method='post' class='deleteForm'>
<input type='submit' class='btn btn--full btn--primary btn--lg' value='Delete'/>
</form>
</div>
{{/eq}}
</section>
<div class='adminSection'>
<div class='adminItem'>
<h2>Class Overview - {{ className }}</h2>
<div class='adminOverview'>
<div>
<h3><a href='{{teachersLink}}'>Teachers</a></h3>
{{#each teachers}}
{{> classTeacher name=shortName email=email }}
{{/each}}
</div>
<div>
<h3><a href='{{membersLink}}'>Members</a></h3>
{{> classMembers members=members }}
</div>
<div class='adminOverview__buttons'>
{{> button style='full' colour='primary' to=contactLink content='Contact'}}
{{> button style='full' colour='primary' to=testsLink content='View Tests'}}
</div>
</div>
</div>
</div>
<div class='adminSection'>
<div class='adminItem adminStats'>
<div class='adminItem__title'>
<h2>Statistics and Reports</h2>
{{> button style='full' colour='primary' to=reportsLink content='View All'}}
</div>
<div class='adminStats__stats'>
{{#each stats}}
{{> adminStat value=value text=text }}
{{/each}}
</div>
<div class='adminStats__graphs'>
{{> graph }}
{{> graph }}
</div>
</div>
</div>
<div class='adminSection'>
<div class='adminItem classPage__tests'>
<div class='adminItem__title'>
<h2>Tests</h2>
{{> button style='full' colour='primary' to=testsLink content='View All'}}
</div>
<div class='classPage__tests__container'>
<div class='adminTable'>
<h3>Upcoming Tests</h3>
{{> testTable tests=upcomingTests}}
</div>
<div class='adminTable'>
<h3>Recent Tests</h3>
{{> testTable tests=recentTests}}
</div>
</div>
</div>
</div>
</section>
<script>
document.querySelector('.deleteForm').addEventListener('submit', (e) => {
if (!confirm('Delete class?'))
e.preventDefault();
});
</script>