YiiBooster icon indicating copy to clipboard operation
YiiBooster copied to clipboard

TbPanel with one single button

Open beatep opened this issue 9 years ago • 1 comments

Hi, I tried to create a TbPanel with a single button with a url:

$this->beginWidget('booster.widgets.TbPanel',
    array(
        'title' => 'SomeTitle',
        'headerButtons' => array(
            array(
                'class' => 'booster.widgets.TbButton',
                'label' => 'Neu',
                'context' => 'primary',
                'size' => 'small',
                'url' => '/someurl',
            ),
        )
    )
)

With this code I get blue button, but w/o a link. If I add buttonType, I get a link, but it is no longer a blue button.

$this->beginWidget('booster.widgets.TbPanel',
    array(
        'title' => 'SomeTitle',
        'headerButtons' => array(
            array(
                'class' => 'booster.widgets.TbButton',
                'label' => 'Neu',
                'context' => 'primary',
                'size' => 'small',
                'buttonType' =>'link',
                'url' => '/someurl',
            ),
        )
    )
)

Is this a bug or a feature?

beatep avatar Mar 13 '15 14:03 beatep