|
- <?php
-
-
-
- use yii\helpers\Html;
- use yii\grid\GridView;
- use common\models\User;
- use common\models\Producer;
- use common\models\Distribution;
-
- $this->setTitle('Taxes');
- $this->addBreadcrumb($this->getTitle());
- $this->addButton(['label' => 'Nouvelle taxe <span class="glyphicon glyphicon-plus"></span>', 'url' => 'tax-rate-admin/create', 'class' => 'btn btn-primary']);
-
- ?>
-
- <?= GridView::widget([
- 'dataProvider' => $dataProviderTaxRate,
- 'columns' => [
- 'name',
- [
- 'attribute' => 'value',
- 'value' => function ($model) {
- return $model->value . '%';
- }
- ],
- [
- 'class' => 'yii\grid\ActionColumn',
- 'template' => '{update} {delete}',
- 'headerOptions' => ['class' => 'column-actions'],
- 'contentOptions' => ['class' => 'column-actions'],
- 'buttons' => [
- 'update' => function ($url, $model) {
- return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [
- 'title' => Yii::t('app', 'Modifier'), 'class' => 'btn btn-default'
- ]);
- },
- 'delete' => function ($url, $model) {
- return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [
- 'title' => Yii::t('app', 'Supprimer'), 'class' => 'btn btn-default'
- ]);
- }
- ],
- ],
- ],
- ]); ?>
|