function AdvisingScreen::draw_box_top
Search API
6.x AdvisingScreen.php | AdvisingScreen::draw_box_top($title, $hideheaders = false, $extra_classes = "") |
Used to draw the beginning of semester boxes and other boxes, for example the footnotes.
Parameters
string $title:
bool $hideheaders:
- If TRUE, then the course/hrs/grd headers will not be displayed.
int $table_width:
- The HTML table width, in pixels. If not set, it will default to 300 pixels wide.
Return value
string
1 call to AdvisingScreen::draw_box_top()
- AdvisingScreen::draw_semester_box_top in classes/
AdvisingScreen.php - Uses the draw_box_top function, specifically for semesters.
File
- classes/
AdvisingScreen.php, line 4096
Class
Code
function draw_box_top($title, $hideheaders = false, $extra_classes = "") {
// returns the beginnings of the semester block tables...
$headers = array();
if ($hideheaders != true)
{
$headers [0] = t("Course");
$headers [1] = t("Hrs");
$headers [2] = t("Grd");
$headers [3] = t("Pts");
}
$extra_classes .= " fp-box-top-" . fp_get_machine_readable(strtolower($title));
$render = array();
$render ['#id'] = 'AdvisingScreen_draw_box_top';
$render ['#title'] = $title;
$render ['#hideheaders'] = $hideheaders;
$render ['#extra_classes'] = $extra_classes;
$render ['table_top'] = array(
'value' => "<table border='0' cellpadding='0' cellspacing='0' class='fp-box-top $extra_classes'>",
);
$render ['semester_title_box_top'] = array(
'value' => "<tr>
<td colspan='8' class='semester-box-top'>
",
);
$render ['section_title'] = array(
'value' => fp_render_section_title($title),
);
$render ['semester_title_box_bottom'] = array(
'value' => "</td>
</tr>",
);
if (!$hideheaders)
{
$render ['headers'] = array(
'value' => "<tr class='box-headers-row'>
<td colspan='8'>
<table class='header-table' cellpadding='0' cellspacing='0'>
<th class='w1_1'></th>
<th class='w1_2'></th>
<th class='w1_3'></th>
<th class='w2'>
$headers [0]
</th>
<th class='w3'></th>
<th class='w4'>
$headers [1]
</th>
<th class='w5'>
$headers [2]
</th>
<th class='w6'>
$headers [3]
</th>
<!--after_last_th-->
</tr>
</table>
</td>
</tr>
",
);
}
return fp_render_content($render, FALSE);
}