Commit 8ee666cd authored by Administrator's avatar Administrator

Update 1 files via Son of Anton

parent c857f2e4
...@@ -87,10 +87,32 @@ ...@@ -87,10 +87,32 @@
<?= e($r['entity_label'] ?? '—') ?> <?= e($r['entity_label'] ?? '—') ?>
<?php endif; ?> <?php endif; ?>
</td> </td>
<td style="font-size:12px;color:#6B7280;max-width:200px;overflow:hidden;text-overflow:ellipsis;"> <td style="font-size:12px;color:#6B7280;max-width:300px;">
<?php if ($r['changed_fields_json']): ?> <?php if ($r['changed_fields_json']): ?>
<?php $fields = json_decode($r['changed_fields_json'], true); ?> <?php $fields = json_decode($r['changed_fields_json'], true); ?>
<?= e(implode(', ', $fields ?? [])) ?> <?php if (is_array($fields) && !empty($fields)): ?>
<?php
$first3 = array_slice($fields, 0, 3, true);
foreach ($first3 as $fname => $fchange):
if (is_array($fchange) && isset($fchange['from'])):
?>
<div style="margin-bottom:2px;">
<strong style="color:#374151;"><?= e($fname) ?>:</strong>
<span style="color:#DC2626;text-decoration:line-through;"><?= e(mb_substr((string)($fchange['from'] ?? '—'), 0, 30)) ?></span>
<span style="color:#059669;"><?= e(mb_substr((string)($fchange['to'] ?? '—'), 0, 30)) ?></span>
</div>
<?php elseif (is_string($fchange)): ?>
<span style="background:#F3F4F6;padding:1px 5px;border-radius:3px;font-size:11px;margin-left:3px;"><?= e($fchange) ?></span>
<?php else: ?>
<span style="background:#F3F4F6;padding:1px 5px;border-radius:3px;font-size:11px;margin-left:3px;"><?= e($fname) ?></span>
<?php endif; endforeach; ?>
<?php if (count($fields) > 3): ?>
<span style="color:#9CA3AF;font-size:11px;">+<?= count($fields) - 3 ?> حقل آخر</span>
<?php endif; ?>
<?php else: ?>
<?php endif; ?>
<?php elseif ($r['notes']): ?> <?php elseif ($r['notes']): ?>
<?= e(mb_substr($r['notes'], 0, 80)) ?> <?= e(mb_substr($r['notes'], 0, 80)) ?>
<?php else: ?> <?php else: ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment