trace('file:' . $_SERVER['SCRIPT_NAME']); $function = MIOLO::_REQUEST('function'); $home = 'main:search'; $navbar->addOption(_M('Search', $module), $module, $home, null, array('function'=>'resetStack')); if ( !$MIOLO->invokeHandler($module,'search/'.$context->shiftAction()) ) { // $MIOLO->checkAccess($module, GTC_ADMINISTRATION, true, true); $ui = $MIOLO->getUI(); $btnClose = $MIOLO->getActionURL($module,substr($home,0,strrpos($home,':'))); $icon = $ui->getImage($module,'search-16x16.png'); $pnlSystem = new MActionPanel('pnlSystem', _M('Search', $module), null, $btnClose, $icon); $pnlSystem->setIconType('small'); $pnlSystem->setControlSize(MPANEL_DEFAULT_WIDTH,MPANEL_DEFAULT_HEIGHT); //Busca pesquisas definidas pelo administrador $busFormContent = $MIOLO->getBusiness($module, 'BusFormContent'); $busFormContent->formContentType = FORM_CONTENT_TYPE_ADMINISTRATOR; $search = $busFormContent->searchFormContent(TRUE); if ($search) { foreach ($search as $v) { //nome especifico somente usado dentro da circulação de material, então pula ele na relação if ( $v->name == 'materialMovement') { continue; } //Lista todas as pesquisas criadas pelo administrador $menuItem[] = array($v->name, 'search-16x16.png', "{$home}:simpleSearch", '', $v->formContentId); } } if (GnutecaPerms::checkAccess('gtcZ3950', null, false)) { $menuItem[] = array(_M('Z3950',$module), 'search-16x16.png', "$home:Z3950Search"); } foreach ( $menuItem as $m ) { if ($formContentId = $m[4]) { $args = array( 'formContentId' => $formContentId, 'formContentTypeId' => FORM_CONTENT_TYPE_ADMINISTRATOR, ); } else { $args = array(); } $pnlSystem->addAction($m[0], $ui->getImage($module,$m[1]), $module, $m[2], null, $args); } $theme->clearContent(); $theme->insertContent($pnlSystem); } //Esconde a navbar quando estiver na pesquisa e nao houver operador logado (ticket #5376) if (!GnutecaOperator::isLogged()) { $navbar->clear(); } $page->addJsCode("gnuteca.changeTheme('gnuteca', 'gnuteca3Univates');"); ?>