1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-18 04:12:00 +02:00

e107 News Infopanel now includes latest plugins/themes. Online panel now displays user language when multi-language tables are in use.

This commit is contained in:
Cameron
2016-01-14 08:28:17 -08:00
parent 796f5fa95c
commit 60be9aa37f
4 changed files with 123 additions and 13 deletions

View File

@@ -208,7 +208,7 @@ class e_form
*/
function tabs($array,$options = array())
{
$initTab = varset($options['active'],false);
$text ='
<!-- Nav tabs -->
<ul class="nav nav-tabs">';
@@ -216,18 +216,25 @@ class e_form
$c = 0;
foreach($array as $key=>$tab)
{
if($c == 0 & $initTab == false)
{
$initTab = $key;
}
if(is_numeric($key))
{
$key = 'tab-'.$this->name2id($tab['caption']);
}
$active = ($c == 0) ? ' class="active"' : '';
$active = ($key ==$initTab) ? ' class="active"' : '';
$text .= '<li'.$active.'><a href="#'.$key.'" data-toggle="tab">'.$tab['caption'].'</a></li>';
$c++;
}
$text .= '</ul>';
$initTab = varset($options['active'],false);
$text .= '
<!-- Tab panes -->
<div class="tab-content">';
@@ -235,12 +242,19 @@ class e_form
$c=0;
foreach($array as $key=>$tab)
{
if(is_numeric($key))
{
$key = 'tab-'.$this->name2id($tab['caption']);
}
if($c == 0 & $initTab == false)
{
$initTab = $key;
}
$active = ($c == 0) ? ' active' : '';
$active = ($key == $initTab) ? ' active' : '';
$text .= '<div class="tab-pane'.$active.'" id="'.$key.'">'.$tab['text'].'</div>';
$c++;
}