标签: yii-booster

如何在yiibooster gridview中编辑标题?

我开始使用yiibooster在gridview简单添加上进行就地编辑

$columns[] = array(
            'name'  => $field->name,
            'value' => array($this, 'cellValue'),
            'class' => 'bootstrap.widgets.TbJEditableColumn',
            'jEditableOptions' => array(
                'type' => 'text',
                // very important to get the attribute to update on the server!
                'submitdata' => array('field_id'=>$field->id),
                'width' => '100%',
                'placeholder' => Yii::t('sms', 'click for edit'),
            )
        );
Run Code Online (Sandbox Code Playgroud)

如何以相同的方式编辑表头?

编辑: 我的解决方案.这个对我有用. http://pastebin.com/0NzHMgEr

yii cgridview yii-booster

12
推荐指数
1
解决办法
1489
查看次数

Yiibooster TbButton url链接不起作用

我希望按钮链接到另一个网页,我在我的视图文件中使用以下代码:

    $this->widget('booster.widgets.TbButton',array(
    'context'=>'primary',
    'label'=>'button',
    'url'=>'www.baidu.com'
    ));
Run Code Online (Sandbox Code Playgroud)

以及它生成的html如下:

<button class="btn btn-primary" id="yw2" name="yt0" type="button">button</button>
Run Code Online (Sandbox Code Playgroud)

以下代码有效,但显示为字符串:

echo CHtml::link(CHtml::encode('button'),'www.baidu.com')
Run Code Online (Sandbox Code Playgroud)

谁有人可以帮忙?

php yii yii-booster

2
推荐指数
1
解决办法
3224
查看次数

标签 统计

yii ×2

yii-booster ×2

cgridview ×1

php ×1