Updated composer packaged, updated home view table.
This commit is contained in:
@@ -1,53 +1,43 @@
|
||||
<x-layout>
|
||||
<h1>List of Courses</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>Id</th>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Tracks</th>
|
||||
<th>Sync</th>
|
||||
<th>Chapters</th>
|
||||
<th>Published at</th>
|
||||
<th>Estimate file size</th>
|
||||
<th>Actual size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($courses as $course)
|
||||
<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 class="text-decoration-none"
|
||||
href="{{ route('course.index', ['course' => $course->id]) }}">{{ $course->name }}</a>
|
||||
</td>
|
||||
<td class="align-middle">{{ $course->status }}</td>
|
||||
<td class="align-middle">
|
||||
@foreach( explode(',', $course->tracks) as $track)
|
||||
<a href="/track/{{ $track }}" class="badge rounded-pill bg-secondary text-decoration-none">{{ $track }}</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>
|
||||
</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>
|
||||
@endforeach
|
||||
</td>
|
||||
<td class="align-middle"><a class="btn btn-outline-primary"
|
||||
href="{{ route('course.sync', ['course' => $course->id]) }}">Sync all
|
||||
chapters offline</a></td>
|
||||
<td class="align-middle">{{ $course->chapters_to_sync }} / {{ $course->numberofchapters }}</td>
|
||||
<td class="align-middle"><abbr
|
||||
title="{{ $course->published_at?->format('Y-m-d') }}">{{ $course->published_at?->diffForHumans() }}</abbr>
|
||||
</td>
|
||||
<td class="align-middle text-end pe-4">{{ $course->total_size_human }}</td>
|
||||
<td class="align-middle text-end pe-4">{{formatFileSize(folderSize(public_path('videos'.DIRECTORY_SEPARATOR.$course->id)))}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td colspan="4"></td>
|
||||
<td class="align-middle text-end pe-4">{{ formatFileSize($courses->sum('total_size')) }}</td>
|
||||
<td class="align-middle text-end pe-4">{{formatFileSize(folderSize(public_path()))}}</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user