mirror of https://github.com/MISP/MISP
new: [sync] Added sighting sync publish button to the event view
parent
bdfe59766a
commit
dbc229c83c
|
@ -2620,7 +2620,7 @@ class EventsController extends AppController
|
|||
}
|
||||
} else {
|
||||
$this->set('id', $id);
|
||||
$this->set('type', 'publish_sightings');
|
||||
$this->set('type', 'publishSightings');
|
||||
$this->render('ajax/eventPublishConfirmationForm');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,6 +143,16 @@
|
|||
'class' => (isset($event['Event']['published']) && (1 == $event['Event']['published'] && $mayModify)) ? '' : 'hidden',
|
||||
'text' => __('Unpublish')
|
||||
));
|
||||
if (!empty($event['Event']['published']) && $me['Role']['perm_sighting']) {
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_link', array(
|
||||
'onClick' => array(
|
||||
'function' => 'publishPopup',
|
||||
'params' => array($event['Event']['id'], 'sighting')
|
||||
),
|
||||
'class' => 'publishButtons',
|
||||
'text' => __('Publish Sightings')
|
||||
));
|
||||
}
|
||||
if (Configure::read('MISP.delegation')) {
|
||||
if ((Configure::read('MISP.unpublishedprivate') || (isset($event['Event']['distribution']) && $event['Event']['distribution'] == 0)) && (!isset($delegationRequest) || !$delegationRequest) && ($isSiteAdmin || (isset($isAclDelegate) && $isAclDelegate))) {
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_link', array(
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
echo '<p>' . __('Are you sure this event is complete and everyone should be informed?') . '</p>';
|
||||
} else if ($type === 'unpublish') {
|
||||
echo '<p>' . __('Are you sure you wish to unpublish the event?') . '</p>';
|
||||
} else if ($type === 'publishSightings') {
|
||||
echo '<p>' . __('Are you sure you wish publish and synchronise all sightings attached to this event?') . '</p>';
|
||||
} else {
|
||||
echo '<p>' . __('Publish but do NOT send alert email? Only for minor changes!') . '</p>';
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ function publishPopup(id, type) {
|
|||
var action = "alert";
|
||||
if (type == "publish") action = "publish";
|
||||
if (type == "unpublish") action = "unpublish";
|
||||
if (type == "sighting") action = "publishSightings";
|
||||
var destination = 'attributes';
|
||||
$.get( "/events/" + action + "/" + id, function(data) {
|
||||
$("#confirmation_box").html(data);
|
||||
|
|
Loading…
Reference in New Issue