-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
41 lines (39 loc) · 1.24 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* author: yidashi
* Date: 2016/1/11
* Time: 18:01.
*/
use yii\helpers\Html;
use yii\widgets\ActiveForm;
$this->title = '模块配置:' .' '.$model->name;
$this->params['breadcrumbs'][] = ['label' => '插件', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="article-index">
<?php
$form = ActiveForm::begin();
echo \yii\grid\GridView::widget([
'dataProvider' => $dataProvider,
'layout' => '{items}',
'columns' => [
'desc:text:配置描述',
[
'attribute' => 'value',
'label' => '配置值',
'value' => function($model, $key, $index) use ($form) {
return $form->field($model, "[$index]value")->label(false)->widget(\common\widgets\dynamicInput\DynamicInputWidget::className(),[
'data' => $model->extra,
'type' => $model->type
]);
},
'format' => 'raw',
'options' => ['style' => 'width:60%']
],
'name:text:配置名'
]
]);
echo Html::submitButton('提交', ['class' => 'btn btn-primary btn-flat']);
ActiveForm::end();
?>
</div>