67 lines
2.4 KiB
PHP
67 lines
2.4 KiB
PHP
@extends('layouts.admin')
|
|
|
|
@section('title', '首页配置')
|
|
|
|
@section('head')
|
|
@include('admin.partials.modern-index-head')
|
|
@endsection
|
|
|
|
@section('page_subtitle', '二级菜单化管理首页模块:先选模块,再进入列表、新增与修改。')
|
|
|
|
@section('content')
|
|
<div class="card modern-index-toolbar mb-3">
|
|
<div class="card-body d-flex flex-column flex-lg-row align-items-lg-center justify-content-between gap-2">
|
|
<div>
|
|
<h3 class="card-title mb-1">首页配置模块</h3>
|
|
<div class="toolbar-meta">请选择一个模块进入二级配置页。</div>
|
|
</div>
|
|
<div class="toolbar-meta">共 {{ number_format($modules->count()) }} 个模块</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card modern-index-card">
|
|
<div class="table-responsive">
|
|
<table class="table table-vcenter card-table modern-index-table">
|
|
<thead>
|
|
<tr>
|
|
<th>模块</th>
|
|
<th>键名</th>
|
|
<th>状态</th>
|
|
<th>条目数</th>
|
|
<th>排序</th>
|
|
<th class="text-end">操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($modules as $module)
|
|
<tr>
|
|
<td>
|
|
<div class="modern-index-title">{{ $module->name }}</div>
|
|
<div class="modern-index-summary">{{ $module->title ?: '未设置模块标题' }}</div>
|
|
</td>
|
|
<td><code>{{ $module->module_key }}</code></td>
|
|
<td>
|
|
@if($module->enabled)
|
|
<span class="badge bg-green-lt text-green-fg">启用</span>
|
|
@else
|
|
<span class="badge bg-secondary-lt">停用</span>
|
|
@endif
|
|
</td>
|
|
<td>{{ number_format((int) $module->items_count) }}</td>
|
|
<td>{{ (int) $module->sort_order }}</td>
|
|
<td class="text-end">
|
|
<a class="btn btn-sm btn-outline-primary" href="{{ route('admin.settings.show', $module) }}">进入配置</a>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="6" class="text-center text-muted py-5">暂无模块数据。</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|