mirror of https://github.com/MISP/MISP
fix: [UI] Correctly handle links to related events
parent
4f31876890
commit
fd150d5fe0
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
$i = 0;
|
||||
$linkColour = ($scope == 'Attribute') ? 'red' : 'white';
|
||||
$withPivot = isset($withPivot) ? $withPivot : false;
|
||||
// remove duplicates
|
||||
$relatedEvents = array();
|
||||
foreach ($event['Related' . $scope][$object['id']] as $k => $relatedAttribute) {
|
||||
|
@ -32,8 +33,10 @@ foreach ($event['Related' . $scope][$object['id']] as $relatedAttribute) {
|
|||
}
|
||||
$link = $this->Html->link(
|
||||
$relatedAttribute['id'],
|
||||
array('controller' => 'events', 'action' => 'view', $relatedAttribute['id'], true, $event['Event']['id']),
|
||||
array('class' => ($relatedAttribute['org_id'] == $me['org_id']) ? $linkColour : 'blue')
|
||||
$withPivot ?
|
||||
['controller' => 'events', 'action' => 'view', $relatedAttribute['id'], true, $event['Event']['id']] :
|
||||
['controller' => 'events', 'action' => 'view', $relatedAttribute['id']],
|
||||
['class' => ($relatedAttribute['org_id'] == $me['org_id']) ? $linkColour : 'blue']
|
||||
);
|
||||
echo sprintf(
|
||||
'<li class="no-side-padding %s" %s data-toggle="popover" data-content="%s" data-trigger="hover">%s </li>',
|
||||
|
|
|
@ -210,6 +210,7 @@ $quickEdit = function($fieldName) use ($editScope, $object, $event) {
|
|||
'scope' => 'Attribute',
|
||||
'object' => $object,
|
||||
'event' => $event,
|
||||
'withPivot' => true,
|
||||
));
|
||||
echo '</ul>';
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@
|
|||
'scope' => 'ShadowAttribute',
|
||||
'object' => $object,
|
||||
'event' => $event,
|
||||
'withPivot' => true,
|
||||
));
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue