new: [UI] show which attributes/objects are new and awaiting publication still

pull/9275/head
iglocska 2023-09-06 09:01:21 +02:00
parent 53023b95a7
commit c7d9575908
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 6 additions and 2 deletions

View File

@ -11,6 +11,9 @@
} else {
$attributeEvent = $event;
}
$isNew = $object['timestamp'] > $event['Event']['publish_timestamp'];
$editScope = $mayModify ? 'Attribute' : 'ShadowAttribute';
if (!empty($child)) {
if ($child === 'last' && empty($object['ShadowAttribute'])) {
@ -69,7 +72,7 @@
<td class="short context hidden">
<?php echo $this->element('/Events/View/seen_field', array('object' => $object)); ?>
</td>
<td class="short timestamp"><?= $this->Time->date($object['timestamp']) ?></td>
<td class="short timestamp <?= $isNew ? 'bold red' : '' ?>" <?= $isNew ? 'title="' . __('Element or modification to an existing element has not been published yet.') . '"' : '' ?>><?= $this->Time->date($object['timestamp']) . ($isNew ? '*' : '') ?></td>
<?php
if (!empty($extended)):
?>

View File

@ -7,6 +7,7 @@
} else {
$objectEvent = $event;
}
$isNew = $object['timestamp'] > $event['Event']['publish_timestamp'];
if ($object['deleted']) $tr_class .= ' lightBlueRow';
else $tr_class .= ' blueRow';
if (!empty($k)) {
@ -33,7 +34,7 @@ $objectId = intval($object['id']);
<td class="short context hidden">
<?php echo $this->element('/Events/View/seen_field', array('object' => $object)); ?>
</td>
<td class="short timestamp"><?= $this->Time->date($object['timestamp']) ?></td>
<td class="short timestamp <?= $isNew ? 'bold red' : '' ?>" <?= $isNew ? 'title="' . __('Element or modification to an existing element has not been published yet.') . '"' : '' ?>><?= $this->Time->date($object['timestamp']) . ($isNew ? '*' : '') ?></td>
<?php
if ($extended):
?>