From f094262e8b09fbf896c7dfb1faa385b962d1287d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 13 Nov 2020 11:23:04 +0100 Subject: [PATCH 1/2] hook documentInfos() replaces title and container, new hook additionalDocumentInfos --- views/bootstrap/class.ViewDocument.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index d3f364f71..7f9fa4c98 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -197,15 +197,15 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $user = $this->params['user']; $document = $this->params['document']; + $txt = $this->callHook('documentInfos', $document); + if(is_string($txt)) + echo $txt; + else { $this->contentHeading(getMLText("document_infos")); $this->contentContainerStart(); $txt = $this->callHook('preDocumentInfos', $document); if(is_string($txt)) echo $txt; - $txt = $this->callHook('documentInfos', $document); - if(is_string($txt)) - echo $txt; - else { ?> - getAttributes(); if($attributes) { foreach($attributes as $attribute) { @@ -338,14 +336,25 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } } } + $arrarr = $this->callHook('additionalDocumentInfos', $document); + if(is_array($arrarr)) { + foreach($arrarr as $arr) { + echo ""; + echo ""; + echo ""; + echo ""; + } + } elseif(is_string($arrarr)) { + echo $arrarr; + } ?>
".$arr[0].":".$arr[1]."
callHook('postDocumentInfos', $document); if(is_string($txt)) echo $txt; $this->contentContainerEnd(); + } } /* }}} */ function preview() { /* {{{ */ From 42a0df1d5244f7e1bafc8b8d616fb50dd58e16a6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 13 Nov 2020 11:23:56 +0100 Subject: [PATCH 2/2] rename hook folderInfo to folderInfos, add hook additionalDocumentInfos --- views/bootstrap/class.ViewFolder.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php index b3dd1628e..7d7a31f2f 100644 --- a/views/bootstrap/class.ViewFolder.php +++ b/views/bootstrap/class.ViewFolder.php @@ -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 "\n"; if($user->isAdmin()) { echo ""; @@ -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 ""; + echo ""; + echo ""; + echo ""; + } + } elseif(is_string($arrarr)) { + echo $arrarr; + } echo "
".$arr[0].":".$arr[1]."
\n"; + $txt = $this->callHook('postFolderInfos', $folder); + if(is_string($txt)) + echo $txt; $this->contentContainerEnd(); } } /* }}} */