diff options
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/guiconfig.inc | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc index 77f549e..4e9e16b 100644 --- a/src/usr/local/www/guiconfig.inc +++ b/src/usr/local/www/guiconfig.inc @@ -1073,9 +1073,10 @@ function display_top_tabs(& $tab_array, $no_drop_down = false, $type = 'pills') // If the character count of the tab names is > 670 // then show a select item dropdown menubox. - if ($tabcharcount > $tab_array_char_limit): ?> + if ($tabcharcount > $tab_array_char_limit) { echo gettext("Currently viewing: "); echo "<select name=\"TabSelect\" onchange=\"tabs_will_go(this)\">\n"; + foreach ($tab_array as $ta) { if ($ta[1] == "true") $selected = " selected=\"selected\""; @@ -1085,19 +1086,27 @@ function display_top_tabs(& $tab_array, $no_drop_down = false, $type = 'pills') // echo "<option onclick=\"document.location='{$ta[2]}';\"{$selected}>{$ta['0']}</option>\n"; echo "<option value=\"{$ta[2]}\"{$selected}>{$ta['0']}</option>\n"; } + echo "</select>\n<p> </p>"; echo "<script type=\"text/javascript\">"; echo "\n//<![CDATA[\n"; echo " function tabs_will_go(obj){ document.location = obj.value; }\n"; echo "//]]>\n"; echo "</script>"; -<? else: ?> - <ul class="nav nav-<?= $type ?>"> - <?php foreach ($tab_array as $ta): ?> - <li role="presentation"<?=($ta[1] ? ' class="active"' : '')?>><a href="<?=$ta[2]?>"><?=$ta[0]?></a></li> - <?php endforeach; ?> - </ul> -<?php endif; + } else { + echo '<ul class="nav nav-' . $type . '">'; + + foreach ($tab_array as $ta) { + echo '<li role="presentation"'; + if ($ta[1]) { + echo ' class="active"'; + } + + echo '><a href="' . $ta[2] . '">' . $ta[0] . '</a></li>'; + } + + echo '</ul>'; + } } function add_package_tabs($tabgroup, &$tab_array) { |