MISP/app/View/Events/index.ctp

67 lines
3.2 KiB
Plaintext
Raw Normal View History

2011-11-26 10:45:31 +01:00
<div class="events index">
2011-11-26 12:29:56 +01:00
<h2>Events</h2>
2011-11-26 10:45:31 +01:00
<table cellpadding="0" cellspacing="0">
<tr>
2012-01-05 11:03:51 +01:00
<th><?php echo $this->Paginator->sort('id');?></th>
2012-03-06 07:45:02 +01:00
<?php if ('true' == Configure::read('CyDefSIG.showorg') || $isAdmin): ?>
2011-11-26 10:45:31 +01:00
<th><?php echo $this->Paginator->sort('org');?></th>
<?php endif; ?>
2011-11-26 10:45:31 +01:00
<th><?php echo $this->Paginator->sort('date');?></th>
<th><?php echo $this->Paginator->sort('risk');?></th>
<th><?php echo $this->Paginator->sort('info');?></th>
<th class="actions"><?php echo __('Actions');?></th>
2011-11-26 10:45:31 +01:00
</tr>
<?php
foreach ($events as $event):
2011-11-26 10:45:31 +01:00
?>
<tr>
2012-03-20 15:11:02 +01:00
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true) ;?>';">
<?php echo $this->Html->link($event['Event']['id'], array('controller' => 'events', 'action' => 'view', $event['Event']['id'])); ?>
&nbsp;</td>
2012-03-06 07:45:02 +01:00
<?php if ('true' == Configure::read('CyDefSIG.showorg') || $isAdmin): ?>
2012-03-20 15:11:02 +01:00
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true) ;?>';">
<?php echo Sanitize::html($event['Event']['org']); ?>&nbsp;</td>
<?php endif; ?>
2012-03-20 15:11:02 +01:00
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true) ;?>';">
<?php echo $event['Event']['date']; ?>&nbsp;</td>
2012-03-20 15:11:02 +01:00
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true) ;?>';">
<?php echo $event['Event']['risk']; ?>&nbsp;</td>
<td onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true) ;?>';">
<?php echo nl2br(Sanitize::html($event['Event']['info'])); ?>&nbsp;</td>
<td class="actions">
2011-11-26 10:45:31 +01:00
<?php
if (0 == $event['Event']['alerted'] && ($isAdmin || $event['Event']['org'] == $me['org']))
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?');
2012-03-21 11:01:37 +01:00
elseif (0 == $event['Event']['alerted']) echo 'Not published';
2011-11-26 10:45:31 +01:00
?>
<?php
if ($isAdmin || $event['Event']['org'] == $me['org']) {
echo $this->Html->link(__('Edit', true), array('action' => 'edit', $event['Event']['id']));
echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $event['Event']['id']), null, __('Are you sure you want to delete # %s?', $event['Event']['id']));
2011-11-26 10:45:31 +01:00
}
?>
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $event['Event']['id'])); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<p>
<?php
echo $this->Paginator->counter(array(
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
2011-11-26 10:45:31 +01:00
));
?> </p>
<div class="paging">
<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
| <?php echo $this->Paginator->numbers();?>
|
<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
</div>
</div>
<div class="actions">
<ul>
<?php echo $this->element('actions_menu'); ?>
</ul>
</div>