mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 20:51:30 +00:00
do not show batch operation on categories if none are defined
This commit is contained in:
parent
b6a52ee4de
commit
9ec87a727e
|
@ -968,38 +968,39 @@ function typeahead() { /* {{{ */
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
$cats = $dms->getDocumentCategories();
|
$cats = $dms->getDocumentCategories();
|
||||||
$options = array();
|
if($cats) {
|
||||||
$options[] = array("-1", getMLText("choose_category"));
|
$options = array();
|
||||||
foreach ($cats as $currcat) {
|
$options[] = array("-1", getMLText("choose_category"));
|
||||||
$options[] = array($currcat->getID(), htmlspecialchars($currcat->getName()), false);
|
foreach ($cats as $currcat) {
|
||||||
|
$options[] = array($currcat->getID(), htmlspecialchars($currcat->getName()), false);
|
||||||
|
}
|
||||||
|
$this->formField(
|
||||||
|
null,
|
||||||
|
array(
|
||||||
|
'element'=>'select',
|
||||||
|
'id'=>'batchcategory',
|
||||||
|
'class'=>'chzn-select',
|
||||||
|
'options'=>$options,
|
||||||
|
'multiple'=>false,
|
||||||
|
'placeholder'=>getMLText('select_category'),
|
||||||
|
'attributes'=>array(array('style', 'width: 100%;'))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$this->formField(
|
||||||
|
getMLText("batch_remove_category"),
|
||||||
|
array(
|
||||||
|
'element'=>'input',
|
||||||
|
'type'=>'checkbox',
|
||||||
|
'id'=>'removecategory',
|
||||||
|
'value'=>'1',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
$this->formField(
|
|
||||||
null,
|
|
||||||
array(
|
|
||||||
'element'=>'select',
|
|
||||||
'id'=>'batchcategory',
|
|
||||||
'class'=>'chzn-select',
|
|
||||||
'options'=>$options,
|
|
||||||
'multiple'=>false,
|
|
||||||
'placeholder'=>getMLText('select_category'),
|
|
||||||
'attributes'=>array(array('style', 'width: 100%;'))
|
|
||||||
)
|
|
||||||
);
|
|
||||||
$this->formField(
|
|
||||||
getMLText("batch_remove_category"),
|
|
||||||
array(
|
|
||||||
'element'=>'input',
|
|
||||||
'type'=>'checkbox',
|
|
||||||
'id'=>'removecategory',
|
|
||||||
'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);
|
|
||||||
}
|
}
|
||||||
// }}}
|
// }}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user