/** * Private function called once at the beginning of each ConceptSearchResultsGroup */ protected function _group_header(ConceptSearchResultsGroup $csrg, $group_i) { // Determine whether group starts expanded or collapsed $group_num_results = $csrg->getCount(); if ($this->cc->getSearchResultsGroupCount() == 1) { $tbody_style = 'display:table-row-group;'; $toggle_image = 'images/box_minus.jpg'; } else { $tbody_style = 'display:none;'; $toggle_image = 'images/box_plus.jpg'; } // Group header echo "\n<thead id=\"csrg_header_" . $group_i . "\">"; echo "<tr class=\"row_group_header\">"; echo '<th colspan="' . $this->num_columns . '" onclick="javascript:toggleSearchGroup(' . $group_i . ')">'; if ($this->show_checkbox) { echo '<input type="checkbox" id="csrg_checkbox_' . $group_i . '" onclick="csrgCheckboxClick(event, this);"'; if (!$csrg->getCount()) { echo ' disabled="disabled"'; } echo ' /> '; } echo '<img id="img_group_toggle_' . $group_i . '" src="' . $toggle_image . '" border="0" alt="Toggle" /> '; echo 'Search Group ' . ($group_i + 1) . ': <span style="font-weight:normal;">' . substr($csrg->csg->query, 0, $this->csrg_text_cutoff_length); if (strlen($csrg->csg->query) > $this->csrg_text_cutoff_length) { echo '...'; } echo '</span> '; echo '<span style="font-weight:bold;float:right;">' . $group_num_results; echo ' result'; if ($group_num_results > 1) { echo 's'; } echo "</span></th></tr>"; echo "</thead>\n"; // Concept column headers echo "<tbody id=\"csrg_" . $group_i . "\" class=\"tbody_group\" style=\"" . $tbody_style . "\">\n"; echo "<tr id=\"csrg_header_row_" . $group_i . "\" class=\"row_table_header\">"; if ($this->show_checkbox) { echo '<th class="col_check"></th>'; } echo "<th class=\"col_1\">Concept</th>"; echo "<th class=\"col_2\">Definitions</th>"; echo "<th class=\"col_3\">Concept Sets</th>"; echo "<th class=\"col_4\">Mappings</th>"; if ($this->show_icons) { echo '<th class="col_icons"></th>'; } echo "</tr>\n"; }