'type' => TabularForm::INPUT_STATIC, 'label' => '', 'value' => function($model, $key) { return Html::a('<i class="glyphicon glyphicon-trash"></i>', '#', ['title' => <?php echo $generator->generateString('Delete'); ?> , 'onClick' => 'delRow(' . $key . '); return false;', 'id' => '<?php echo yii\helpers\Inflector::camel2id($relations[1]); ?> -del-btn']); }, ], ], 'gridSettings' => [ 'panel' => [ 'heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-book"></i> ' . <?php echo $generator->generateString(yii\helpers\Inflector::camel2words($relations[1])); ?> . ' </h3>', 'type' => GridView::TYPE_INFO, 'before' => false, 'footer' => false, 'after' => Html::button('<i class="glyphicon glyphicon-plus"></i>' . <?php echo $generator->generateString('Add Row'); ?> , ['type' => 'button', 'class' => 'btn btn-success kv-batch-create', 'onClick' => 'addRow()']), ] ] ]); Pjax::end(); ?>
<?php use yii\helpers\Html; use kartik\grid\GridView; /* @var $this yii\web\View */ /* @var $searchModel common\models\ArtifactTypeSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $word = yii\helpers\Inflector::camel2words(yii\helpers\Inflector::id2camel($caller)); $plural = yii\helpers\Inflector::pluralize($word); $this->title = $plural; $this->params['breadcrumbs'][] = $this->title; ?> <div class="<?php echo $caller; ?> -index"> <h1><?php echo Html::encode($this->title); ?> </h1> <div class="row"> <div class="col-md-3"> <div class="well"> <?php echo $this->render('_form', ['model' => $model, 'caller' => $caller]); ?> </div> </div>