优化功能
This commit is contained in:
@@ -2,20 +2,27 @@
|
||||
|
||||
@section('title', 'AI 教程管理')
|
||||
|
||||
@section('head')
|
||||
@include('admin.partials.modern-index-head')
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card mb-3">
|
||||
<div class="card-body d-flex flex-column flex-lg-row gap-2 align-items-lg-center justify-content-between">
|
||||
<div class="card modern-index-toolbar mb-3">
|
||||
<div class="card-body d-flex flex-column flex-lg-row gap-3 align-items-lg-center justify-content-between">
|
||||
<form method="get" action="{{ route('admin.guides.index') }}" class="d-flex flex-column flex-md-row gap-2 w-100">
|
||||
<input class="form-control" type="text" name="q" value="{{ $filters['q'] ?? '' }}" placeholder="搜索教程标题 / 正文关键词">
|
||||
<button class="btn btn-primary" type="submit"><i class="bi bi-search me-1"></i>搜索</button>
|
||||
</form>
|
||||
<a class="btn btn-success" href="{{ route('admin.guides.create') }}"><i class="bi bi-plus-circle me-1"></i>新建教程</a>
|
||||
</div>
|
||||
<div class="card-footer bg-transparent border-0 pt-0">
|
||||
<div class="toolbar-meta">共 {{ number_format($items->total()) }} 条教程记录</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card modern-index-card">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-vcenter card-table">
|
||||
<table class="table table-vcenter card-table modern-index-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>标题</th>
|
||||
@@ -29,16 +36,20 @@
|
||||
@forelse($items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
<div class="fw-semibold">{{ $item->title }}</div>
|
||||
<div class="text-muted small">{{ $item->excerpt }}</div>
|
||||
<div class="modern-index-title">{{ $item->title }}</div>
|
||||
<div class="modern-index-summary">{{ $item->excerpt }}</div>
|
||||
</td>
|
||||
<td>{{ $item->difficulty }}</td>
|
||||
<td><span class="badge bg-azure-lt text-azure-fg">{{ $item->status?->value ?? '-' }}</span></td>
|
||||
<td>{{ $item->difficulty ?: '-' }}</td>
|
||||
<td>@include('admin.partials.status-badge', ['status' => $item->status])</td>
|
||||
<td>{{ $item->updated_at?->format('Y-m-d H:i') }}</td>
|
||||
<td class="text-end"><a class="btn btn-sm btn-outline-primary" href="{{ route('admin.guides.edit', $item) }}">编辑</a></td>
|
||||
<td class="text-end">
|
||||
<a class="btn btn-sm btn-outline-primary" href="{{ route('admin.guides.edit', $item) }}">编辑</a>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="5" class="text-center text-muted py-4">暂无教程数据</td></tr>
|
||||
<tr>
|
||||
<td colspan="5" class="text-center text-muted py-5">暂无教程数据,先新增一条内容吧。</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -46,3 +57,4 @@
|
||||
<div class="card-footer">{{ $items->links() }}</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
Reference in New Issue
Block a user