More UI changes

pull/217/head
iglocska 2013-06-03 10:48:38 +02:00
parent 0c30fd1227
commit 7691476fae
7 changed files with 223 additions and 80 deletions

View File

@ -2,46 +2,78 @@
<?php echo $this->Form->create('Attribute');?> <?php echo $this->Form->create('Attribute');?>
<fieldset> <fieldset>
<legend><?php echo __('Add Attribute'); ?></legend> <legend><?php echo __('Add Attribute'); ?></legend>
<?php <?php
echo $this->Form->hidden('event_id'); echo $this->Form->hidden('event_id');
echo $this->Form->input('category', array( echo $this->Form->input('category', array(
'between' => $this->Html->div('forminfo', '', array('id' => 'AttributeCategoryDiv')), 'after' => $this->Html->div('forminfo', '', array('id' => 'AttributeCategoryDiv')),
'empty' => '(choose one)' 'empty' => '(choose one)'
));
echo $this->Form->input('type', array(
'after' => $this->Html->div('forminfo', '', array('id' => 'AttributeTypeDiv')),
'empty' => '(first choose category)'
));
if ('true' == Configure::read('CyDefSIG.sync')) {
echo $this->Form->input('distribution', array(
'label' => 'Distribution',
'selected' => $maxDist,
'after' => $this->Html->div('forminfo', '', array('id' => 'AttributeDistributionDiv'))
));
}
echo $this->Form->input('value', array(
'type' => 'textarea',
'error' => array('escape' => false),
'div' => 'input clear',
'class' => 'input-xxlarge'
)); ));
echo $this->Form->input('type', array( ?>
'between' => $this->Html->div('forminfo', '', array('id' => 'AttributeTypeDiv')), <div class="input clear"></div>
'empty' => '(first choose category)' <?php
echo $this->Form->input('to_ids', array(
'checked' => true,
'after' => $this->Html->div('forminfo', isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc']),
'label' => 'IDS Signature?',
));
echo $this->Form->input('batch_import', array(
'type' => 'checkbox',
'after' => $this->Html->div('forminfo', 'Create multiple attributes one per line'),
)); ));
if ('true' == Configure::read('CyDefSIG.sync')) {
echo $this->Form->input('distribution', array('label' => 'Distribution', 'selected' => $maxDist,
'between' => $this->Html->div('forminfo', '', array('id' => 'AttributeDistributionDiv'))
));
}
echo $this->Form->input('to_ids', array(
'checked' => true,
'before' => $this->Html->div('forminfo', isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc']),
'label' => 'IDS Signature?'
));
echo $this->Form->input('batch_import', array(
'type' => 'checkbox',
'after' => $this->Html->div('forminfo', 'Create multiple attributes one per line'),
));
echo $this->Form->input('value', array(
'type' => 'textarea',
'error' => array('escape' => false),
));
// link an onchange event to the form elements // link an onchange event to the form elements
$this->Js->get('#AttributeCategory')->event('change', 'formCategoryChanged("#AttributeCategory")'); $this->Js->get('#AttributeCategory')->event('change', 'formCategoryChanged("#AttributeCategory")');
$this->Js->get('#AttributeType')->event('change', 'showFormInfo("#AttributeType")'); $this->Js->get('#AttributeType')->event('change', 'showFormInfo("#AttributeType")');
$this->Js->get('#AttributeDistribution')->event('change', 'showFormInfo("#AttributeDistribution")'); $this->Js->get('#AttributeDistribution')->event('change', 'showFormInfo("#AttributeDistribution")');
?> ?>
</fieldset> </fieldset>
<?php echo $this->Form->end(__('Submit'));?> <?php
echo $this->Form->button('Submit', array('class' => 'btn btn-primary'));
echo $this->Form->end();
?>
</div> </div>
<div class="actions"> <div class="actions">
<ul> <ul class="nav nav-list">
<li><?php echo $this->Html->link(__('View Event', true), array('controller' => 'events' ,'action' => 'view', $this->request->data['Attribute']['event_id'])); ?> </li> <li><?php echo $this->Html->link('View Event', array('controller' => 'events', 'action' => 'view', $this->request->data['Attribute']['event_id'])); ?> </li>
<?php if ($isSiteAdmin || $mayModify): ?>
<li><?php echo $this->Html->link('Edit Event', array('controller' => 'events', 'action' => 'edit', $this->request->data['Attribute']['event_id'])); ?> </li>
<li><?php echo $this->Form->postLink('Delete Event', array('controller' => 'events', 'action' => 'delete', $this->request->data['Attribute']['event_id']), null, __('Are you sure you want to delete # %s?', $this->request->data['Attribute']['event_id'])); ?></li>
<li class="divider"></li>
<li class="active"><?php echo $this->Html->link('Add Attribute', array('controller' => 'attributes', 'action' => 'add', $this->request->data['Attribute']['event_id']));?> </li>
<li><?php echo $this->Html->link('Add Attachment', array('controller' => 'attributes', 'action' => 'add_attachment', $this->request->data['Attribute']['event_id']));?> </li>
<li><?php echo $this->Html->link('Populate event from IOC', array('controller' => 'events', 'action' => 'addIOC', $this->request->data['Attribute']['event_id']));?> </li>
<?php else: ?>
<li><?php echo $this->Html->link('Propose Attribute', array('controller' => 'shadow_attributes', 'action' => 'add', $this->request->data['Attribute']['event_id']));?> </li>
<li><?php echo $this->Html->link('Propose Attachment', array('controller' => 'shadow_attributes', 'action' => 'add_attachment', $this->request->data['Attribute']['event_id']));?> </li>
<?php endif; ?>
<li class="divider"></li>
<li><?php echo $this->Html->link(__('Contact reporter', true), array('controller' => 'events', 'action' => 'contact', $this->request->data['Attribute']['event_id'])); ?> </li>
<li><?php echo $this->Html->link(__('Download as XML', true), array('controller' => 'events', 'action' => 'xml', 'download', $this->request->data['Attribute']['event_id'])); ?></li>
<li><?php echo $this->Html->link(__('Download as IOC', true), array('controller' => 'events', 'action' => 'downloadOpenIOCEvent', $this->request->data['Attribute']['event_id'])); ?> </li>
<li class="divider"></li>
<li><?php echo $this->Html->link('List Events', array('controller' => 'events', 'action' => 'index')); ?></li>
<?php if ($isAclAdd): ?>
<li><?php echo $this->Html->link('Add Event', array('controller' => 'events', 'action' => 'add')); ?></li>
<?php endif; ?>
</ul>
</div>
</ul> </ul>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -1,35 +1,68 @@
<div class="attributes form"> <div class="attributes form">
<?php echo $this->Form->create('Attribute', array('enctype' => 'multipart/form-data','onSubmit' => 'document.getElementById("AttributeMalware").removeAttribute("disabled");'));?> <?php echo $this->Form->create('Attribute', array('enctype' => 'multipart/form-data','onSubmit' => 'document.getElementById("AttributeMalware").removeAttribute("disabled");'));?>
<fieldset> <fieldset>
<legend><?php echo __('Add Attachment'); ?></legend> <legend><?php echo __('Add Attachment'); ?></legend>
<?php <?php
echo $this->Form->hidden('event_id'); echo $this->Form->hidden('event_id');
echo $this->Form->input('category', array('between' => $this->Html->div('forminfo', '', array('id' => 'AttributeCategoryDiv')))); echo $this->Form->input('category', array(
echo $this->Form->file('value', array( 'after' => $this->Html->div('forminfo', '', array('id' => 'AttributeCategoryDiv')),
'error' => array('escape' => false), ));
)); if ('true' == Configure::read('CyDefSIG.sync')) {
echo $this->Form->input('malware', array( echo $this->Form->input('distribution', array('label' => 'Distribution', 'selected' => $maxDist,
'type' => 'checkbox', 'after' => $this->Html->div('forminfo', '', array('id' => 'AttributeDistributionDiv')),
'checked' => false, ));
'after' => '<br>Tick this box to neutralize the sample. Every malware sample will be zipped with the password "infected"', //'before' => $this->Html->div('forminfo', isset($attrDescriptions['distribution']['formdesc']) ? $attrDescriptions['distribution']['formdesc'] : $attrDescriptions['distribution']['desc']),));
)); }
if ('true' == Configure::read('CyDefSIG.sync')) { ?>
echo $this->Form->input('distribution', array('label' => 'Distribution', 'selected' => $maxDist, <div class="input clear"></div>
'between' => $this->Html->div('forminfo', '', array('id' => 'AttributeDistributionDiv')) <div class="input">
)); <?php
//'before' => $this->Html->div('forminfo', isset($attrDescriptions['distribution']['formdesc']) ? $attrDescriptions['distribution']['formdesc'] : $attrDescriptions['distribution']['desc']),)); echo $this->Form->file('value', array(
} 'error' => array('escape' => false),
// link an onchange event to the form elements ));
$this->Js->get('#AttributeType')->event('change', 'showFormInfo("#AttributeType")'); ?>
$this->Js->get('#AttributeCategory')->event('change', 'showFormInfo("#AttributeCategory")'); </div>
$this->Js->get('#AttributeDistribution')->event('change', 'showFormInfo("#AttributeDistribution")'); <?php
?> echo $this->Form->input('malware', array(
'type' => 'checkbox',
'checked' => false,
'after' => $this->Html->div('forminfo', 'Tick this box to neutralize the sample. Every malware sample will be zipped with the password "infected"', ''),
//'after' => '<br>Tick this box to neutralize the sample. Every malware sample will be zipped with the password "infected"',
));
// link an onchange event to the form elements
$this->Js->get('#AttributeType')->event('change', 'showFormInfo("#AttributeType")');
$this->Js->get('#AttributeCategory')->event('change', 'showFormInfo("#AttributeCategory")');
$this->Js->get('#AttributeDistribution')->event('change', 'showFormInfo("#AttributeDistribution")');
?>
</fieldset> </fieldset>
<?php echo $this->Form->end(__('Upload'));?> <?php
echo $this->Form->button('Upload', array('class' => 'btn btn-primary'));
echo $this->Form->end();
?>
</div> </div>
<div class="actions"> <div class="actions">
<ul> <ul class="nav nav-list">
<li><?php echo $this->Html->link(__('View Event', true), array('controller' => 'events' ,'action' => 'view', $this->request->data['Attribute']['event_id'])); ?> </li> <li><?php echo $this->Html->link('View Event', array('controller' => 'events', 'action' => 'view', $this->request->data['Attribute']['event_id'])); ?> </li>
<?php if ($isSiteAdmin || $mayModify): ?>
<li><?php echo $this->Html->link('Edit Event', array('controller' => 'events', 'action' => 'edit', $this->request->data['Attribute']['event_id'])); ?> </li>
<li><?php echo $this->Form->postLink('Delete Event', array('controller' => 'events', 'action' => 'delete', $this->request->data['Attribute']['event_id']), null, __('Are you sure you want to delete # %s?', $this->request->data['Attribute']['event_id'])); ?></li>
<li class="divider"></li>
<li><?php echo $this->Html->link('Add Attribute', array('controller' => 'attributes', 'action' => 'add', $this->request->data['Attribute']['event_id']));?> </li>
<li class="active"><?php echo $this->Html->link('Add Attachment', array('controller' => 'attributes', 'action' => 'add_attachment', $this->request->data['Attribute']['event_id']));?> </li>
<li><?php echo $this->Html->link('Populate event from IOC', array('controller' => 'events', 'action' => 'addIOC', $this->request->data['Attribute']['event_id']));?> </li>
<?php else: ?>
<li><?php echo $this->Html->link('Propose Attribute', array('controller' => 'shadow_attributes', 'action' => 'add', $this->request->data['Attribute']['event_id']));?> </li>
<li><?php echo $this->Html->link('Propose Attachment', array('controller' => 'shadow_attributes', 'action' => 'add_attachment', $this->request->data['Attribute']['event_id']));?> </li>
<?php endif; ?>
<li class="divider"></li>
<li><?php echo $this->Html->link(__('Contact reporter', true), array('controller' => 'events', 'action' => 'contact', $this->request->data['Attribute']['event_id'])); ?> </li>
<li><?php echo $this->Html->link(__('Download as XML', true), array('controller' => 'events', 'action' => 'xml', 'download', $this->request->data['Attribute']['event_id'])); ?></li>
<li><?php echo $this->Html->link(__('Download as IOC', true), array('controller' => 'events', 'action' => 'downloadOpenIOCEvent', $this->request->data['Attribute']['event_id'])); ?> </li>
<li class="divider"></li>
<li><?php echo $this->Html->link('List Events', array('controller' => 'events', 'action' => 'index')); ?></li>
<?php if ($isAclAdd): ?>
<li><?php echo $this->Html->link('Add Event', array('controller' => 'events', 'action' => 'add')); ?></li>
<?php endif; ?>
</ul> </ul>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -68,7 +68,7 @@ foreach ($attributes as $attribute):
<?php echo h($attribute['Attribute']['category']); ?>&nbsp;</td> <?php echo h($attribute['Attribute']['category']); ?>&nbsp;</td>
<td title="<?php echo $typeDefinitions[$attribute['Attribute']['type']]['desc'];?>" class="short" onclick="document.location ='<?php echo $this->Html->url(array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']), true);?>';"> <td title="<?php echo $typeDefinitions[$attribute['Attribute']['type']]['desc'];?>" class="short" onclick="document.location ='<?php echo $this->Html->url(array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']), true);?>';">
<?php echo h($attribute['Attribute']['type']); ?>&nbsp;</td> <?php echo h($attribute['Attribute']['type']); ?>&nbsp;</td>
<td onclick="document.location ='<?php echo $this->Html->url(array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']), true);?>';"> <td class="short" onclick="document.location ='<?php echo $this->Html->url(array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']), true);?>';">
<?php <?php
$sigDisplay = nl2br(h($attribute['Attribute']['value'])); $sigDisplay = nl2br(h($attribute['Attribute']['value']));
if ($isSearch == 1 && !empty($replacePairs)) { if ($isSearch == 1 && !empty($replacePairs)) {
@ -83,9 +83,9 @@ foreach ($attributes as $attribute):
echo $sigDisplay; echo $sigDisplay;
} }
?>&nbsp;</td> ?>&nbsp;</td>
<td class="short" style="text-align: center;" onclick="document.location ='<?php echo $this->Html->url(array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']), true);?>';"> <td class="short" onclick="document.location ='<?php echo $this->Html->url(array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']), true);?>';">
<?php echo $attribute['Attribute']['to_ids'] ? 'Yes' : 'No'; ?>&nbsp;</td> <?php echo $attribute['Attribute']['to_ids'] ? 'Yes' : 'No'; ?>&nbsp;</td>
<td class="actions"><?php <td class="actions short"><?php
if ($isAdmin || ($isAclModify && $attribute['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $attribute['Event']['org'] == $me['org'])) { if ($isAdmin || ($isAclModify && $attribute['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $attribute['Event']['org'] == $me['org'])) {
echo $this->Html->link('', array('action' => 'edit', $attribute['Attribute']['id']), array('class' => 'icon-edit', 'title' => 'Edit')); echo $this->Html->link('', array('action' => 'edit', $attribute['Attribute']['id']), array('class' => 'icon-edit', 'title' => 'Edit'));
echo $this->Form->postLink('',array('action' => 'delete', $attribute['Attribute']['id']), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete this attribute?')); echo $this->Form->postLink('',array('action' => 'delete', $attribute['Attribute']['id']), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete this attribute?'));

View File

@ -9,5 +9,33 @@ echo $this->Form->input('Event.submittedioc', array(
)); ));
?> ?>
</fieldset> </fieldset>
<?php echo $this->Form->end(__('Submit', true));?> <?php
echo $this->Form->button('Upload', array('class' => 'btn btn-primary'));
echo $this->Form->end();
?>
</div> </div>
<div class="actions">
<ul class="nav nav-list">
<li><?php echo $this->Html->link('View Event', array('controller' => 'events', 'action' => 'view', $id)); ?> </li>
<?php if ($isSiteAdmin || $mayModify): ?>
<li><?php echo $this->Html->link('Edit Event', array('controller' => 'events', 'action' => 'edit', $id)); ?> </li>
<li><?php echo $this->Form->postLink('Delete Event', array('controller' => 'events', 'action' => 'delete', $id), null, __('Are you sure you want to delete # %s?', $id)); ?></li>
<li class="divider"></li>
<li><?php echo $this->Html->link('Add Attribute', array('controller' => 'attributes', 'action' => 'add', $id));?> </li>
<li><?php echo $this->Html->link('Add Attachment', array('controller' => 'attributes', 'action' => 'add_attachment', $id));?> </li>
<li class="active"><?php echo $this->Html->link('Populate event from IOC', array('controller' => 'events', 'action' => 'addIOC', $id));?> </li>
<?php else: ?>
<li><?php echo $this->Html->link('Propose Attribute', array('controller' => 'shadow_attributes', 'action' => 'add', $id));?> </li>
<li><?php echo $this->Html->link('Propose Attachment', array('controller' => 'shadow_attributes', 'action' => 'add_attachment', $id));?> </li>
<?php endif; ?>
<li class="divider"></li>
<li><?php echo $this->Html->link(__('Contact reporter', true), array('controller' => 'events', 'action' => 'contact', $id)); ?> </li>
<li><?php echo $this->Html->link(__('Download as XML', true), array('controller' => 'events', 'action' => 'xml', 'download', $id)); ?></li>
<li><?php echo $this->Html->link(__('Download as IOC', true), array('controller' => 'events', 'action' => 'downloadOpenIOCEvent', $id)); ?> </li>
<li class="divider"></li>
<li><?php echo $this->Html->link('List Events', array('controller' => 'events', 'action' => 'index')); ?></li>
<?php if ($isAclAdd): ?>
<li><?php echo $this->Html->link('Add Event', array('controller' => 'events', 'action' => 'add')); ?></li>
<?php endif; ?>
</ul>
</div>

View File

@ -6,18 +6,51 @@
Feel free to add a custom message that will be sent to the reporting organization. <br/> Feel free to add a custom message that will be sent to the reporting organization. <br/>
Your email address and details about the event will be added automagically to the message.</p> Your email address and details about the event will be added automagically to the message.</p>
<?php <?php
echo $this->Form->input('message', array('type' => 'textarea')); echo $this->Form->input('message', array(
echo $this->Form->input('person', array( 'type' => 'textarea',
'class' => 'input-xxlarge',
));
?>
<div class="input clear"></div>
<?php
echo $this->Form->input('person', array(
'label' => __('Submit only to person', true), 'label' => __('Submit only to person', true),
'type' => 'checkbox', 'type' => 'checkbox',
'class' => 'clear',
'after' => $this->Html->div('forminfo', __('By selecting this box you will contact the creator of the event only.', true)), 'after' => $this->Html->div('forminfo', __('By selecting this box you will contact the creator of the event only.', true)),
)); ?> ));
<?php echo $this->Form->end(__('Submit', true));?> ?>
<div class="input clear">
<?php
echo $this->Form->button('Submit', array('class' => 'btn btn-primary'));
echo $this->Form->end();
?>
</div>
</fieldset> </fieldset>
</div> </div>
<div class="actions"> <div class="actions">
<ul> <ul class="nav nav-list">
<li><?php echo $this->Html->link(__('View Event', true), array('controller' => 'events' ,'action' => 'view', $this->request->data['Event']['id'])); ?> </li> <li><?php echo $this->Html->link('View Event', array('controller' => 'events', 'action' => 'view', $this->request->data['Event']['id'])); ?> </li>
<?php if ($isSiteAdmin || $mayModify): ?>
<li><?php echo $this->Html->link('Edit Event', array('controller' => 'events', 'action' => 'edit', $this->request->data['Event']['id'])); ?> </li>
<li><?php echo $this->Form->postLink('Delete Event', array('controller' => 'events', 'action' => 'delete', $this->request->data['Event']['id']), null, __('Are you sure you want to delete # %s?', $this->request->data['Event']['id'])); ?></li>
<li class="divider"></li>
<li><?php echo $this->Html->link('Add Attribute', array('controller' => 'attributes', 'action' => 'add', $this->request->data['Event']['id']));?> </li>
<li><?php echo $this->Html->link('Add Attachment', array('controller' => 'attributes', 'action' => 'add_attachment', $this->request->data['Event']['id']));?> </li>
<li><?php echo $this->Html->link('Populate event from IOC', array('controller' => 'events', 'action' => 'addIOC', $this->request->data['Event']['id']));?> </li>
<?php else: ?>
<li><?php echo $this->Html->link('Propose Attribute', array('controller' => 'shadow_attributes', 'action' => 'add', $this->request->data['Event']['id']));?> </li>
<li><?php echo $this->Html->link('Propose Attachment', array('controller' => 'shadow_attributes', 'action' => 'add_attachment', $this->request->data['Event']['id']));?> </li>
<?php endif; ?>
<li class="divider"></li>
<li class="active"><?php echo $this->Html->link(__('Contact reporter', true), array('controller' => 'events', 'action' => 'contact', $this->request->data['Event']['id'])); ?> </li>
<li><?php echo $this->Html->link(__('Download as XML', true), array('controller' => 'events', 'action' => 'xml', 'download', $this->request->data['Event']['id'])); ?></li>
<li><?php echo $this->Html->link(__('Download as IOC', true), array('controller' => 'events', 'action' => 'downloadOpenIOCEvent', $this->request->data['Event']['id'])); ?> </li>
<li class="divider"></li>
<li><?php echo $this->Html->link('List Events', array('controller' => 'events', 'action' => 'index')); ?></li>
<?php if ($isAclAdd): ?>
<li><?php echo $this->Html->link('Add Event', array('controller' => 'events', 'action' => 'add')); ?></li>
<?php endif; ?>
</ul> </ul>
</div> </div>

View File

@ -45,20 +45,36 @@ echo $this->Form->end();
</div> </div>
<div class="actions"> <div class="actions">
<ul class="nav nav-list"> <ul class="nav nav-list">
<li><?php echo $this->Html->link(__('View Event', true), array('controller' => 'events' ,'action' => 'view', $this->request->data['Event']['id'])); ?> </li> <li><?php echo $this->Html->link('View Event', array('action' => 'view', $this->request->data['Event']['id'])); ?> </li>
<?php if ($isSiteAdmin || $mayModify): ?>
<li class="active"><?php echo $this->Html->link('Edit Event', array('action' => 'edit', $this->request->data['Event']['id'])); ?> </li>
<li><?php echo $this->Form->postLink('Delete Event', array('action' => 'delete', $this->request->data['Event']['id']), null, __('Are you sure you want to delete # %s?', $this->request->data['Event']['id'])); ?></li>
<li class="divider"></li>
<li><?php echo $this->Html->link('Add Attribute', array('controller' => 'attributes', 'action' => 'add', $this->request->data['Event']['id']));?> </li>
<li><?php echo $this->Html->link('Add Attachment', array('controller' => 'attributes', 'action' => 'add_attachment', $this->request->data['Event']['id']));?> </li>
<li><?php echo $this->Html->link('Populate event from IOC', array('controller' => 'events', 'action' => 'addIOC', $this->request->data['Event']['id']));?> </li>
<?php else: ?>
<li><?php echo $this->Html->link('Propose Attribute', array('controller' => 'shadow_attributes', 'action' => 'add', $this->request->data['Event']['id']));?> </li>
<li><?php echo $this->Html->link('Propose Attachment', array('controller' => 'shadow_attributes', 'action' => 'add_attachment', $this->request->data['Event']['id']));?> </li>
<?php endif; ?>
<li class="divider"></li>
<?php if ( 0 == $this->request->data['Event']['published'] && ($isAdmin || $mayPublish)): ?>
<li><?php echo $this->Form->postLink('Publish Event', array('action' => 'alert', $this->request->data['Event']['id']), null, 'Are you sure this event is complete and everyone should be informed?'); ?></li>
<li><?php echo $this->Form->postLink('Publish (no email)', array('action' => 'publish', $this->request->data['Event']['id']), null, 'Publish but do NOT send alert email? Only for minor changes!'); ?></li>
<?php elseif (0 == $this->request->data['Event']['published']): ?>
<li>Not published</li>
<?php else: ?>
<!-- ul><li>Alert already sent</li></ul -->
<?php endif; ?>
<li><?php echo $this->Html->link(__('Contact reporter', true), array('action' => 'contact', $this->request->data['Event']['id'])); ?> </li>
<li><?php echo $this->Html->link(__('Download as XML', true), array('action' => 'xml', 'download', $this->request->data['Event']['id'])); ?></li>
<li><?php echo $this->Html->link(__('Download as IOC', true), array('action' => 'downloadOpenIOCEvent', $this->request->data['Event']['id'])); ?> </li>
<li class="divider"></li> <li class="divider"></li>
<li><?php echo $this->Html->link('List Events', array('controller' => 'events', 'action' => 'index')); ?></li> <li><?php echo $this->Html->link('List Events', array('controller' => 'events', 'action' => 'index')); ?></li>
<?php if ($isAclAdd): ?> <?php if ($isAclAdd): ?>
<li class="active"><?php echo $this->Html->link('Add Event', array('controller' => 'events', 'action' => 'add')); ?></li> <li><?php echo $this->Html->link('Add Event', array('controller' => 'events', 'action' => 'add')); ?></li>
<?php endif; ?> <?php endif; ?>
<li class="divider"></li>
<li><?php echo $this->Html->link('List Attributes', array('controller' => 'attributes', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link('Search Attributes', array('controller' => 'attributes', 'action' => 'search')); ?> </li>
<li class="divider"></li>
<li><?php echo $this->Html->link('Export', array('controller' => 'events', 'action' => 'export')); ?> </li>
<?php if ($isAclAuth): ?>
<li><?php echo $this->Html->link('Automation', array('controller' => 'events', 'action' => 'automation')); ?></li>
<?php endif;?>
</ul> </ul>
</div> </div>

View File

@ -4,6 +4,7 @@ $mayPublish = ($isAclPublish && $event['Event']['orgc'] == $me['org']);
?> ?>
<div class="actions" style="width:12%"> <div class="actions" style="width:12%">
<ul class="nav nav-list"> <ul class="nav nav-list">
<li class="active"><?php echo $this->Html->link('View Event', array('action' => 'view', $event['Event']['id'])); ?> </li>
<?php if ($isSiteAdmin || $mayModify): ?> <?php if ($isSiteAdmin || $mayModify): ?>
<li><?php echo $this->Html->link('Edit Event', array('action' => 'edit', $event['Event']['id'])); ?> </li> <li><?php echo $this->Html->link('Edit Event', 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> <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>