32 lines
1.2 KiB
PHP
32 lines
1.2 KiB
PHP
@extends('admin.layout')
|
|
|
|
@section('title', '术语库管理')
|
|
@section('page-title', '术语库管理')
|
|
@section('actions')
|
|
<a href="{{ route('admin.glossary.create') }}" class="btn btn-primary btn-sm"><x-icon name="plus" :size="16"/> 新建术语</a>
|
|
@endsection
|
|
|
|
@section('content')
|
|
<table class="data-table">
|
|
<thead><tr><th>术语</th><th>分类</th><th class="col-op">操作</th></tr></thead>
|
|
<tbody>
|
|
@forelse ($terms as $t)
|
|
<tr>
|
|
<td>{{ $t->term }} <span class="muted">/ {{ $t->slug }}</span></td>
|
|
<td>{{ $t->category ?: '-' }}</td>
|
|
<td class="row-actions">
|
|
<a href="{{ route('admin.glossary.edit', $t) }}" class="btn btn-sm"><x-icon name="edit" :size="16"/></a>
|
|
<form method="POST" action="{{ route('admin.glossary.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="3" class="muted">暂无术语。</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
{{ $terms->links('pagination::bootstrap-5') }}
|
|
@endsection
|