add new method printAttribute(), just like in class.ViewDocument.php

This commit is contained in:
Uwe Steinmann 2021-07-12 19:44:25 +02:00
parent 2ccb30490d
commit 5f1460757a

View File

@ -98,6 +98,21 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Theme_Style {
}
} /* }}} */
/**
* Output a single attribute in the document info section
*
* @param object $attribute attribute
*/
protected function printAttribute($attribute) { /* {{{ */
$attrdef = $attribute->getAttributeDefinition();
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
<td><?php echo $this->getAttributeValue($attribute); ?></td>
</tr>
<?php
} /* }}} */
public function subtree() { /* {{{ */
$user = $this->params['user'];
$node = $this->params['node'];
@ -307,13 +322,7 @@ $('body').on('click', '.order-btn', function(ev) {
} elseif(is_string($arr)) {
echo $arr;
} else {
$attrdef = $attribute->getAttributeDefinition();
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
<td><?php echo $this->getAttributeValue($attribute); ?></td>
</tr>
<?php
$this->printAttribute($attribute);
}
}
}