初始化
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
@extends('admin.layout')
|
||||
|
||||
@section('title', '论坛帖子')
|
||||
@section('page-title', '论坛帖子')
|
||||
|
||||
@section('content')
|
||||
<table class="data-table">
|
||||
<thead><tr><th>标题</th><th>版块</th><th>作者</th><th>时间</th><th class="col-op">操作</th></tr></thead>
|
||||
<tbody>
|
||||
@forelse ($threads as $t)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($t->is_pinned)<x-icon name="pin" :size="14"/> @endif
|
||||
{{ $t->title }}
|
||||
</td>
|
||||
<td>{{ $t->board?->name ?: '-' }}</td>
|
||||
<td>{{ $t->user?->name ?: '匿名' }}</td>
|
||||
<td class="muted">{{ $t->created_at->format('Y-m-d') }}</td>
|
||||
<td class="row-actions">
|
||||
<a href="{{ route('forum.thread', $t) }}" class="btn btn-sm" target="_blank"><x-icon name="arrow" :size="16"/></a>
|
||||
<form method="POST" action="{{ route('admin.forum.threads.destroy', $t) }}" onsubmit="return confirm('确认删除该帖子?')">
|
||||
@csrf @method('DELETE')<button class="btn btn-sm btn-danger"><x-icon name="trash" :size="16"/></button></form>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="5" class="muted">暂无帖子。</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $threads->links('pagination::bootstrap-5') }}
|
||||
@endsection
|
||||
Reference in New Issue
Block a user