54 lines
1.9 KiB
Smarty
54 lines
1.9 KiB
Smarty
{extends file=$smarty.current_dir|cat:'/../extends.tpl'}
|
|
{use class="yii\helpers\Url"}
|
|
{use class="yii\grid\GridView"}
|
|
{use class="app\assets\VehicleAsset"}
|
|
{VehicleAsset::register($this)|void}
|
|
{block name='content'}
|
|
<div class="text-left">
|
|
<button class="btn btn-primary" onclick="_form(this);" data-href="{Url::to(['create'])}">
|
|
<i class="fa fa-plus"></i> Thêm mới
|
|
</button>
|
|
</div>
|
|
<br>
|
|
{GridView::widget([
|
|
'dataProvider' => $dataProvider,
|
|
'filterModel' => $searchModel,
|
|
'layout'=> \app\helpers\VehicleGrid::getLayout(),
|
|
'tableOptions' => [
|
|
'class' => 'table table-striped table-bordered',
|
|
'style' => 'background:#fff;min-width:700px;'
|
|
],
|
|
'columns' => [
|
|
['class' => 'yii\grid\SerialColumn'],
|
|
'plate',
|
|
'type',
|
|
'company',
|
|
'vehicle_type',
|
|
[
|
|
'attribute' => "driver",
|
|
'format' => 'raw',
|
|
'value' => \app\helpers\VehicleGrid::driver()
|
|
],
|
|
[
|
|
'attribute' => "telephone",
|
|
'format' => 'raw',
|
|
'value' => \app\helpers\VehicleGrid::telephone()
|
|
],
|
|
[
|
|
'attribute' => "indentity_card",
|
|
'format' => 'raw',
|
|
'value' => \app\helpers\VehicleGrid::card()
|
|
],
|
|
[
|
|
'template'=> \app\helpers\VehicleGrid::actionTemplate(),
|
|
'class' => 'yii\grid\ActionColumn',
|
|
'contentOptions' => ['class' => 'text-center'],
|
|
'headerOptions' => ['style' => 'width:8%'],
|
|
'buttons'=>[
|
|
"update" => \app\helpers\VehicleGrid::update(),
|
|
"delete" => \app\helpers\VehicleGrid::delete()
|
|
]
|
|
]
|
|
]
|
|
])}
|
|
{/block} |