mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-12-02 04:13:34 +00:00
show attribute def groups
code was lost after rebasing
This commit is contained in:
parent
ec82a80010
commit
612a2ca8d6
|
|
@ -419,19 +419,44 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$attributes = $document->getAttributes();
|
||||
if($attributes) {
|
||||
foreach($attributes as $attribute) {
|
||||
$arr = $this->callHook('showDocumentAttribute', $document, $attribute);
|
||||
if(is_array($arr)) {
|
||||
echo "<tr>";
|
||||
echo "<td>".$arr[0].":</td>";
|
||||
echo "<td>".$arr[1]."</td>";
|
||||
echo "</tr>";
|
||||
} else {
|
||||
$this->printAttribute($attribute);
|
||||
|
||||
$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_document), SeedDMS_Core_AttributeDefinitionGroup::show_details);
|
||||
if($attrdefs) {
|
||||
echo "<tr><td colspan=\"2\"><b>".htmlspecialchars($attrdefgrp['group']->getName())."</b></td></tr>";
|
||||
foreach($attrdefs as $attrdefarr) {
|
||||
$attrdef = $attrdefarr['attrdef'];
|
||||
$attribute = $document->getAttribute($attrdef);
|
||||
if($attribute) {
|
||||
$arr = $this->callHook('showDocumentAttribute', $document, $attribute, SeedDMS_Core_AttributeDefinitionGroup::show_details);
|
||||
if(is_array($arr)) {
|
||||
echo "<tr>";
|
||||
echo "<td>".$arr[0].":</td>";
|
||||
echo "<td>".$arr[1]."</td>";
|
||||
echo "</tr>";
|
||||
} else {
|
||||
$this->printAttribute($attribute);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$attributes = $document->getAttributes();
|
||||
if($attributes) {
|
||||
foreach($attributes as $attribute) {
|
||||
$arr = $this->callHook('showDocumentAttribute', $document, $attribute, SeedDMS_Core_AttributeDefinitionGroup::show_details);
|
||||
if(is_array($arr)) {
|
||||
echo "<tr>";
|
||||
echo "<td>".$arr[0].":</td>";
|
||||
echo "<td>".$arr[1]."</td>";
|
||||
echo "</tr>";
|
||||
} else {
|
||||
$this->printAttribute($attribute);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user