rename hook folderInfo to folderInfos, add hook additionalDocumentInfos

This commit is contained in:
Uwe Steinmann 2020-11-13 11:23:56 +01:00
parent f094262e8b
commit 42a0df1d52

View File

@ -232,7 +232,7 @@ $('body').on('click', '.order-btn', function(ev) {
$user = $this->params['user'];
$folder = $this->params['folder'];
$txt = $this->callHook('folderInfo', $folder);
$txt = $this->callHook('folderInfos', $folder);
if(is_string($txt))
echo $txt;
else {
@ -240,6 +240,9 @@ $('body').on('click', '.order-btn', function(ev) {
$owner = $folder->getOwner();
$this->contentHeading(getMLText("folder_infos"));
$this->contentContainerStart();
$txt = $this->callHook('preFolderInfos', $folder);
if(is_string($txt))
echo $txt;
echo "<table class=\"table-condensed\">\n";
if($user->isAdmin()) {
echo "<tr>";
@ -305,7 +308,21 @@ $('body').on('click', '.order-btn', function(ev) {
}
}
}
$arrarr = $this->callHook('additionalFolderInfos', $folder);
if(is_array($arrarr)) {
foreach($arrarr as $arr) {
echo "<tr>";
echo "<td>".$arr[0].":</td>";
echo "<td>".$arr[1]."</td>";
echo "</tr>";
}
} elseif(is_string($arrarr)) {
echo $arrarr;
}
echo "</table>\n";
$txt = $this->callHook('postFolderInfos', $folder);
if(is_string($txt))
echo $txt;
$this->contentContainerEnd();
}
} /* }}} */