function fp_render_sub_tab_array
Search API
7.x theme.inc | fp_render_sub_tab_array($tab_array) |
6.x theme.inc | fp_render_sub_tab_array($tab_array) |
4.x theme.inc | fp_render_sub_tab_array($tab_array) |
5.x theme.inc | fp_render_sub_tab_array($tab_array) |
Similar to render_tab_array.
1 call to fp_render_sub_tab_array()
- fp_display_page in includes/
theme.inc - Output the contents of the $page variable to the screen. $page is an array containing details about the page, as well as its original menu item (router_item) definition.
File
- includes/
theme.inc, line 1858
Code
function fp_render_sub_tab_array($tab_array) {
global $current_student_id;
$rtn = "";
$rtn .= "<div class='sub-tabs'>";
foreach ($tab_array as $tab) {
$title = @$tab ["title"];
$on_click = @$tab ["on_click"];
$active = @$tab ["active"];
$type = @$tab ["type"];
if (!$title) {
$title = "";
}
$extra_class = "";
if ($active) {
$extra_class = "gradbutton-active";
}
$extra_class .= " sub-tab-title-" . fp_get_machine_readable(strtolower(trim($title)));
if ($type == "link") {
// Render as a standard link
$label = @$tab ["label"];
$text = @$tab ["text"];
$link_title = @$tab ['link_title'];
$link_class = @$tab ['link_class'];
$rtn .= "<span class='subtab-link-wrapper $link_class'>";
if ($label) {
$rtn .= "<label>$label</label>";
}
$rtn .= "<a href='javascript: $on_click' class='fp-sub-tab-link $extra_class' title='$link_title'>$text</a>";
$rtn .= "</span>";
}
else {
// Render as a button
$rtn .= fp_render_button($title, $on_click, $extra_class);
}
}
$rtn .= "</div>";
return $rtn;
}