mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
move code into getAttributeValue()
This commit is contained in:
parent
f1d1c01c70
commit
d7fe2087d1
|
@ -93,30 +93,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
switch($attrdef->getType()) {
|
||||
case SeedDMS_Core_AttributeDefinition::type_url:
|
||||
$attrs = $attribute->getValueAsArray();
|
||||
$tmp = array();
|
||||
foreach($attrs as $attr) {
|
||||
$tmp[] = '<a href="'.htmlspecialchars($attr).'">'.htmlspecialchars($attr).'</a>';
|
||||
}
|
||||
echo implode('<br />', $tmp);
|
||||
break;
|
||||
case SeedDMS_Core_AttributeDefinition::type_email:
|
||||
$attrs = $attribute->getValueAsArray();
|
||||
$tmp = array();
|
||||
foreach($attrs as $attr) {
|
||||
$tmp[] = '<a mailto="'.htmlspecialchars($attr).'">'.htmlspecialchars($attr).'</a>';
|
||||
}
|
||||
echo implode('<br />', $tmp);
|
||||
break;
|
||||
default:
|
||||
echo htmlspecialchars(implode(', ', $attribute->getValueAsArray()));
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $this->getAttributeValue($attribute); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
} /* }}} */
|
||||
|
@ -192,7 +169,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$latestContent = $document->getLatestContent();
|
||||
$this->printTimelineJs('out.ViewDocument.php?action=timelinedata&documentid='.$latestContent->getDocument()->getID(), 300, '', date('Y-m-d'));
|
||||
}
|
||||
$this->printDocumentChooserJs("form1");
|
||||
// $this->printDocumentChooserJs("form1");
|
||||
$this->printDeleteDocumentButtonJs();
|
||||
/* Add js for catching click on document in one page mode */
|
||||
$this->printClickDocumentJs();
|
||||
|
|
Loading…
Reference in New Issue
Block a user