Browse Source

Fixes #174: Added `yii\bootstrap\Tabs::renderPanes()` to allow extending the class to manipulate the content between the tabs and the content

tags/2.0.7
Thiago Talma 8 years ago committed by Alexander Makarov
parent
commit
1629f04186
  1. 1
      CHANGELOG.md
  2. 15
      Tabs.php

1
CHANGELOG.md

@ -11,6 +11,7 @@ Yii Framework 2 bootstrap extension Change Log
- Enh #113: Allow URLs instead of content for Tab Widget Dropdown items (Okeanos)
- Bug #143: Fixed `yii\bootstrap\Nav` to use tags according to bootstrap docs (PowerGamer1)
- Bug #162: Fixed `yii\bootstrap\Nav` not taking explicit `active` into account when `activateItems` is off (samdark)
- Enh #174: Added `yii\bootstrap\Tabs::renderPanes()` to allow extending the class to manipulate the content between the tabs and the content (thiagotalma)
2.0.6 March 17, 2016
--------------------

15
Tabs.php

@ -213,8 +213,7 @@ class Tabs extends Widget
$headers[] = Html::tag('li', $header, $headerOptions);
}
return Html::tag('ul', implode("\n", $headers), $this->options)
. ($this->renderTabContent ? "\n" . Html::tag('div', implode("\n", $panes), ['class' => 'tab-content']) : '');
return Html::tag('ul', implode("\n", $headers), $this->options) . $this->renderPanes($panes);
}
/**
@ -279,4 +278,16 @@ class Tabs extends Widget
return $itemActive;
}
/**
* Renders tab panes.
*
* @param array $panes
* @return string the rendering result.
* @since 2.0.7
*/
public function renderPanes($panes)
{
return $this->renderTabContent ? "\n" . Html::tag('div', implode("\n", $panes), ['class' => 'tab-content']) : '';
}
}

Loading…
Cancel
Save