You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.7 KiB

@extends('layouts.app')
@section('title', __('master.list'))
@section('content')
<div class="mb-3">
<div class="float-right">
@can('create', new fullMstr)
{{ link_to_route('masters.index', __('master.create'), ['action' => 'create'], ['class' => 'btn btn-success']) }}
@endcan
</div>
<h1 class="page-title">{{ __('master.list') }} <small>{{ __('app.total') }} : {{ $mstrCollections->total() }} {{ __('master.master') }}</small></h1>
</div>
<div class="row">
<div class="col-md-8">
<div class="card table-responsive">
<div class="card-header">
{{ Form::open(['method' => 'get', 'class' => 'form-inline']) }}
{!! FormField::text('q', ['label' => __('master.search'), 'placeholder' => __('master.search_text'), 'class' => 'mx-sm-2']) !!}
{{ Form::submit(__('master.search'), ['class' => 'btn btn-secondary']) }}
{{ link_to_route('masters.index', __('app.reset'), [], ['class' => 'btn btn-link']) }}
{{ Form::close() }}
</div>
<table class="table table-sm">
<thead>
<tr>
<th class="text-center">{{ __('app.table_no') }}</th>
<th>{{ __('master.name') }}</th>
<th>{{ __('master.description') }}</th>
<th class="text-center">{{ __('app.action') }}</th>
</tr>
</thead>
<tbody>
@foreach($mstrCollections as $key => $singleMstr)
<tr>
<td class="text-center">{{ $mstrCollections->firstItem() + $key }}</td>
<td>{{ $singleMstr->name }}</td>
<td>{{ $singleMstr->description }}</td>
<td class="text-center">
@can('update', $singleMstr)
{{ link_to_route(
'masters.index',
__('app.edit'),
['action' => 'edit', 'id' => $singleMstr->id] + Request::only('page', 'q'),
['id' => 'edit-master-'.$singleMstr->id]
) }}
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="card-body">{{ $mstrCollections->appends(Request::except('page'))->render() }}</div>
</div>
</div>
<div class="col-md-4">
@if(Request::has('action'))
@include('masters.forms')
@endif
</div>
</div>
@endsection