/** * function that will set the top row before the table * @param object $search * @param string $message * @param object $pagination * @param mixed $filter * @return $html */ public static function setTop($search = null, $message = null, $pagination = null, $filter = null, $onlyBox = false, $total = false) { $html = ''; $html .= '<div class="for_paginat_position"></div><table cellspacing="0" cellpadding="2" border="0" style="text-align: left; width: 100%;position:relative;"><tbody><tr>'; // for search box if (!empty($search)) { // get necessary parameters if (!isset($search->forms)) { $search->forms = ''; } $forms = $search->forms; if (empty($search->hidden)) { $search->hidden = ''; } $hidden = $search->hidden; $listsearch = $search->listsearch; $id = $search->id; $html .= '<td style="text-align:left;float:left;">'; $html .= jnews::_searchbox($forms, $hidden, $listsearch, $id); $html .= '</td>'; } // for text found in the upper part before that table list if (!empty($message)) { $html .= '<td style="text-align:center;">'; $html .= $message; $html .= '</td>'; } // for pagination if (!empty($pagination)) { if (version_compare(JVERSION, '3.0.0', '<')) { $html .= '<td style="text-align:center;">'; $html .= jnews::_pagination($pagination, $onlyBox); $html .= '</td>'; } else { $html .= '<td style="text-align:center;">'; $html .= '<div class="btn-group pull-right">'; $html .= '<label for="limit" class="element-invisible">' . JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC') . '</label>'; $html .= jnews::_pagination($pagination, $onlyBox); $html .= '</div>'; $html .= '</td>'; } } // for filter if (!empty($filter)) { $html .= '<td style="text-align: right;float:right">'; $html .= $filter; $html .= '</td>'; } $html .= '</tr></tbody></table><div class="under_table"></div>'; return $html; }