diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 483477537..0381660eb 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -130,15 +130,15 @@ $(document).ready(function() { $entries = $this->params['searchhits']; $newowner = $this->params['newowner']; - if ($user->isAdmin()) { - $j = 0; + if($newowner && $user->isAdmin()) { + $j = $i = 0; foreach($entries as $entry) { - if($entry->isType('document')) { +// if($entry->isType('document')) { if($entry->getOwner()->getId() != $newowner->getId()) { $entry->setOwner($newowner); $j++; } - } +// } } $this->setParam('batchmsg', getMLText('batch_new_owner_msg', ['count'=>$j])); } else { @@ -609,10 +609,13 @@ function typeahead() { /* {{{ */ print $this->html_link('Search', array_merge($_GET, array('action'=>'export')), array('class'=>'btn btn-primary', 'id'=>'export'), " ".getMLText("export"), false, true)."\n"; $content = ob_get_clean(); $this->printAccordion(getMLText('export'), $content); + } + if($total) { ob_start(); $users = $dms->getAllUsers(); $options = array(); + $options[] = array("-1", getMLText("choose_user")); foreach ($users as $currUser) { $options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin().' - '.$currUser->getFullName()), false, array(array('data-subtitle', htmlspecialchars($currUser->getEmail())))); } @@ -626,9 +629,9 @@ function typeahead() { /* {{{ */ 'placeholder'=>getMLText('select_users'), ) ); - print $this->html_link('Search', array_merge($_GET, array('action'=>'changeowner')), array('class'=>'btn btn-primary', 'id'=>'changeowner'), " ".getMLText("change_owner"), false, true)."\n"; + print $this->html_link('Search', array_merge($_GET, array('action'=>'changeowner')), array('class'=>'btn btn-primary', 'id'=>'changeowner'), " ".getMLText("batch_change_owner"), false, true)."\n"; $content = ob_get_clean(); - $this->printAccordion(getMLText('change_owner'), $content); + $this->printAccordion(getMLText('batch_change_owner'), $content); } ?>