MISP/app/View/Events/view.ctp

124 lines
4.3 KiB
Plaintext
Raw Normal View History

2011-11-26 10:45:31 +01:00
<div class="events view">
<div class="actions" style="float:right;">
<?php if ( 0 == $event['Event']['alerted'] && ($isAdmin || $event['Event']['org'] == $me['org'])):
// only show button if alert has not been sent // LATER show the ALERT button in red-ish
?>
<ul><li><?php
2012-03-20 08:26:57 +01:00
echo $this->Form->postLink('Publish Event', array('action' => 'alert', $event['Event']['id']), null, 'Are you sure this event is complete and everyone should be alerted?');
?> </li></ul>
2011-11-26 10:45:31 +01:00
<?php elseif (0 == $event['Event']['alerted']): ?>
<ul><li>Not finished editing</li></ul>
<?php else: ?>
<!-- ul><li>Alert already sent</li></ul -->
<?php endif; ?>
<ul><li><?php echo $this->Html->link(__('Contact reporter', true), array('action' => 'contact', $event['Event']['id'])); ?> </li></ul>
2011-11-26 10:45:31 +01:00
</div>
<h2>Event</h2>
<dl>
<dt>ID</dt>
<dd>
2012-01-05 11:03:51 +01:00
<?php echo Sanitize::html($event['Event']['id']); ?>
&nbsp;
</dd>
2012-03-06 07:45:02 +01:00
<?php if ('true' == Configure::read('CyDefSIG.showorg') || $isAdmin): ?>
<dt>Org</dt>
<dd>
2011-11-26 10:45:31 +01:00
<?php echo Sanitize::html($event['Event']['org']); ?>
&nbsp;
</dd>
<?php endif; ?>
<dt>Date</dt>
<dd>
2011-11-26 10:45:31 +01:00
<?php echo Sanitize::html($event['Event']['date']); ?>
&nbsp;
</dd>
<dt>Risk</dt>
<dd>
2011-11-26 10:45:31 +01:00
<?php echo $event['Event']['risk']; ?>
&nbsp;
</dd>
<dt>Info</dt>
<dd>
2011-11-26 10:45:31 +01:00
<?php echo nl2br(Sanitize::html($event['Event']['info'])); ?>
&nbsp;
</dd>
</dl>
2011-11-27 15:32:11 +01:00
<?php if (!empty($relatedEvents)):?>
<div class="related">
<h3>Related Events</h3>
<ul>
<?php foreach ($relatedEvents as $relatedEvent): ?>
<li><?php
$link_text = $relatedEvent['Event']['date'].' ('.$relatedEvent['Event']['id'].')';
echo $this->Html->link($link_text, array('controller' => 'events', 'action' => 'view', $relatedEvent['Event']['id']));
?></li>
<?php endforeach; ?>
</div>
2011-11-27 15:32:11 +01:00
<?php endif; ?>
2011-11-26 10:45:31 +01:00
<div class="related">
<h3>Signatures</h3>
2011-11-26 10:45:31 +01:00
<?php if (!empty($event['Signature'])):?>
<table cellpadding = "0" cellspacing = "0">
<tr>
<th>Type</th>
<th>Value</th>
<th>Related Events</th>
<th>To IDS</th>
<th class="actions" style="text-align:right;">Actions</th>
2011-11-26 10:45:31 +01:00
</tr>
<?php
foreach ($event['Signature'] as $signature):
?>
<tr>
2011-11-26 10:45:31 +01:00
<td><?php echo $signature['type'];?></td>
<td><?php echo nl2br(Sanitize::html($signature['value']));?></td>
<td>
<?php
if (null != $relatedSignatures[$signature['id']]) {
foreach ($relatedSignatures[$signature['id']] as $relatedSignature) {
echo $this->Html->link($relatedSignature['Signature']['event_id'], array('controller' => 'events', 'action' => 'view', $relatedSignature['Signature']['event_id']));
echo ' ';
}
}
?>
</td>
<td><?php echo $signature['to_ids'] ? 'Yes' : 'No';?></td>
2011-11-26 10:45:31 +01:00
<td class="actions" style="text-align:right;">
<?php
if ($isAdmin || $event['Event']['org'] == $me['org']) {
echo $this->Html->link(__('Edit', true), array('controller' => 'signatures', 'action' => 'edit', $signature['id']));
echo $this->Form->postLink(__('Delete'), array('controller' => 'signatures', 'action' => 'delete', $signature['id']), null, __('Are you sure you want to delete this signature?'));
2011-11-26 10:45:31 +01:00
} ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<?php if ($isAdmin || $event['Event']['org'] == $me['org']): ?>
<div class="actions">
<ul>
<li><?php echo $this->Html->link('New Signature', array('controller' => 'signatures', 'action' => 'add', $event['Event']['id']));?> </li>
2011-11-26 10:45:31 +01:00
</ul>
</div>
<?php endif; ?>
</div>
</div>
<div class="actions">
<ul>
<?php if ($isAdmin || $event['Event']['org'] == $me['org']): ?>
<li><?php echo $this->Html->link(__('New Signature', true), array('controller' => 'signatures', 'action' => 'add', $event['Event']['id']));?> </li>
<li><?php echo $this->Html->link(__('Edit Event', true), array('action' => 'edit', $event['Event']['id'])); ?> </li>
<li><?php echo $this->Form->postLink(__('Delete Event'), array('action' => 'delete', $event['Event']['id']), null, __('Are you sure you want to delete # %s?', $event['Event']['id'])); ?></li>
2011-11-26 10:45:31 +01:00
<li>&nbsp;</li>
<?php endif; ?>
<?php echo $this->element('actions_menu'); ?>
</ul>
</div>