show number of documents per category in select menu

This commit is contained in:
Uwe Steinmann 2023-01-10 08:11:24 +01:00
parent da4aafff86
commit 913baaa7ce

View File

@ -155,7 +155,7 @@ $(document).ready( function() {
$options[] = array("-1", getMLText("choose_category"));
$options[] = array("0", getMLText("new_document_category"));
foreach ($categories as $category) {
$options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcat && $category->getID()==$selcat->getID());
$options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcat && $category->getID()==$selcat->getID(), array(array('data-subtitle', $category->countDocumentsByCategory().' '.getMLText('documents'))));
}
$this->formField(
null, //getMLText("selection"),