show search form only if user is logged in

This commit is contained in:
Uwe Steinmann 2021-05-07 07:32:34 +02:00
parent 0142de1c03
commit 8406d0764b

View File

@ -306,6 +306,8 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$accessobject = $this->params['accessobject'];
echo "<nav class=\"navbar navbar-expand-lg navbar-dark bg-dark border-bottom fixed-top\">\n";
echo " <a class=\"navbar-brand\" href=\"../out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\"><img src=\"../views/bootstrap/images/seeddms-logo.svg\"> <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
if(isset($this->params['user']) && $this->params['user']) {
/* search form {{{ */
echo " <form action=\"../out/out.Search.php\" class=\"form-inline ml-4 mr-auto\" autocomplete=\"off\">";
if ($folder!=null && is_object($folder) && !strcasecmp(get_class($folder), $dms->getClassname('folder'))) {
@ -321,7 +323,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo " <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarMain\" aria-controls=\"navbarMain\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n";
echo " <span class=\"navbar-toggler-icon\"></span>\n";
echo " </button>\n";
if(isset($this->params['user']) && $this->params['user']) {
echo " <div class=\"collapse navbar-collapse\" id=\"navbarMain\">\n";
echo " <ul class=\"navbar-nav\">\n";
if ($this->params['enablecalendar']) echo " <li class=\"nav-item\"><a class=\"nav-link\" href=\"../out/out.Calendar.php?mode=".$this->params['calendardefaultview']."\">".getMLText("calendar")."</a></li>\n";