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>
2012-07-19 14:53:12 +02:00
<th><?php echo $this->Paginator->sort('user_id', 'Email');?></th>
2012-01-17 10:43:31 +01:00
<?php endif; ?>
2011-11-26 10:45:31 +01:00
<th><?php echo $this->Paginator->sort('date');?></th>
2012-06-05 10:00:36 +02:00
<th<?php echo ' title="' . $event_descriptions['risk']['desc'] . '"';?>><?php echo $this->Paginator->sort('risk');?></th>
2011-11-26 10:45:31 +01:00
<th><?php echo $this->Paginator->sort('info');?></th>
2012-04-01 18:41:47 +02:00
<?php if ('true' == Configure::read('CyDefSIG.sync')): ?>
2012-05-29 16:50:45 +02:00
<th<?php echo ' title="' . $event_descriptions['private']['desc'] . '"';?>><?php echo $this->Paginator->sort('private');?></th>
2012-04-01 18:41:47 +02:00
<?php endif; ?>
2012-03-15 15:06:45 +01:00
<th class="actions"><?php echo __('Actions');?></th>
2011-11-26 10:45:31 +01:00
</tr>
<?php
2012-03-25 16:25:16 +02:00
foreach ($events as $event):
2011-11-26 10:45:31 +01:00
?>
2012-03-15 15:06:45 +01:00
<tr>
2012-06-25 08:00:08 +02:00
<td class="short">
2012-07-20 13:27:55 +02:00
<?php echo $this->Html->link($event['Event']['id'], array('controller' => 'attributes', 'action' => 'event', $event['Event']['id'])); ?>
2012-03-15 15:06:45 +01:00
</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) ;?>';">
2012-06-05 10:00:36 +02:00
<?php echo h($event['Event']['org']); ?> </td>
2012-07-19 14:53:12 +02:00
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true) ;?>';">
<?php echo h($event['User']['email']); ?> </td>
2012-01-17 10:43:31 +01:00
<?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) ;?>';">
2012-03-16 14:13:31 +01:00
<?php echo $event['Event']['date']; ?> </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) ;?>';">
2012-03-16 14:13:31 +01:00
<?php echo $event['Event']['risk']; ?> </td>
<td onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true) ;?>';">
2012-06-05 10:00:36 +02:00
<?php echo nl2br(h($event['Event']['info'])); ?> </td>
2012-04-01 18:41:47 +02:00
<?php if ('true' == Configure::read('CyDefSIG.sync')): ?>
<td class="short" onclick="document.location ='<?php echo $this->Html->url(array('action' => 'view', $event['Event']['id']), true) ;?>';">
<?php echo ($event['Event']['private'])? 'Private' : ''; ?> </td>
<?php endif; ?>
2012-03-15 15:06:45 +01:00
<td class="actions">
2012-03-25 16:25:16 +02:00
<?php
2012-03-27 14:49:31 +02:00
if (0 == $event['Event']['published'] && ($isAdmin || $event['Event']['org'] == $me['org']))
2012-05-16 10:27:09 +02: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 informed?');
2012-03-27 14:49:31 +02:00
elseif (0 == $event['Event']['published']) echo 'Not published';
2011-11-26 10:45:31 +01:00
?>
2012-03-25 16:25:16 +02:00
<?php
2011-11-26 10:45:31 +01:00
if ($isAdmin || $event['Event']['org'] == $me['org']) {
echo $this->Html->link(__('Edit', true), array('action' => 'edit', $event['Event']['id']));
2012-03-25 16:25:16 +02:00
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
}
?>
2012-07-20 13:27:55 +02:00
<?php echo $this->Html->link(__('View', true), array('controller' => 'attributes', 'action' => 'event', $event['Event']['id'])); ?>
2011-11-26 10:45:31 +01:00
</td>
</tr>
<?php endforeach; ?>
</table>
<p>
<?php
echo $this->Paginator->counter(array(
2012-03-15 15:06:45 +01:00
'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>