/**
* Theme function for output of the tabs. Use this to ADD extra classes.
* The general structure 'ul.quicktabs_tabs li a' needs to be maintained
* for the jQuery to work.
*
* @ingroup themeable
*/
function treefest_quicktabs_tabs($quicktabs, $active_tab = 'none') {
$output = '';
$tabs_count = count($quicktabs['tabs']);
if ($tabs_count <= 0) {
return $output;
}
$index = 1;
$output .= '
';
foreach ($quicktabs['tabs'] as $tabkey => $tab) {
if(!empty($tab)) {
$class = 'qtab-'. $tabkey;
// Add first, last and active classes to the list of tabs to help out themers.
$class .= ($tabkey == $active_tab ? ' active' : '');
$class .= ($index == 1 ? ' first' : '');
$class .= ($index == $tabs_count ? ' last': '');
$attributes_li = drupal_attributes(array('class' => $class));
$options = _quicktabs_construct_link_options($quicktabs, $tabkey);
// Support for translatable tab titles with i18nstrings.module.
if (module_exists('i18nstrings')) {
$tab['title'] = tt("quicktabs:tab:{$quicktabs['machine_name']}--$tabkey:title", $tab['title']);
}
$options['html'] = TRUE;
$output .= '- '. l('' . $tab['title']. '', $_GET['q'], $options) .'
';
$index++;
}
}
$output .= '
';
return $output;
}