14 Yii::import(
'booster.widgets.TbButton');
95 if ($this->stacked ===
true) {
96 $classes[] =
'btn-group-vertical';
98 $classes[] =
'btn-group';
101 if ($this->dropup ===
true) {
102 $classes[] =
'dropup';
105 if ($this->justified ===
true) {
106 $classes[] =
'btn-group-justified';
109 if (!empty($classes)) {
110 $classes = implode(
' ', $classes);
111 if (isset($this->htmlOptions[
'class'])) {
112 $this->htmlOptions[
'class'] .=
' ' . $classes;
114 $this->htmlOptions[
'class'] = $classes;
118 $validToggles = array(self::TOGGLE_CHECKBOX, self::TOGGLE_RADIO);
120 if (isset($this->toggle) && in_array($this->toggle, $validToggles)) {
121 $this->htmlOptions[
'data-toggle'] =
'buttons';
132 echo CHtml::openTag(
'div', $this->htmlOptions);
134 foreach ($this->buttons as $button) {
135 if (isset($button[
'visible']) && $button[
'visible'] ===
false) {
139 $validToggles = array(self::TOGGLE_CHECKBOX, self::TOGGLE_RADIO);
140 if (isset($this->toggle) && in_array($this->toggle, $validToggles)) {
145 if($justifiedNotLink)
146 echo
'<div class="btn-group">';
148 $this->controller->widget(
149 'booster.widgets.TbButton',
151 'buttonType' => isset($button[
'buttonType']) ? $button[
'buttonType'] : $this->buttonType,
152 'context' => isset($button[
'context']) ? $button[
'context'] : $this->context,
153 'size' => $this->size,
154 'icon' => isset($button[
'icon']) ? $button[
'icon'] : null,
155 'label' => isset($button[
'label']) ? $button[
'label'] : null,
156 'url' => isset($button[
'url']) ? $button[
'url'] : null,
157 'active' => isset($button[
'active']) ? $button[
'active'] :
false,
158 'disabled' => isset($button[
'disabled']) ? $button[
'disabled'] :
false,
159 'items' => isset($button[
'items']) ? $button[
'items'] : array(),
160 'ajaxOptions' => isset($button[
'ajaxOptions']) ? $button[
'ajaxOptions'] : array(),
161 'htmlOptions' => isset($button[
'htmlOptions']) ? $button[
'htmlOptions'] : array(),
162 'dropdownOptions' => isset($button[
'dropdownOptions']) ? $button[
'dropdownOptions'] : array(),
163 'encodeLabel' => isset($button[
'encodeLabel']) ? $button[
'encodeLabel'] : $this->encodeLabel,
164 'tooltip' => isset($button[
'tooltip']) ? $button[
'tooltip'] :
false,
165 'tooltipOptions' => isset($button[
'tooltipOptions']) ? $button[
'tooltipOptions'] : array(),
169 if($justifiedNotLink)