/** * @brief lazy way to create the admin index page headers * * @param array $filterOptions the filters to show * @param array $massActions the mass actions to show * @access public * * @return string the markup generated */ public function adminIndexHead($filterOptions = array(), $massActions = null) { if (!class_exists('FilterHelper')) { App::uses('FilterHelper', 'Filter.View/Helper'); } return sprintf('<div class="adminTopBar">%s%s</div><div class="filters">%s</div>', $this->adminPageHead(), $massActions, FilterHelper::form('Post', $filterOptions) . FilterHelper::clear($filterOptions)); }
function adminIndexHead($view = array(), $pagintion = array(), $filterOptions = array(), $massActions = null) { if (empty($view)) { $this->errors[] = 'I need the view.'; return false; } App::import('Helper', 'FilterHelper'); $filters = $this->Design->niceBox('filter', FilterHelper::form('Post', $filterOptions) . FilterHelper::clear($filterOptions)); return $this->Design->niceBox('adminTopBar', $this->adminPageHead($view) . $massActions) . $filters; }