mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 23:24:57 +00:00
add new method printAttribute() (just like in 5.1.x)
This commit is contained in:
parent
652acf4b86
commit
e733b4fced
|
@ -83,6 +83,21 @@ class SeedDMS_View_ViewDocument 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
|
||||
} /* }}} */
|
||||
|
||||
protected function printVersionAttributes($folder, $version) { /* {{{ */
|
||||
$attributes = $version->getAttributes();
|
||||
if($attributes) {
|
||||
|
@ -363,13 +378,7 @@ $(document).ready( function() {
|
|||
} 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user