mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-01-26 02:59:51 +00:00
use filter parameter of getAttributeDefinitions(), call hook
This commit is contained in:
parent
188b53789e
commit
50fa5a991c
|
|
@ -237,15 +237,22 @@ function folderSelected(id, name) {
|
|||
$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_folder));
|
||||
echo "<tr><td colspan=\"2\"><b>".htmlspecialchars($attrdefgrp['group']->getName())."</b></td></tr>";
|
||||
$attrdefs = $attrdefgrp['group']->getAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_all, SeedDMS_Core_AttributeDefinition::objtype_folder), 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'];
|
||||
if($attrdefarr['show'] & SeedDMS_Core_AttributeDefinitionGroup::show_details) {
|
||||
$attribute = $folder->getAttribute($attrdef);
|
||||
if($attribute)
|
||||
$attribute = $folder->getAttribute($attrdef);
|
||||
if($attribute) {
|
||||
$arr = $this->callHook('showFolderAttribute', $folder, $attribute);
|
||||
if(is_array($arr)) {
|
||||
echo "<tr>";
|
||||
echo "<td>".$arr[0].":</td>";
|
||||
echo "<td>".$arr[1].":</td>";
|
||||
echo "</tr>";
|
||||
} else {
|
||||
$this->printAttribute($attribute);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -256,7 +263,6 @@ function folderSelected(id, name) {
|
|||
foreach($attributes as $attribute) {
|
||||
$arr = $this->callHook('showFolderAttribute', $folder, $attribute);
|
||||
if(is_array($arr)) {
|
||||
echo $txt;
|
||||
echo "<tr>";
|
||||
echo "<td>".$arr[0].":</td>";
|
||||
echo "<td>".$arr[1].":</td>";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user