show date attributes as range

This commit is contained in:
Uwe Steinmann 2021-03-12 10:09:23 +01:00
parent 6ead3fe425
commit cc7618fde1

View File

@ -263,7 +263,14 @@ function typeahead() { /* {{{ */
?> ?>
<tr> <tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td> <td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
<td><?php $this->printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true) ?></td> <td>
<?php
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date)
echo $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['from']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['from'])) : '', 'attributes', true, 'from').'&nbsp; '.getMLText('to').' '.$this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['to']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['to'])) : '', 'attributes', true, 'to');
else
$this->printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true)
?>
</td>
</tr> </tr>
<?php <?php
@ -370,7 +377,13 @@ function typeahead() { /* {{{ */
?> ?>
<tr> <tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td> <td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
<td><?php $this->printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true) ?></td> <td>
<?php
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date)
echo $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['from']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['from'])) : '', 'attributes', true, 'from').'&nbsp; '.getMLText('to').' '.$this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['to']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['to'])) : '', 'attributes', true, 'to');
else
$this->printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true)
?></td>
</tr> </tr>
<?php <?php