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.

58 lines
2.5 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.create', __('master.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-12">
<div class="card">
<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 table-responsive-sm table-hover">
<thead>
<tr>
<th class="text-center">{{ __('app.table_no') }}</th>
<th>{{ __('master.title') }}</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->title_link }}</td>
<td>{{ $singleMstr->description }}</td>
<td class="text-center">
@can('view', $singleMstr)
{{ link_to_route(
'masters.show',
__('app.show'),
[$singleMstr],
['id' => 'show-master-' . $singleMstr->id]
) }}
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="card-body">{{ $mstrCollections->appends(Request::except('page'))->render() }}</div>
</div>
</div>
</div>
@endsection