mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 23:24:57 +00:00
add new method printVersionAttributes()
This commit is contained in:
parent
cce4be822c
commit
bf9a409a71
|
@ -83,6 +83,23 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
protected function printVersionAttributes($folder, $version) { /* {{{ */
|
||||
$attributes = $version->getAttributes();
|
||||
if($attributes) {
|
||||
foreach($attributes as $attribute) {
|
||||
$arr = $this->callHook('showDocumentContentAttribute', $version, $attribute);
|
||||
if(is_array($arr)) {
|
||||
print "<li>".$arr[0].": ".$arr[1]."</li>\n";
|
||||
} else {
|
||||
$attrdef = $attribute->getAttributeDefinition();
|
||||
print "<li>".htmlspecialchars($attrdef->getName()).": ";
|
||||
$this->printAttributeValue($attribute);
|
||||
echo "</li>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
function documentListItem() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
|
@ -623,18 +640,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
print "<p style=\"font-style: italic;\">".htmlspecialchars($latestContent->getComment())."</p>";
|
||||
}
|
||||
print "<ul class=\"actions unstyled\">\n";
|
||||
$attributes = $latestContent->getAttributes();
|
||||
if($attributes) {
|
||||
foreach($attributes as $attribute) {
|
||||
$arr = $this->callHook('showDocumentContentAttribute', $latestContent, $attribute);
|
||||
if(is_array($arr)) {
|
||||
print "<li>".$arr[0].": ".$arr[1]."</li>\n";
|
||||
} else {
|
||||
$attrdef = $attribute->getAttributeDefinition();
|
||||
print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars(implode(', ', $attribute->getValueAsArray()))."</li>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->printVersionAttributes($folder, $latestContent);
|
||||
print "</ul></td>\n";
|
||||
|
||||
// print "<td>".htmlspecialchars($latestContent->getComment())."</td>";
|
||||
|
@ -1510,18 +1516,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
print "<p style=\"font-style: italic;\">".htmlspecialchars($version->getComment())."</p>";
|
||||
}
|
||||
print "<ul class=\"actions unstyled\">\n";
|
||||
$attributes = $version->getAttributes();
|
||||
if($attributes) {
|
||||
foreach($attributes as $attribute) {
|
||||
$arr = $this->callHook('showDocumentContentAttribute', $version, $attribute);
|
||||
if(is_array($arr)) {
|
||||
print "<li>".$arr[0].": ".$arr[1]."</li>\n";
|
||||
} else {
|
||||
$attrdef = $attribute->getAttributeDefinition();
|
||||
print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars(implode(', ', $attribute->getValueAsArray()))."</li>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->printVersionAttributes($folder, $version);
|
||||
print "</ul></td>\n";
|
||||
// print "<td>".htmlspecialchars($version->getComment())."</td>";
|
||||
print "<td>".getOverallStatusText($vstat["status"])."</td>";
|
||||
|
|
Loading…
Reference in New Issue
Block a user