modifications following Stephen's comments

This commit is contained in:
Anne-Cath
2026-05-19 17:14:11 +02:00
parent e47c181e4d
commit 35c2575525
21 changed files with 546 additions and 8 deletions

View File

@@ -525,8 +525,9 @@ JS
$sSynchroTagId = 'synchro_icon-'.$this->GetKey();
$aTags[$sSynchroTagId] = ['title' => $sTip, 'css_classes' => 'ibo-object-details--tag--synchronized', 'decoration_classes' => 'fas fa-lock', 'label' => $sLabel];
if (UserRights::IsActionAllowed('SynchroReplica', UR_ACTION_READ)) {
$sFilter = 'SELECT SynchroReplica WHERE dest_class=\''.get_class($this).'\' AND dest_id='.$this->GetKey();
$sUrlSearchReplica = 'UI.php?operation=search&filter='.urlencode(json_encode([$sFilter, [], []]));
$oDBSearch = DBObjectSearch::FromOQL('SELECT SynchroReplica WHERE dest_class=:sClass AND dest_id=:id');;
$sFilter = rawurlencode($oDBSearch->serialize(false,['sClass'=>get_class($this),'id'=>$this->GetKey()]));
$sUrlSearchReplica = 'UI.php?operation=search&filter='.$sFilter;
$oPage->add_ready_script("$('#$sSynchroTagId').on('click',function() {window.location = '$sUrlSearchReplica' });");
}
}