<?php use yii\helpers\Html; use yii\grid\GridView; use bedezign\yii2\audit\models\AuditErrorSearch; /* @var $this yii\web\View */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('audit', 'Errors'); $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Audit'), 'url' => ['default/index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="audit-error"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}'], ['attribute' => 'id', 'options' => ['width' => '80px']], ['attribute' => 'entry_id', 'class' => 'yii\\grid\\DataColumn', 'value' => function ($data) { return $data->entry_id ? Html::a($data->entry_id, ['entry/view', 'id' => $data->entry_id]) : ''; }, 'format' => 'raw'], 'message', ['attribute' => 'code', 'options' => ['width' => '80px']], ['filter' => AuditErrorSearch::fileFilter(), 'attribute' => 'file'], ['attribute' => 'line', 'options' => ['width' => '80px']], ['attribute' => 'hash', 'options' => ['width' => '100px']], ['attribute' => 'created', 'options' => ['width' => '150px']]]]); ?> </div>
<?php /* @var $panel yii\debug\panels\LogPanel */ /* @var $searchModel yii\debug\models\search\Log */ /* @var $dataProvider yii\data\ArrayDataProvider */ use yii\helpers\Html; use yii\grid\GridView; use bedezign\yii2\audit\models\AuditErrorSearch; echo Html::tag('h1', $panel->name); echo GridView::widget(['dataProvider' => $dataProvider, 'id' => 'log-panel-detailed-grid', 'options' => ['class' => 'detail-grid-view table-responsive'], 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}', 'buttons' => ['view' => function ($url, $model) { return Html::a(Html::tag('span', '', ['class' => 'glyphicon glyphicon-eye-open']), ['error/view', 'id' => $model->id]); }], 'options' => ['width' => '30px']], ['attribute' => 'id', 'options' => ['width' => '80px']], 'message', ['attribute' => 'code', 'options' => ['width' => '80px']], ['attribute' => 'file', 'filter' => AuditErrorSearch::fileFilter()], ['attribute' => 'line', 'options' => ['width' => '80px']], ['attribute' => 'hash', 'options' => ['width' => '100px']]]]);