krgm.so-manager-dev.com/resources/views/admin/neighbor_stations/list.blade.php

122 lines
6.5 KiB
PHP

@extends('layouts.app')
@section('title', '[東京都|〇〇駐輪場] 近傍駅マスタ')
@section('content')
<!-- Content Header -->
<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="{{ route('home') }}">XX様info(ホーム)</a></li>
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
<li class="breadcrumb-item active">近傍駅マスタ</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<section class="content">
<div class="container-fluid">
<form action="{{ route('neighbor_stations') }}" method="POST" id="list-form">
@csrf
<input type="hidden" name="sort" value="{{ $sort ?? '' }}">
<input type="hidden" name="sort_type" value="{{ $sort_type ?? '' }}">
</form>
<div class="container-fluid mb20">
<button type="button" class="btn btn-sm btn-default mr10" onclick="location.href='{{ route('neighbor_station_add') }}'"> 新規</button>
<button type="button" class="btn btn-sm btn-default mr10" id="delete">削除</button>
<button type="submit" class="btn btn-sm btn-default mr10" form="form_export">{{ __('CSV出力') }}</button>
{{ $stations->appends(['sort' => $sort ?? '', 'sort_type' => $sort_type ?? ''])->links('pagination') }}
</div>
<!-- メッセージ表示 -->
<div class="col-lg-12">
@if(session('success'))
<div class="alert alert-success alert-dismissible">{{ session('success') }}</div>
@elseif(session('error'))
<div class="alert alert-danger alert-dismissible">{{ session('error') }}</div>
@endif
</div>
<div class="col-lg-12 row sample03-wrapper no_padding_right mb20">
<!-- 左側チェックボックス&編集ボタン -->
<div class="col-xl-2 col-lg-2 col-md-2 col-sm-3 col-xs-3 table_left">
<form action="{{ route('neighbor_stations_delete') }}" method="POST" id="form_delete">
@csrf
<table class="table dataTable">
<thead>
<tr>
<th><input type="checkbox" class="minimal m-0" id="checkbox_all"></th>
</tr>
</thead>
<tbody>
@foreach($stations as $station)
<tr>
<td>
<input type="checkbox" class="minimal m-0 checkbox" value="{{ $station->station_id }}" name="pk[]">
<div class="btn_action">
<a href="{{ route('neighbor_station_edit', ['id' => $station->station_id]) }}" class="btn btn-sm btn-default ml10">{{ __('編集') }}</a>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
<!-- 右側データテーブル -->
<div class="col-lg-10 col-xl-10 col-md-10 col-sm-9 col-xs-9 table_right no_padding_right">
<div class="scroll">
<table class="table dataTable">
<thead>
<tr>
<th class="sorting {{ ($sort=='station_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="station_id">
<span>近傍駅ID</span>
</th>
<th class="sorting {{ ($sort=='park_id') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="park_id">
<span>駐車場ID</span>
</th>
<th class="sorting {{ ($sort=='station_neighbor_station') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="station_neighbor_station">
<span>近傍駅</span>
</th>
<th class="sorting {{ ($sort=='station_name_ruby') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="station_name_ruby">
<span>近傍駅ふりがな</span>
</th>
<th class="sorting {{ ($sort=='station_route_name') ? ($sort_type=='asc'?'sorting_asc':'sorting_desc') : '' }}" sort="station_route_name">
<span>路線名</span>
</th>
<th><span>近傍駅座標(緯度)</span></th>
<th><span>近傍駅座標(経度)</span></th>
</tr>
</thead>
<tbody>
@foreach($stations as $station)
<tr>
<td class="sm-item text-left">{{ $station->station_id }}</td>
<td class="sm-item text-left">{{ $station->park_id }}</td>
<td class="sm-item text-left">{{ $station->station_neighbor_station }}</td>
<td class="sm-item text-left">{{ $station->station_name_ruby }}</td>
<td class="sm-item text-left">{{ $station->station_route_name }}</td>
<td class="sm-item text-left">{{ $station->station_latitude }}</td>
<td class="sm-item text-left">{{ $station->station_longitude }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
<form action="{{ route('neighbor_stations_export') }}" method="GET" id="form_export"></form>
@endsection