allow sorting by course name and published date, link to manually update course details,
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
<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>
|
||||
@@ -16,7 +18,8 @@
|
||||
</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', ['course' => $course->id, 'chapter' => $chapter->order]) }}"
|
||||
class="text-decoration-none">{{ $chapter->title }}</a></td>
|
||||
<td>{{ $chapter->duration }}</td>
|
||||
<td>{{ $chapter->sync_offline?'Yes':'no' }}</td>
|
||||
<td>{{ $chapter->is_video_file?'Yes':'-' }}</td>
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
<x-layout>
|
||||
<h1><a class="text-decoration-none" href="{{route('index')}}">List of Courses</a> <small class="text-muted">{{ request()->has('track')?:request()->track }}</small></h1>
|
||||
<h1><a class="text-decoration-none" href="{{route('index')}}">List of Courses</a> <small
|
||||
class="text-muted">{{ request()->has('track')?:request()->track }}</small></h1>
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>
|
||||
<a href="?order=name&dir={{ request()->has('dir')? ['asc'=>'desc', 'desc'=>'asc'][request()->dir]: 'desc'}}">Name</a>
|
||||
</th>
|
||||
<th>Tracks</th>
|
||||
<th>Sync</th>
|
||||
<th>Estimate file size</th>
|
||||
@@ -16,17 +19,22 @@
|
||||
<td><img src="{{ $course->thumbnail }}" alt="{{ $course->name }}" class="img-thumbnail"
|
||||
style="width: 70px;"></td>
|
||||
<td class="align-middle">
|
||||
<a class="text-decoration-none" href="{{ route('course.index', ['course' => $course->id]) }}">{{ $course->name }}</a>
|
||||
<a class="text-decoration-none"
|
||||
href="{{ route('course.index', ['course' => $course->id]) }}">{{ $course->name }}</a>
|
||||
<p class="text-muted">
|
||||
course status: <span class="fw-lighter">{{ $course->status }}</span>
|
||||
published: <span class="fw-lighter"><abbr title="{{ $course->published_at?->format('Y-m-d') }}">{{ $course->published_at?->diffForHumans() }}</abbr></span>
|
||||
synced chapters: <span class="fw-lighter">{{ $course->chapters_to_sync }} of {{ $course->numberofchapters }}</span>
|
||||
published: <span class="fw-lighter"><a
|
||||
href="?order=published_at&dir={{ request()->has('dir')? ['asc'=>'desc', 'desc'=>'asc'][request()->dir]: 'desc'}}"><abbr
|
||||
title="{{ $course->published_at?->format('Y-m-d') }}">{{ $course->published_at?->diffForHumans() }}</abbr></a></span>
|
||||
synced chapters: <span
|
||||
class="fw-lighter">{{ $course->chapters_to_sync }} of {{ $course->numberofchapters }}</span>
|
||||
</p>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
@foreach($course->tracks as $track)
|
||||
|
||||
<a href="{{ route('index.track', ['track' => $track]) }}" class="badge rounded-pill bg-secondary text-decoration-none">{{ $track }}</a>
|
||||
<a href="{{ route('index.track', ['track' => $track]) }}"
|
||||
class="badge rounded-pill bg-secondary text-decoration-none">{{ $track }}</a>
|
||||
@endforeach
|
||||
</td>
|
||||
<td class="align-middle"><a class="btn btn-outline-primary"
|
||||
|
||||
Reference in New Issue
Block a user