Browse Source
Remove FormField from full CRUD index view
Remove FormField from full CRUD index view
Move FormField version of index view to new stub filetags/1.2.0
3 changed files with 78 additions and 24 deletions
-
58src/stubs/resources/views/full/index-formfield.stub
-
22src/stubs/resources/views/full/index.stub
-
22tests/Generators/ViewsGeneratorTest.php
@ -0,0 +1,58 @@ |
|||
@extends('layouts.app') |
|||
|
|||
@section('title', __('master.list')) |
|||
|
|||
@section('content') |
|||
<h1 class="page-header"> |
|||
<div class="pull-right"> |
|||
@can('create', new fullMstr) |
|||
{{ link_to_route('masters.create', __('master.create'), [], ['class' => 'btn btn-success']) }} |
|||
@endcan |
|||
</div> |
|||
{{ __('master.list') }} |
|||
<small>{{ __('app.total') }} : {{ $mstrCollections->total() }} {{ __('master.master') }}</small> |
|||
</h1> |
|||
<div class="row"> |
|||
<div class="col-md-12"> |
|||
<div class="panel panel-default table-responsive"> |
|||
<div class="panel-heading"> |
|||
{{ Form::open(['method' => 'get','class' => 'form-inline']) }} |
|||
{!! FormField::text('q', ['label' => __('master.search'), 'placeholder' => __('master.search_text'), 'class' => 'input-sm']) !!} |
|||
{{ Form::submit(__('master.search'), ['class' => 'btn btn-sm']) }} |
|||
{{ link_to_route('masters.index', __('app.reset')) }} |
|||
{{ Form::close() }} |
|||
</div> |
|||
<table class="table table-condensed"> |
|||
<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_link }}</td> |
|||
<td>{{ $singleMstr->description }}</td> |
|||
<td class="text-center"> |
|||
@can('view', $singleMstr) |
|||
{!! link_to_route( |
|||
'masters.show', |
|||
__('app.show'), |
|||
[$singleMstr], |
|||
['class' => 'btn btn-default btn-xs', 'id' => 'show-master-' . $singleMstr->id] |
|||
) !!} |
|||
@endcan |
|||
</td> |
|||
</tr> |
|||
@endforeach |
|||
</tbody> |
|||
</table> |
|||
<div class="panel-body">{{ $mstrCollections->appends(Request::except('page'))->render() }}</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
@endsection |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue