mirror of https://github.com/MISP/MISP
Pivot thread changed slightly
- There is a reset button in the first arrow - adding an event that exists already in the list should not create a new pivot pointpull/217/head
parent
bfa8aa3d28
commit
fa1af3cd3b
|
@ -242,6 +242,9 @@ class EventsController extends AppController {
|
|||
|
||||
private function __continuePivoting($id, $info, $date){
|
||||
$pivot = $this->Session->read('pivot_thread');
|
||||
foreach ($pivot as $k => $v) {
|
||||
if ($v[0] == $id) return;
|
||||
}
|
||||
$pivot[] = array($id, $info, $date);
|
||||
$this->Session->write('pivot_thread', $pivot);
|
||||
}
|
||||
|
|
|
@ -139,18 +139,21 @@ $mayPublish = ($isAclPublish && $event['Event']['orgc'] == $me['org']);
|
|||
<?php if (sizeOf($allPivots) > 1): ?>
|
||||
<div>
|
||||
<h3>Pivot Thread</h3>
|
||||
<div class="arrow_box">
|
||||
<?php
|
||||
echo $this->Html->link('Reset thread', array('controller' => 'events', 'action' => 'view', $event['Event']['id']));
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
foreach ($allPivots as $k => $v) {
|
||||
?>
|
||||
<div class="arrow_box">
|
||||
?>
|
||||
<div class="arrow_box">
|
||||
<span title="<?php echo h($v[1]); ?>">
|
||||
<?php echo $this->Html->link(h($v[2]) . ' (' . h($v[0]) . ')', array('controller' => 'events', 'action' => 'view', $v[0], true, true));?>
|
||||
<?php echo $this->Html->link(h($v[2]) . ' (' . h($v[0]) . ')', array('controller' => 'events', 'action' => 'view', $v[0], true, true));?>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
|
||||
}
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
Loading…
Reference in New Issue