Added total time of a course, marking chapters and courses to sync offline.
This commit is contained in:
@@ -3,12 +3,25 @@
|
||||
{{ $course->name }}
|
||||
</h1>
|
||||
|
||||
<a href="{{ route('course.sync', ['course' => $course->id]) }}">Sync all chapters offline</a>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Duration</th>
|
||||
<th>Sync offline</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($course->chapters()->get() as $chapter)
|
||||
<tr>
|
||||
<td><a href="{{ route('course.chapter', ['chapter' => $chapter->id]) }}">{{ $chapter->title }}</a></td>
|
||||
<td>{{ $chapter->sync_offline?'Yes':'No' }}</td>
|
||||
<td>{{ $chapter->duration }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Total: {{ $course->course_duration }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</x-layout>
|
||||
|
||||
Reference in New Issue
Block a user