mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
hook documentInfos() replaces title and container, new hook additionalDocumentInfos
This commit is contained in:
parent
c36d5c9cb9
commit
f094262e8b
|
@ -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 {
|
||||
?>
|
||||
<table class="table-condensed">
|
||||
<?php
|
||||
|
@ -320,8 +320,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$attributes = $document->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 "<tr>";
|
||||
echo "<td>".$arr[0].":</td>";
|
||||
echo "<td>".$arr[1]."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
} elseif(is_string($arrarr)) {
|
||||
echo $arrarr;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
$txt = $this->callHook('postDocumentInfos', $document);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
$this->contentContainerEnd();
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
function preview() { /* {{{ */
|
||||
|
|
Loading…
Reference in New Issue
Block a user