move search form out of collapsable nav, add logo in header

This commit is contained in:
Uwe Steinmann 2021-05-07 07:32:53 +02:00
parent 8406d0764b
commit 4baba28ed6

View File

@ -300,10 +300,27 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo " <a class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".nav-col1\">\n";
echo " <span class=\"fa fa-bars\"></span>\n";
echo " </a>\n";
echo " <a class=\"brand\" href=\"../out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</a>\n";
echo " <a href=\"../out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\"><img src=\"../views/bootstrap/images/seeddms-logo.svg\"></a>";
echo " <a class=\"brand\" href=\"../out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\"><span class=\"hidden-phone\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
/* user profile menu {{{ */
if(isset($this->params['session']) && isset($this->params['user']) && $this->params['user']) {
/* search form {{{ */
echo " <form action=\"../out/out.Search.php\" class=\"form-inline navbar-search pull-left\" autocomplete=\"off\">";
if ($folder!=null && is_object($folder) && $folder->isType('folder')) {
echo " <input type=\"hidden\" name=\"folderid\" value=\"".$folder->getID()."\" />";
}
echo " <input type=\"hidden\" name=\"navBar\" value=\"1\" />";
echo " <input name=\"query\" class=\"search-query\" ".($this->params['defaultsearchmethod'] == 'fulltext_' ? "" : "id=\"searchfield\"")." data-provide=\"typeahead\" type=\"search\" style=\"width: 150px;\" placeholder=\"".getMLText("search")."\"/>";
if($this->params['defaultsearchmethod'] == 'fulltext')
echo " <input type=\"hidden\" name=\"fullsearch\" value=\"1\" />";
// if($this->params['enablefullsearch']) {
// echo " <label class=\"checkbox\" style=\"color: #999999;\"><input type=\"checkbox\" name=\"fullsearch\" value=\"1\" title=\"".getMLText('fullsearch_hint')."\"/> ".getMLText('fullsearch')."</label>";
// }
// echo " <input type=\"submit\" value=\"".getMLText("search")."\" id=\"searchButton\" class=\"btn\"/>";
echo "</form>\n";
/* }}} End of search form */
echo " <div class=\"nav-collapse nav-col1\">\n";
echo " <ul id=\"main-menu-admin\" class=\"nav pull-right\">\n";
echo " <li class=\"dropdown\">\n";
@ -405,12 +422,15 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo " <ul class=\"nav\">\n";
$menuitems = array();
/* calendar {{{ */
if ($this->params['enablecalendar'] && $accessobject->check_view_access('Calendar')) $menuitems['calendar'] = array('link'=>'../out/out.Calendar.php?mode='.$this->params['calendardefaultview'], 'label'=>"calendar");
if ($this->params['user']->isAdmin()) $menuitems['admintools'] = array('link'=>'../out/out.AdminTools.php', 'label'=>"admin_tools");
if($this->params['enablehelp']) {
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$menuitems['help'] = array('link'=>'../out/out.Help.php?context='.$tmp[1], 'label'=>"help");
}
/* }}} End of calendar */
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('globalNavigationBar'))
$menuitems = $this->callHook('globalNavigationBar', $menuitems);
@ -428,22 +448,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
}
}
echo " </ul>\n";
/* search form {{{ */
echo " <form action=\"../out/out.Search.php\" class=\"form-inline navbar-search pull-left\" autocomplete=\"off\">";
if ($folder!=null && is_object($folder) && $folder->isType('folder')) {
echo " <input type=\"hidden\" name=\"folderid\" value=\"".$folder->getID()."\" />";
}
echo " <input type=\"hidden\" name=\"navBar\" value=\"1\" />";
echo " <input name=\"query\" class=\"search-query\" ".($this->params['defaultsearchmethod'] == 'fulltext_' ? "" : "id=\"searchfield\"")." data-provide=\"typeahead\" type=\"search\" style=\"width: 150px;\" placeholder=\"".getMLText("search")."\"/>";
if($this->params['defaultsearchmethod'] == 'fulltext')
echo " <input type=\"hidden\" name=\"fullsearch\" value=\"1\" />";
// if($this->params['enablefullsearch']) {
// echo " <label class=\"checkbox\" style=\"color: #999999;\"><input type=\"checkbox\" name=\"fullsearch\" value=\"1\" title=\"".getMLText('fullsearch_hint')."\"/> ".getMLText('fullsearch')."</label>";
// }
// echo " <input type=\"submit\" value=\"".getMLText("search")."\" id=\"searchButton\" class=\"btn\"/>";
echo "</form>\n";
/* }}} End of search form */
echo " </div>\n";
}
echo " </div>\n";