mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-05-08 13:31:24 +00:00
call more hooks, filter attrdef list by show value when retrieving it
This commit is contained in:
parent
ce4547d8c4
commit
d377dda623
|
|
@ -94,6 +94,30 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
} /* }}} */
|
||||
|
||||
protected function printVersionAttributes($folder, $version) { /* {{{ */
|
||||
$f = null;
|
||||
$attrdefgrps = $folder->getAttributeDefintionGroupList(true, $f);
|
||||
if($attrdefgrps) {
|
||||
foreach($attrdefgrps as $attrdefgrp) {
|
||||
$attrdefs = $attrdefgrp['group']->getAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_all, SeedDMS_Core_AttributeDefinition::objtype_documentcontent), SeedDMS_Core_AttributeDefinitionGroup::show_details);
|
||||
if($attrdefs) {
|
||||
echo "<b>".htmlspecialchars($attrdefgrp['group']->getName())."</b><br />";
|
||||
foreach($attrdefs as $attrdefarr) {
|
||||
$attrdef = $attrdefarr['attrdef'];
|
||||
$attribute = $latestContent->getAttribute($attrdef);
|
||||
if($attribute) {
|
||||
$arr = $this->callHook('showDocumentContentAttribute', $latestContent, $attribute);
|
||||
if(is_array($arr)) {
|
||||
echo "<li>".$arr[0].": ".$arr[1]."</li>\n";
|
||||
} else {
|
||||
print "<li>".htmlspecialchars($attrdef->getName()).": ";
|
||||
$this->printAttributeValue($attribute);
|
||||
echo "</li>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$attributes = $version->getAttributes();
|
||||
if($attributes) {
|
||||
foreach($attributes as $attribute) {
|
||||
|
|
@ -108,6 +132,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$arrarr = $this->callHook('additionalDocumentContentInfo', $version);
|
||||
if(is_array($arrarr)) {
|
||||
foreach($arrarr as $arr) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user