Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2020-11-13 11:24:43 +01:00
commit 15d05d6ace
2 changed files with 34 additions and 8 deletions

View File

@ -186,6 +186,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
$document = $this->params['document']; $document = $this->params['document'];
$checkoutdir = $this->params['checkOutDir']; $checkoutdir = $this->params['checkOutDir'];
$txt = $this->callHook('documentInfos', $document);
if(is_string($txt))
echo $txt;
else {
$this->contentHeading(getMLText("document_infos")); $this->contentHeading(getMLText("document_infos"));
$txt = $this->callHook('checkOutInfo', $document); $txt = $this->callHook('checkOutInfo', $document);
if(is_string($txt)) { if(is_string($txt)) {
@ -206,10 +210,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
$txt = $this->callHook('preDocumentInfos', $document); $txt = $this->callHook('preDocumentInfos', $document);
if(is_string($txt)) if(is_string($txt))
echo $txt; echo $txt;
$txt = $this->callHook('documentInfos', $document);
if(is_string($txt))
echo $txt;
else {
?> ?>
<table class="table-condensed"> <table class="table-condensed">
<?php <?php
@ -324,8 +324,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
<?php <?php
} }
} }
?>
<?php
$attributes = $document->getAttributes(); $attributes = $document->getAttributes();
if($attributes) { if($attributes) {
foreach($attributes as $attribute) { foreach($attributes as $attribute) {
@ -348,14 +346,25 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
} }
} }
} }
$arrarr = $this->callHook('additionalDocumentInfos', $document);
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;
}
?> ?>
</table> </table>
<?php <?php
}
$txt = $this->callHook('postDocumentInfos', $document); $txt = $this->callHook('postDocumentInfos', $document);
if(is_string($txt)) if(is_string($txt))
echo $txt; echo $txt;
$this->contentContainerEnd(); $this->contentContainerEnd();
}
} /* }}} */ } /* }}} */
function preview() { /* {{{ */ function preview() { /* {{{ */

View File

@ -232,7 +232,7 @@ $('body').on('click', '.order-btn', function(ev) {
$user = $this->params['user']; $user = $this->params['user'];
$folder = $this->params['folder']; $folder = $this->params['folder'];
$txt = $this->callHook('folderInfo', $folder); $txt = $this->callHook('folderInfos', $folder);
if(is_string($txt)) if(is_string($txt))
echo $txt; echo $txt;
else { else {
@ -240,6 +240,9 @@ $('body').on('click', '.order-btn', function(ev) {
$owner = $folder->getOwner(); $owner = $folder->getOwner();
$this->contentHeading(getMLText("folder_infos")); $this->contentHeading(getMLText("folder_infos"));
$this->contentContainerStart(); $this->contentContainerStart();
$txt = $this->callHook('preFolderInfos', $folder);
if(is_string($txt))
echo $txt;
echo "<table class=\"table-condensed\">\n"; echo "<table class=\"table-condensed\">\n";
if($user->isAdmin()) { if($user->isAdmin()) {
echo "<tr>"; 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"; echo "</table>\n";
$txt = $this->callHook('postFolderInfos', $folder);
if(is_string($txt))
echo $txt;
$this->contentContainerEnd(); $this->contentContainerEnd();
} }
} /* }}} */ } /* }}} */