mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-15 06:01:19 +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>
|
<tr>
|
||||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
|
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
|
||||||
<td>
|
<td><?php echo $this->getAttributeValue($attribute); ?></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>
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
@ -192,7 +169,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
$latestContent = $document->getLatestContent();
|
$latestContent = $document->getLatestContent();
|
||||||
$this->printTimelineJs('out.ViewDocument.php?action=timelinedata&documentid='.$latestContent->getDocument()->getID(), 300, '', date('Y-m-d'));
|
$this->printTimelineJs('out.ViewDocument.php?action=timelinedata&documentid='.$latestContent->getDocument()->getID(), 300, '', date('Y-m-d'));
|
||||||
}
|
}
|
||||||
$this->printDocumentChooserJs("form1");
|
// $this->printDocumentChooserJs("form1");
|
||||||
$this->printDeleteDocumentButtonJs();
|
$this->printDeleteDocumentButtonJs();
|
||||||
/* Add js for catching click on document in one page mode */
|
/* Add js for catching click on document in one page mode */
|
||||||
$this->printClickDocumentJs();
|
$this->printClickDocumentJs();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user