*/ /** * Prints the navigation * * @author Michael Klier */ function tpl_navigation() { global $ID; global $conf; $navpage = tpl_getConf('navigation_page'); list($ns, $chunk) = explode(':', $ID, 2); $navpage = (page_exists($ns.':'.$navpage)) ? $ns.':'.$navpage : $navpage; print ''; } /** * Prints the actions links * * @author Michael Klier */ function tpl_actions() { $actions = array('admin', 'revert', 'edit', 'history', 'recent', 'backlink', 'subscription', 'index', 'login', 'profile'); print '' . DOKU_LF; } /** * Print the search form * * If the first parameter is given a div with the ID 'qsearch_out' will * be added which instructs the ajax pagequicksearch to kick in and place * its output into this div. The second parameter controls the propritary * attribute autocomplete. If set to false this attribute will be set with an * value of "off" to instruct the browser to disable it's own built in * autocompletion feature (MSIE and Firefox) * * @author Andreas Gohr * * @param bool $ajax * @param bool $autocomplete * @return bool */ function tpl_searchform2($ajax = true, $autocomplete = true) { global $lang; global $ACT; global $QUERY; global $ID; // don't print the search form if search action has been disabled if(!actionOK('search')) return false; $searchForm = new dokuwiki\Form\Form([ 'action' => wl(), 'method' => 'get', 'role' => 'search', 'class' => 'search', 'id' => 'dw__search', ], true); $searchForm->addTagOpen('div')->addClass('no'); $searchForm->setHiddenField('do', 'search'); $searchForm->setHiddenField('id', $ID); $searchForm->addTextInput('q') ->addClass('edit') ->attrs([ 'title' => '[F]', 'accesskey' => 'f', 'placeholder' => $lang['btn_search'], 'autocomplete' => $autocomplete ? 'on' : 'off', ]) ->id('qsearch__in') ->val($ACT === 'search' ? $QUERY : '') ->useInput(false) ; $searchForm->addButton('', $lang['btn_search'])->attrs([ 'type' => 'submit', 'class' => 'button', 'title' => $lang['btn_search'], ]); if ($ajax) { $searchForm->addTagOpen('div')->id('qsearch__out')->addClass('ajax_qsearch JSpopup'); $searchForm->addTagClose('div'); } $searchForm->addTagClose('div'); trigger_event('FORM_QUICKSEARCH_OUTPUT', $searchForm); echo $searchForm->toHTML(); return true; } // vim:ts=4:sw=4:et:enc=utf-8: