setTitle('Tranches de prix');
$this->addBreadcrumb($this->getTitle());
$this->addButton(['label' => 'Nouvelle tranche de prix ', 'url' => 'producer-price-range-admin/create', 'class' => 'btn btn-primary']);
?>
= GridView::widget([
'dataProvider' => $dataProviderProducerPriceRange,
'columns' => [
[
'attribute' => 'range_begin',
'value' => function ($model) {
return Price::format($model->range_begin);
}
],
[
'attribute' => 'range_end',
'value' => function ($model) {
if($model->range_end) {
return Price::format($model->range_end);
}
return '';
}
],
[
'attribute' => 'price',
'value' => function ($model) {
return Price::format($model->price);
}
],
[
'class' => 'yii\grid\ActionColumn',
'template' => '{update} {delete}',
'headerOptions' => ['class' => 'column-actions'],
'contentOptions' => ['class' => 'column-actions'],
'buttons' => [
'update' => function ($url, $model) {
return Html::a('', $url, [
'title' => 'Modifier', 'class' => 'btn btn-default'
]);
},
'delete' => function ($url, $model) {
return Html::a('', $url, [
'title' => 'Supprimer', 'class' => 'btn btn-default'
]);
}
],
],
],
]); ?>