krgm.so-manager-dev.com/resources/views/admin/psection/list.blade.php
kin.rinzen 2b8f80fe50
All checks were successful
Deploy main / deploy (push) Successful in 22s
「指摘対応」車種区分マスタ
2025-10-10 17:42:53 +09:00

109 lines
4.5 KiB
PHP
Raw 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('psections_add') }}" class="btn btn-sm btn-default">新規</a>
<button type="button" class="btn btn-sm btn-default mr10" id="delete">削除</button>
</div>
{{-- ページネーション --}}
<div class="d-flex justify-content-end mb-3">
{{ $list->appends([
'sort' => $sort ?? '',
'sort_type' => $sort_type ?? ''
])->links('pagination') }}
</div>
{{-- フラッシュメッセージ --}}
@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('success') }}
</div>
@endif
@if(Session::has('error'))
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('error') }}
</div>
@endif
@if ($list->count() > 0)
<form id="form_delete" method="POST" action="{{ route('psections_delete') }}">
@csrf
<div class="table-responsive">
<table class="table table-bordered dataTable text-nowrap">
<thead class="thead-light">
<tr>
{{-- 統合列:チェック + 編集 --}}
<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>
{{-- ソート対象列 --}}
<th class="sorting {{ ($sort=='psection_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}"
sort="psection_id">
<span>車種区分ID</span>
</th>
<th class="sorting {{ ($sort=='psection_subject') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}"
sort="psection_subject">
<span>車種区分名</span>
</th>
</tr>
</thead>
<tbody class="bg-white">
@foreach ($list as $item)
<tr>
{{-- 統合セル:チェック + 編集 --}}
<td style="background: #faebd7;">
<input type="checkbox" name="pk[]" value="{{ $item->psection_id }}">
<a href="{{ route('psections_edit', ['id' => $item->psection_id]) }}"
class="btn btn-sm btn-default ml10">編集</a>
</td>
{{-- データ列 --}}
<td style="text-align:right;">{{ $item->psection_id }}</td>
<td>{{ $item->psection_subject }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</form>
@endif
</div>
</section>
@endsection