46 lines
2.0 KiB
PHP
46 lines
2.0 KiB
PHP
<x-layout>
|
|
<h1>
|
|
<a href="/" class="text-decoration-none">List</a> » {{ $course->name }}
|
|
</h1>
|
|
<a href="{{ 'https://symfonycasts.com/screencast/'.$course->link }}">Visit course page</a>
|
|
|
|
<a href="{{ route('course.sync', ['course' => $course->id]) }}">Sync all chapters offline</a>
|
|
<a href="{{ route('course.update', ['course' => $course->id]) }}">Update course</a>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>Duration</th>
|
|
<th>Sync offline</th>
|
|
<th>Synced offline</th>
|
|
<th>File size</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
@foreach($course->chapters()->get() as $chapter)
|
|
<tr>
|
|
<td><a href="{{ route('course.chapter', ['course' => $course->id, 'chapter' => $chapter->order]) }}"
|
|
class="text-decoration-none">{{ $chapter->title }}</a></td>
|
|
<td><a href="{{ route('course.chapter.complete_toggle', ['course' => $course->id, 'chapter' => $chapter->id]) }}" class="text-decoration-none"><span class="icon-check {{ $chapter->is_complete?'text-info':'text-dark' }}"></span></a></td>
|
|
<td>{{ $chapter->duration }}</td>
|
|
<td>{{ $chapter->sync_offline?'Yes':'no' }}</td>
|
|
<td>{{ $chapter->is_video_file?'Yes':'-' }}</td>
|
|
<td>{{ $chapter->video_size_human }}</td>
|
|
<td class="text-end">
|
|
@if(!$chapter->sync_offline)
|
|
<a
|
|
href="{{ route('course.chapter.sync', ['course' => $chapter->course->id,'chapter' => $chapter->id]) }}">sync</a>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
<tr>
|
|
<td></td>
|
|
<td>Total: {{ $course->course_duration }}</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td>Size: {{ $course->total_size_human }}</td>
|
|
</tr>
|
|
</table>
|
|
</x-layout>
|