krgm.so-manager-dev.com/resources/views/admin/psection/list.blade.php
ou.zaikou e1629913bd 初回コミット
Signed-off-by:  ou.zaikou<caihaoweng@gmail.com>
2025-08-21 23:09:40 +09:00

103 lines
5.1 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layouts.app')
@section('title', '車種区分マスタ')
@section('content')
{{-- コンテンツヘッダー(パンくず) --}}
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-lg-6">
<h1 class="m-0 text-dark">車種区分マスタ</h1>
</div>
<div class="col-lg-6">
<ol class="breadcrumb float-sm-right text-sm">
<li class="breadcrumb-item"><a href="{{ url('/home') }}">ホーム</a></li>
<li class="breadcrumb-item active">車種区分マスタ</li>
</ol>
</div>
</div>
</div>
</div>
<section class="content">
<div class="container-fluid">
{{-- アクションボタン(市区マスタ準拠) --}}
<div class="mb-3">
<a href="{{ route('psection_add') }}" class="btn btn-sm btn-primary">新規</a>
<button type="submit" form="deleteForm" class="btn btn-sm btn-danger ml-2"
onclick="return confirm('選択した区分を削除しますか?');">削除</button>
</div>
@if ($list->count() > 0)
<form id="deleteForm" method="POST" action="{{ route('psection_delete') }}">
@csrf
<div class="table-responsive">
<table class="table table-bordered table-hover" style="min-width:600px;">
<thead class="thead-light">
<tr>
{{-- 統合列:チェック + 編集(背景色は #faebd7 --}}
<th style="width:140px;">
<input type="checkbox" onclick="$('input[name*=\'pk\']').prop('checked', this.checked);">
<span class="text-muted" style="font-weight:normal;"></span>
</th>
{{-- 表頭ソート対応ID / 名称) --}}
<th style="width:140px; text-align:center;">
<a href="{{ route('psection', ['sort' => 'id', 'direction' => ($sort=='id' && $direction=='asc')?'desc':'asc']) }}"
style="color:inherit; text-decoration:none;">
車種区分ID
@if($sort == 'id')
@if($direction == 'asc')
<span style="font-size:1.0em;">&#9650;</span>
@else
<span style="font-size:1.0em;">&#9660;</span>
@endif
@endif
</a>
</th>
<th style="text-align:center;">
<a href="{{ route('psection', ['sort' => 'subject', 'direction' => ($sort=='subject' && $direction=='asc')?'desc':'asc']) }}"
style="color:inherit; text-decoration:none;">
車種区分名
@if($sort == 'subject')
@if($direction == 'asc')
<span style="font-size:1.0em;">&#9650;</span>
@else
<span style="font-size:1.0em;">&#9660;</span>
@endif
@endif
</a>
</th>
</tr>
</thead>
<tbody>
@foreach ($list as $item)
<tr>
{{-- 統合セル:チェック + 編集(市区マスタの老書式に合わせる) --}}
<td style="background: #faebd7;">
<input type="checkbox" name="pk[]" value="{{ $item->psection_id }}">
<a href="{{ route('psection_edit', ['id' => $item->psection_id]) }}"
class="btn btn-sm btn-outline-primary ml-2">編集</a>
</td>
{{-- データ列 --}}
<td style="text-align:right;">{{ $item->psection_id }}</td>
<td>{{ $item->psection_subject }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</form>
@else
{{-- データ無し表示 --}}
<div class="alert alert-info mt-4">表示するデータがありません。</div>
@endif
</div>
</section>
@endsection