38 lines
1.5 KiB
PHP
38 lines
1.5 KiB
PHP
<x-layout.app>
|
|
<x-slot:page_title>Student Administration</x-slot:page_title>
|
|
|
|
<x-card.card>
|
|
<x-table.table with_title_area>
|
|
<x-slot:title class="ml-3">Students</x-slot:title>
|
|
<x-slot:subtitle class="ml-3">Click name to edit</x-slot:subtitle>
|
|
<x-slot:title_block_right class="mr-3">
|
|
<x-form.button href="{{ route('admin.students.create') }}">New Student</x-form.button>
|
|
</x-slot:title_block_right>
|
|
|
|
<thead>
|
|
<tr>
|
|
<x-table.th>Name</x-table.th>
|
|
<x-table.th>School</x-table.th>
|
|
<x-table.th>Grade</x-table.th>
|
|
<x-table.th>Entries</x-table.th>
|
|
</tr>
|
|
</thead>
|
|
<x-table.body>
|
|
@foreach($students as $student)
|
|
<tr>
|
|
<x-table.td><a href="{{ route('admin.students.edit',$student) }}">{{ $student->full_name(true) }}</a></x-table.td>
|
|
<x-table.td>{{ $student->school->name }}</x-table.td>
|
|
<x-table.td>{{ $student->grade }}</x-table.td>
|
|
<x-table.td>{{ $student->entries_count }}</x-table.td>
|
|
</tr>
|
|
@endforeach
|
|
</x-table.body>
|
|
</x-table.table>
|
|
|
|
</x-card.card>
|
|
<div class="mt-3 mx-3">
|
|
{{ $students->links('vendor.pagination.simple-audition') }}
|
|
</div>
|
|
</x-layout.app>
|
|
{{--TODO add options to filter the page--}}
|