|
|
|
@ -15,23 +15,23 @@ class ViewsGeneratorTest extends TestCase |
|
|
|
$this->assertFileExists($indexViewPath); |
|
|
|
$indexViewContent = "@extends('layouts.app')
|
|
|
|
|
|
|
|
@section('title', trans('{$this->single_model_var_name}.list')) |
|
|
|
@section('title', trans('{$this->lang_name}.list')) |
|
|
|
|
|
|
|
@section('content') |
|
|
|
<div class=\"pull-right\">
|
|
|
|
{{ link_to_route('{$this->table_name}.index', trans('{$this->single_model_var_name}.create'), ['action' => 'create'], ['class' => 'btn btn-success']) }} |
|
|
|
{{ link_to_route('{$this->table_name}.index', trans('{$this->lang_name}.create'), ['action' => 'create'], ['class' => 'btn btn-success']) }} |
|
|
|
</div> |
|
|
|
<h3 class=\"page-header\">
|
|
|
|
{{ trans('{$this->single_model_var_name}.list') }} |
|
|
|
<small>{{ trans('app.total') }} : {{ \${$this->table_name}->total() }} {{ trans('{$this->single_model_var_name}.{$this->single_model_var_name}') }}</small> |
|
|
|
{{ trans('{$this->lang_name}.list') }} |
|
|
|
<small>{{ trans('app.total') }} : {{ \${$this->collection_model_var_name}->total() }} {{ trans('{$this->lang_name}.{$this->single_model_var_name}') }}</small> |
|
|
|
</h3> |
|
|
|
<div class=\"row\">
|
|
|
|
<div class=\"col-md-8\">
|
|
|
|
<div class=\"panel panel-default table-responsive\">
|
|
|
|
<div class=\"panel-heading\">
|
|
|
|
{{ Form::open(['method' => 'get','class' => 'form-inline']) }} |
|
|
|
{!! FormField::text('q', ['value' => request('q'), 'label' => trans('{$this->single_model_var_name}.search'), 'class' => 'input-sm']) !!} |
|
|
|
{{ Form::submit(trans('{$this->single_model_var_name}.search'), ['class' => 'btn btn-sm']) }} |
|
|
|
{!! FormField::text('q', ['value' => request('q'), 'label' => trans('{$this->lang_name}.search'), 'class' => 'input-sm']) !!} |
|
|
|
{{ Form::submit(trans('{$this->lang_name}.search'), ['class' => 'btn btn-sm']) }} |
|
|
|
{{ link_to_route('{$this->table_name}.index', trans('app.reset')) }} |
|
|
|
{{ Form::close() }} |
|
|
|
</div> |
|
|
|
@ -39,15 +39,15 @@ class ViewsGeneratorTest extends TestCase |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th class=\"text-center\">{{ trans('app.table_no') }}</th>
|
|
|
|
<th>{{ trans('{$this->single_model_var_name}.name') }}</th> |
|
|
|
<th>{{ trans('{$this->single_model_var_name}.description') }}</th> |
|
|
|
<th>{{ trans('{$this->lang_name}.name') }}</th> |
|
|
|
<th>{{ trans('{$this->lang_name}.description') }}</th> |
|
|
|
<th class=\"text-center\">{{ trans('app.action') }}</th>
|
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
@foreach(\${$this->table_name} as \$key => \${$this->single_model_var_name}) |
|
|
|
@foreach(\${$this->collection_model_var_name} as \$key => \${$this->single_model_var_name}) |
|
|
|
<tr> |
|
|
|
<td class=\"text-center\">{{ \${$this->table_name}->firstItem() + \$key }}</td>
|
|
|
|
<td class=\"text-center\">{{ \${$this->collection_model_var_name}->firstItem() + \$key }}</td>
|
|
|
|
<td>{{ \${$this->single_model_var_name}->name }}</td> |
|
|
|
<td>{{ \${$this->single_model_var_name}->description }}</td> |
|
|
|
<td class=\"text-center\">
|
|
|
|
@ -68,7 +68,7 @@ class ViewsGeneratorTest extends TestCase |
|
|
|
@endforeach |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
<div class=\"panel-body\">{{ \${$this->table_name}->appends(Request::except('page'))->render() }}</div>
|
|
|
|
<div class=\"panel-body\">{{ \${$this->collection_model_var_name}->appends(Request::except('page'))->render() }}</div>
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class=\"col-md-4\">
|
|
|
|
@ -91,7 +91,7 @@ class ViewsGeneratorTest extends TestCase |
|
|
|
{!! Form::open(['route' => '{$this->table_name}.store']) !!} |
|
|
|
{!! FormField::text('name', ['required' => true]) !!} |
|
|
|
{!! FormField::textarea('description') !!} |
|
|
|
{!! Form::submit(trans('{$this->single_model_var_name}.create'), ['class' => 'btn btn-success']) !!} |
|
|
|
{!! Form::submit(trans('{$this->lang_name}.create'), ['class' => 'btn btn-success']) !!} |
|
|
|
{{ link_to_route('{$this->table_name}.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) }} |
|
|
|
{!! Form::close() !!} |
|
|
|
@endif |
|
|
|
@ -105,15 +105,15 @@ class ViewsGeneratorTest extends TestCase |
|
|
|
@if (request('page')) |
|
|
|
{{ Form::hidden('page', request('page')) }} |
|
|
|
@endif |
|
|
|
{!! Form::submit(trans('{$this->single_model_var_name}.update'), ['class' => 'btn btn-success']) !!} |
|
|
|
{!! Form::submit(trans('{$this->lang_name}.update'), ['class' => 'btn btn-success']) !!} |
|
|
|
{{ link_to_route('{$this->table_name}.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) }} |
|
|
|
{!! Form::close() !!} |
|
|
|
@endif |
|
|
|
@if (Request::get('action') == 'delete' && \$editable{$this->model_name}) |
|
|
|
<div class=\"panel panel-default\">
|
|
|
|
<div class=\"panel-heading\"><h3 class=\"panel-title\">{{ trans('{$this->single_model_var_name}.delete') }}</h3></div>
|
|
|
|
<div class=\"panel-heading\"><h3 class=\"panel-title\">{{ trans('{$this->lang_name}.delete') }}</h3></div>
|
|
|
|
<div class=\"panel-body\">
|
|
|
|
<label class=\"control-label\">{{ trans('{$this->single_model_var_name}.name') }}</label>
|
|
|
|
<label class=\"control-label\">{{ trans('{$this->lang_name}.name') }}</label>
|
|
|
|
<p>{{ \$editable{$this->model_name}->name }}</p> |
|
|
|
{!! \$errors->first('{$this->single_model_var_name}_id', '<span class=\"form-error small\">:message</span>') !!} |
|
|
|
</div> |
|
|
|
|