{{-- resources/views/components/library/course-row.blade.php 课程横向列表行(用于「开放报名」与「历史课程」列表)。 Props: $course — 由 Library\CourseController 加工后的课程数组。 --}} @props(['course']) @php $teacher = $course['teacher'] ?? []; $status = $course['status'] ?? 'closed'; $statusKey = $status === 'open' ? 'course_status_open' : 'course_status_closed'; $cover = $course['cover_url'] ?? null; @endphp {{-- 缩略图 --}}
@if($cover) {{ $course['title'] }} @else {{ $course['title'] }} @endif
{{-- 主体 --}}

{{ $course['title'] }}

@if(!empty($course['summary']))
{{ $course['summary'] }}
@endif
@if(!empty($teacher['name'])) @endif @if($course['number'] > 0) {{ __('library.course_period', ['n' => $course['number']]) }} @endif {{ __('library.course_members', ['n' => $course['member_count']]) }} @if($course['start_date']) {{ $course['start_date'] }} @endif
{{-- 右侧:状态 + 报名引导 --}}
{{ __("library.{$statusKey}") }} @if($status === 'open') {{ __('library.course_signup') }} @endif