Skip to content

Commit

Permalink
Changelog UI fixes (CFM-489) (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
arlen authored Nov 15, 2025
1 parent ecae991 commit 2ca4603
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/resources/locales/en_US/field.po
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ msgstr "Actor Identifier"
msgid "changelog.deleted"
msgstr "Deleted"

msgid "changelog.parent"
msgstr "Parent Record ID"
msgid "changelog.active"
msgstr "Active Record ID"

msgid "changelog.revision"
msgstr "Revision"
Expand Down
19 changes: 10 additions & 9 deletions app/templates/element/changelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@
<td><?= $vv_obj->actor_identifier ?></td>
</tr>
<?php foreach($vv_archives as $archive): ?>
<tr>
<tr class="linked-row">
<td><?=
$this->Html->link(
$archive->id,
['action' => 'view', $archive->id]
['action' => 'view', $archive->id],
['class' => 'row-link']
)
?></td>
<td><?= $archive->revision ?></td>
Expand All @@ -119,16 +120,16 @@
<div class="fieldname"><?= __d('field', 'changelog.actor_identifier') ?></div>
<div class="fieldval"><?= $vv_obj->actor_identifier ?></div>
</li>
<li>
<div class="fieldname"><?= __d('field', 'changelog.parent') ?></div>
<div class="fieldval">
<li class="linked-row">
<div class="fieldname"><?= __d('field', 'changelog.active') ?></div>
<div class="fieldval changelog-active-link-container">
<?php if(!empty($vv_obj->$clAttr)): ?>
<a class="changelog-parent-link" href="<?= $parentUrl ?>">
<a class="changelog-active-link row-link" href="<?= $parentUrl ?>">
<div class="changelog-parent-id"><?= $vv_obj->$clAttr ?></div>
<div class="changelog-parent-link-button btn btn-sm btn-primary">
<?= __d('operation','changelog.return') ?>
</div>
</a>
<button class="changelog-active-link-button btn btn-sm btn-primary">
<?= __d('operation','changelog.return') ?>
</button>
<?php endif; ?>
</div>
</li>
Expand Down
6 changes: 6 additions & 0 deletions app/templates/element/javascript.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,12 @@
}
$('#changelog accordion-button').toggle();
});

$('button.changelog-active-link-button').click(function(e) {
// Get the anchor from active link
const activeLinkUrl = $('a.changelog-active-link').attr('href');
window.location.href = activeLinkUrl;
});

// SETTINGS (from User Menu)
// Dark Mode toggles (auto is default)
Expand Down
6 changes: 6 additions & 0 deletions app/webroot/css/co-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -2831,6 +2831,12 @@ html.density-large .field-data {
#changelog .accordion-body li:first-child {
border-top: none;
}
.changelog-active-link-container {
display: flex;
gap: 1rem;
justify-content: space-between;
align-items: center;
}
/* FOOTER */
footer {
text-align: center;
Expand Down

0 comments on commit 2ca4603

Please sign in to comment.