do not show batch operation on categories if none are defined

This commit is contained in:
Uwe Steinmann 2023-01-19 07:08:04 +01:00
parent b6a52ee4de
commit 9ec87a727e

View File

@ -968,6 +968,7 @@ function typeahead() { /* {{{ */
ob_start();
$cats = $dms->getDocumentCategories();
if($cats) {
$options = array();
$options[] = array("-1", getMLText("choose_category"));
foreach ($cats as $currcat) {
@ -994,13 +995,13 @@ function typeahead() { /* {{{ */
'value'=>'1',
)
);
// print $this->html_link('Search', array_merge($_GET, array('action'=>'changeowner')), array('class'=>'btn btn-primary', 'id'=>'changeowner'), "<i class=\"fa fa-user\"></i> ".getMLText("batch_change_owner"), false, true)."\n";
print $this->html_link('Search', array_merge($_GET, array('action'=>'changecategory')), array('class'=>'btn btn-primary change-category-btn mt-4', 'id'=>'changecategory'), "<i class=\"fa fa-user\"></i> ".getMLText("batch_change_category"), false, true)."\n";
$content = ob_get_clean();
$this->printAccordion(getMLText('batch_change_category'), $content);
}
}
// }}}
?>