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>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<tr>
|
||||
<td class="align-middle">{{ $course->id }}</td>
|
||||
<td><img src="{{ $course->thumbnail }}" alt="{{ $course->name }}" class="img-thumbnail" style="width: 70px;"></td>
|
||||
<td class="align-middle"><a href="{{ route('course.index', ['0' => $course->id]) }}"> {{ $course->name }}</a></td>
|
||||
<td class="align-middle"><a href="{{ route('course.index', ['course' => $course->id]) }}">{{ $course->name }}</a></td>
|
||||
<td class="align-middle">{{ $course->status }}</td>
|
||||
<td class="align-middle">{{ $course->chapters_count }} / {{ $course->numberofchapters }}</td>
|
||||
<td class="align-middle"><abbr title="{{ $course->published_at?->format('Y-m-d') }}">{{ $course->published_at?->diffForHumans() }}</abbr></td>
|
||||
|
||||
Reference in New Issue
Block a user