marking chapters as complete and toggling value from course list and chapter page.

This commit is contained in:
Krzysztof Płaczek
2023-06-13 16:39:20 +02:00
parent 018597faaa
commit 301244cdb0
7 changed files with 45 additions and 0 deletions

View File

@@ -40,6 +40,7 @@
<table class="table table-sm">
@foreach($chapters as $courseChapter)
<tr class="@if($courseChapter->id === $chapter->id)table-dark @endif">
<td><a href="{{ route('course.chapter.complete_toggle', ['course' => $courseChapter->course->id, 'chapter' => $courseChapter->id]) }}" class="text-decoration-none"><span class="icon-check {{ $courseChapter->is_complete?'text-info':'text-dark' }}"></span></a></td>
<td>
<a href="{{ route('course.chapter', ['course' => $courseChapter->course_id, 'chapter' => $courseChapter->order ]) }}"
class="text-decoration-none">{{ $courseChapter->title }}</a>