mirror of https://github.com/MISP/MISP
Further work on the UI
- reworked almost all of the side menues to be centralised - Some fixes for the IOC export not handling two new-ish types correctly - Some changes to the menues (including a few options that didn't exist before) - rework of the popovers in some formspull/217/head
parent
0cb7653d41
commit
3c58e0071a
|
@ -39,7 +39,6 @@ class IOCExportComponent extends Component {
|
|||
|
||||
// This method will turn each eligible attribute into an indicator
|
||||
private function __buildAttribute($attribute) {
|
||||
|
||||
// Hop over attributes that don't have the to ids flag turned on and check whether the attribute is sent for IOC export based on category/type
|
||||
if (!$this->__checkValidTypeForIOC($attribute) || $attribute['to_ids'] == 0) return;
|
||||
|
||||
|
@ -69,6 +68,10 @@ class IOCExportComponent extends Component {
|
|||
$this->final[] = ' <Context document="TaskItem" search="TaskItem/sha1sum" type="mir" />';
|
||||
$this->final[] = ' <Content type="string">' . h($attribute['value']) . '</Content>';
|
||||
break;
|
||||
case 'sha256':
|
||||
$this->final[] = ' <Context document="TaskItem" search="TaskItem/sha256sum" type="mir" />';
|
||||
$this->final[] = ' <Content type="string">' . h($attribute['value']) . '</Content>';
|
||||
break;
|
||||
case 'filename':
|
||||
$this->final[] = ' <Context document="FileItem" search="FileItem/FileName" type="mir" />';
|
||||
$this->final[] = ' <Content type="string">' . h($attribute['value']) . '</Content>';
|
||||
|
@ -81,6 +84,10 @@ class IOCExportComponent extends Component {
|
|||
$this->final[] = ' <Context document="TaskItem" search="TaskItem/sha1sum" type="mir" />';
|
||||
$this->final[] = ' <Content type="string">' . h($attribute['value2']) . '</Content>';
|
||||
break;
|
||||
case 'filename|sha256':
|
||||
$this->final[] = ' <Context document="TaskItem" search="TaskItem/sha256sum" type="mir" />';
|
||||
$this->final[] = ' <Content type="string">' . h($attribute['value2']) . '</Content>';
|
||||
break;
|
||||
case 'ip-src':
|
||||
$this->final[] = ' <Context document="PortItem" search="PortItem/remoteIP" type="mir" />';
|
||||
$this->final[] = ' <Content type="IP">' . h($attribute['value']) . '</Content>';
|
||||
|
@ -140,6 +147,7 @@ class IOCExportComponent extends Component {
|
|||
case 'link':
|
||||
$this->final[] = ' <Context document="URL" search="UrlHistoryItem/URL" type="mir" />';
|
||||
$this->final[] = ' <Content type="md5">' . h($attribute['value2']) . '</Content>';
|
||||
break;
|
||||
}
|
||||
// since regkey|value is enclosed by an AND indicator, it was closed differently in its branch
|
||||
if ($attribute['type'] != 'regkey|value') {
|
||||
|
|
|
@ -44,6 +44,7 @@ class RolesController extends AppController {
|
|||
throw new NotFoundException(__('Invalid role'));
|
||||
}
|
||||
$this->set('role', $this->Role->read(null, $id));
|
||||
$this->set('id', $id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,6 +94,7 @@ class RolesController extends AppController {
|
|||
$this->AdminCrud->adminEdit($id);
|
||||
$passAlong = $this->Role->read(null, $id);
|
||||
$this->set('options', $this->options);
|
||||
$this->set('id', $id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -45,12 +45,12 @@ class ServersController extends AppController {
|
|||
*/
|
||||
public function index() {
|
||||
$this->Server->recursive = 0;
|
||||
if ($this->_IsSiteAdmin()) {
|
||||
if ($this->_isSiteAdmin()) {
|
||||
$this->paginate = array(
|
||||
'conditions' => array(),
|
||||
);
|
||||
} else {
|
||||
if (!$this->userRole['perm_sync']) $this->redirect(array('controller' => 'events', 'action' => 'index'));
|
||||
if (!$this->userRole['perm_sync'] && !$this->userRole['perm_admin']) $this->redirect(array('controller' => 'events', 'action' => 'index'));
|
||||
$conditions['Server.org LIKE'] = $this->Auth->user('org');
|
||||
$this->paginate = array(
|
||||
'conditions' => array($conditions),
|
||||
|
|
|
@ -90,6 +90,7 @@ class UsersController extends AppController {
|
|||
}
|
||||
$roles = $this->User->Role->find('list');
|
||||
$this->set(compact('roles'));
|
||||
$this->set('id', $id);
|
||||
}
|
||||
|
||||
public function change_pw() {
|
||||
|
@ -183,6 +184,7 @@ class UsersController extends AppController {
|
|||
$this->set('user', $this->User->read(null, $id));
|
||||
if (!$this->_isSiteAdmin() && !($this->_isAdmin() && $this->Auth->user('org') == $this->User->data['User']['org'])) throw new MethodNotAllowedException();
|
||||
$temp = $this->User->field('invited_by');
|
||||
$this->set('id', $id);
|
||||
$this->set('user2', $this->User->read(null, $temp));
|
||||
}
|
||||
|
||||
|
@ -301,6 +303,7 @@ class UsersController extends AppController {
|
|||
$orgIds = array('ADMIN', 'NCIRC', 'Other MOD');
|
||||
$orgIds = $this->_arrayToValuesIndexArray($orgIds);
|
||||
$this->set('orgIds', compact('orgIds'));
|
||||
$this->set('id', $id);
|
||||
// XXX ACL, Roles in Users
|
||||
$roles = $this->User->Role->find('list');
|
||||
$this->set(compact('roles'));
|
||||
|
|
|
@ -52,28 +52,8 @@ foreach ($graph as $line): ?>
|
|||
endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('View Event', array('controller' => 'events', 'action' => 'view', $eventId)); ?> </li>
|
||||
<?php if ($isSiteAdmin || $mayModify): ?>
|
||||
<li><?php echo $this->Html->link('Edit Event', array('controller' => 'events', 'action' => 'edit', $eventId)); ?> </li>
|
||||
<li><?php echo $this->Form->postLink('Delete Event', array('controller' => 'events', 'action' => 'delete', $eventId), null, __('Are you sure you want to delete # %s?', $eventId)); ?></li>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('Add Attribute', array('controller' => 'attributes', 'action' => 'add', $eventId));?> </li>
|
||||
<li><?php echo $this->Html->link('Add Attachment', array('controller' => 'attributes', 'action' => 'add_attachment', $eventId));?> </li>
|
||||
<li class="active"><?php echo $this->Html->link('Populate event from IOC', array('controller' => 'events', 'action' => 'addIOC', $eventId));?> </li>
|
||||
<?php else: ?>
|
||||
<li><?php echo $this->Html->link('Propose Attribute', array('controller' => 'shadow_attributes', 'action' => 'add', $eventId));?> </li>
|
||||
<li><?php echo $this->Html->link('Propose Attachment', array('controller' => 'shadow_attributes', 'action' => 'add_attachment', $eventId));?> </li>
|
||||
<?php endif; ?>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link(__('Contact reporter', true), array('controller' => 'events', 'action' => 'contact', $eventId)); ?> </li>
|
||||
<li><?php echo $this->Html->link(__('Download as XML', true), array('controller' => 'events', 'action' => 'xml', 'download', $eventId)); ?></li>
|
||||
<li><?php echo $this->Html->link(__('Download as IOC', true), array('controller' => 'events', 'action' => 'downloadOpenIOCEvent', $eventId)); ?> </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>
|
||||
<?php
|
||||
$event['Event']['id'] = $eventId;
|
||||
$event['Event']['published'] = 0;
|
||||
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addIOC', 'event' => $event));
|
||||
?>
|
|
@ -92,18 +92,11 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<?php
|
||||
if ($isSearch == 1){
|
||||
$searchClass = 'class="active"';
|
||||
$listClass = '';
|
||||
} else {
|
||||
$searchClass = '';
|
||||
$listClass = 'class="active"';
|
||||
}
|
||||
?>
|
||||
<li <?php echo $listClass;?>><?php echo $this->Html->link('List Logs', array('admin' => true, 'action' => 'index'));?></li>
|
||||
<li <?php echo $searchClass;?>><?php echo $this->Html->link('Search Logs', array('admin' => true, 'action' => 'search'));?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
if ($isSearch == 1){
|
||||
$class = 'search';
|
||||
} else {
|
||||
$class = 'index';
|
||||
}
|
||||
echo $this->element('side_menu', array('menuList' => 'logs', 'menuItem' => $class));
|
||||
?>
|
|
@ -21,38 +21,6 @@ echo $this->Form->button('Search', array('class' => 'btn btn-primary'));
|
|||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var formInfoValues = new Array();
|
||||
<?php
|
||||
foreach ($actionDefinitions as $action => $def) {
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['$action'] = \"$info\";\n";
|
||||
}
|
||||
|
||||
$this->Js->get('#LogAction')->event('change', 'showFormInfo("#LogAction")');
|
||||
echo $this->element('side_menu', array('menuList' => 'logs', 'menuItem' => 'search'));
|
||||
?>
|
||||
formInfoValues['ALL'] = '';
|
||||
|
||||
function showFormInfo(id) {
|
||||
idDiv = id+'Div';
|
||||
// LATER use nice animations
|
||||
//$(idDiv).hide('fast');
|
||||
// change the content
|
||||
var value = $(id).val(); // get the selected value
|
||||
$(idDiv).html(formInfoValues[value]); // search in a lookup table
|
||||
|
||||
// show it again
|
||||
$(idDiv).fadeIn('slow');
|
||||
}
|
||||
|
||||
// hide the formInfo things
|
||||
$('#LogActionDiv').hide();
|
||||
|
||||
</script>
|
||||
<?php echo $this->Js->writeBuffer(); ?>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li ><?php echo $this->Html->link('List Logs', array('admin' => true, 'action' => 'index'));?></li>
|
||||
<li class="active"><?php echo $this->Html->link('Search Logs', array('admin' => true, 'action' => 'search'));?></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -15,4 +15,7 @@ if (!$isSiteAdmin) exit();
|
|||
<li><a href="/events/generateCorrelation">generateCorrelation</a></li>
|
||||
<li><a href="/events/generateLocked">generateLocked</a> (This is for upgrading to hotfix 2.1.8 or later, all events that were created by an organisation that doesn't have users on this instance, or only has a single sync user will have their locked setting set to 1)</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'adminTools'));
|
||||
?>
|
|
@ -43,11 +43,6 @@ echo $this->Form->button('Add', array('class' => 'btn btn-primary'));
|
|||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<ul>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'regexp', 'menuItem' => 'edit', 'id' => $this->Form->value('Regexp.id')));
|
||||
?>
|
||||
|
|
|
@ -19,28 +19,14 @@ echo $this->Form->button('Add', array('class' => 'btn btn-primary'));
|
|||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('New User', array('controller' => 'users', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<li><?php echo $this->Html->link('List Users', array('controller' => 'users', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<li class="divider"></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="active"><?php echo $this->Html->link('New Role', array('controller' => 'roles', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
<li><?php echo $this->Html->link('List Roles', array('controller' => 'roles', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('Contact users', array('controller' => 'users', 'action' => 'email', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'addRole'));
|
||||
|
||||
<?php
|
||||
$this->Js->get('#RolePermission')->event('change', 'deactivateActions()');
|
||||
|
||||
$this->Js->get('#RolePermSync')->event('change', 'checkPerms("RolePermSync")');
|
||||
$this->Js->get('#RolePermAdmin')->event('change', 'checkPerms("RolePermAdmin")');
|
||||
$this->Js->get('#RolePermAudit')->event('change', 'checkPerms("RolePermAudit")');
|
||||
$this->Js->get('#RolePermission')->event('change', 'deactivateActions()');
|
||||
|
||||
$this->Js->get('#RolePermSync')->event('change', 'checkPerms("RolePermSync")');
|
||||
$this->Js->get('#RolePermAdmin')->event('change', 'checkPerms("RolePermAdmin")');
|
||||
$this->Js->get('#RolePermAudit')->event('change', 'checkPerms("RolePermAudit")');
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -14,28 +14,14 @@
|
|||
</fieldset>
|
||||
<?php echo $this->Form->end(__('Submit'));?>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('New User', array('controller' => 'users', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<li><?php echo $this->Html->link('List Users', array('controller' => 'users', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<li class="divider"></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><?php echo $this->Html->link('New Role', array('controller' => 'roles', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
<li><?php echo $this->Html->link('List Roles', array('controller' => 'roles', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('Contact users', array('controller' => 'users', 'action' => 'email', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'editRole'));
|
||||
|
||||
<?php
|
||||
$this->Js->get('#RolePermission')->event('change', 'deactivateActions()');
|
||||
|
||||
$this->Js->get('#RolePermSync')->event('change', 'checkPerms("RolePermSync")');
|
||||
$this->Js->get('#RolePermAdmin')->event('change', 'checkPerms("RolePermAdmin")');
|
||||
$this->Js->get('#RolePermAudit')->event('change', 'checkPerms("RolePermAudit")');
|
||||
$this->Js->get('#RolePermission')->event('change', 'deactivateActions()');
|
||||
|
||||
$this->Js->get('#RolePermSync')->event('change', 'checkPerms("RolePermSync")');
|
||||
$this->Js->get('#RolePermAdmin')->event('change', 'checkPerms("RolePermAdmin")');
|
||||
$this->Js->get('#RolePermAudit')->event('change', 'checkPerms("RolePermAudit")');
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -61,18 +61,6 @@ endforeach; ?>
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('New User', array('controller' => 'users', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<li><?php echo $this->Html->link('List Users', array('controller' => 'users', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<li class="divider"></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><?php echo $this->Html->link('New Role', array('controller' => 'roles', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
<li class="active"><?php echo $this->Html->link('List Roles', array('controller' => 'roles', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('Contact users', array('controller' => 'users', 'action' => 'email', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'indexRole'));
|
||||
?>
|
|
@ -55,18 +55,6 @@ endforeach; ?>
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('New User', array('controller' => 'users', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<li><?php echo $this->Html->link('List Users', array('controller' => 'users', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<li class="divider"></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><?php echo $this->Html->link('New Role', array('controller' => 'roles', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
<li class="active"><?php echo $this->Html->link('List Roles', array('controller' => 'roles', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('Contact users', array('controller' => 'users', 'action' => 'email', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'indexRole'));
|
||||
?>
|
|
@ -38,18 +38,6 @@
|
|||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('New User', array('controller' => 'users', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<li><?php echo $this->Html->link('List Users', array('controller' => 'users', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<li class="divider"></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><?php echo $this->Html->link('New Role', array('controller' => 'roles', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
<li><?php echo $this->Html->link('List Roles', array('controller' => 'roles', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('Contact users', array('controller' => 'users', 'action' => 'email', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'indexRole'));
|
||||
?>
|
|
@ -5,23 +5,27 @@
|
|||
<?php
|
||||
echo $this->Form->input('url', array(
|
||||
'label' => 'Base URL',
|
||||
'after' => $this->Html->div('forminfo', 'The base-url to the external server you want to sync with.<br/>Example: <i>https://foo.sig.mil.be</i>'),
|
||||
));
|
||||
?>
|
||||
<div class = "input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('organization', array(
|
||||
'label' => 'Organization',
|
||||
'after' => $this->Html->div('forminfo', 'The organization having the external server you want to sync with.<br/>Example: <i>BE</i>'),
|
||||
));
|
||||
echo $this->Form->input('authkey', array(
|
||||
'after' => $this->Html->div('forminfo', 'You can find the authentication key on your profile on the external server.'),
|
||||
));
|
||||
?>
|
||||
?>
|
||||
<div class = "input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('push', array(
|
||||
'after' => $this->Html->div('forminfo', 'Allow the <em>upload</em> of events and their attributes.'),
|
||||
<?php
|
||||
echo $this->Form->input('authkey', array(
|
||||
));
|
||||
?>
|
||||
<div class = "input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('push', array(
|
||||
));
|
||||
?>
|
||||
<div class = "input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('pull', array(
|
||||
'after' => $this->Html->div('forminfo', 'Allow the <em>download</em> of events and their attributes from the server.'),
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
|
@ -30,10 +34,34 @@ echo $this->Form->button('Add', array('class' => 'btn btn-primary'));
|
|||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('List Servers', array('controller' => 'servers', 'action' => 'index'));?></li>
|
||||
<li class="active"><?php if ($isAclAdd && $me['org'] == 'ADMIN') echo $this->Html->link(__('New Server'), array('controller' => 'servers', 'action' => 'add')); ?></li>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'sync', 'menuItem' => 'add'));
|
||||
?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//
|
||||
var formInfoValues = {
|
||||
'ServerUrl' : "The base-url to the external server you want to sync with. Example: https://foo.sig.mil.be",
|
||||
'ServerOrganization' : "The organization having the external server you want to sync with. Example: BE",
|
||||
'ServerAuthkey' : "You can find the authentication key on your profile on the external server.",
|
||||
'ServerPush' : "Allow the upload of events and their attributes.",
|
||||
'ServerPull' : "Allow the download of events and their attributes from the server.",
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#ServerUrl, #ServerOrganization, #ServerAuthkey, #ServerPush, #ServerPull").on('mouseleave', function(e) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
});
|
||||
|
||||
$("#ServerUrl, #ServerOrganization, #ServerAuthkey, #ServerPush, #ServerPull").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
content: formInfoValues[e.currentTarget.id],
|
||||
}).popover('show');
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -3,38 +3,67 @@
|
|||
<fieldset>
|
||||
<legend>Edit Server</legend>
|
||||
<?php
|
||||
echo $this->Form->input('id');
|
||||
echo $this->Form->input('url', array(
|
||||
'label' => 'Base URL',
|
||||
'before' => $this->Html->div('forminfo', 'The base-url to the external server you want to sync with.<br/>Example: <i>https://foo.sig.mil.be</i>'),
|
||||
));
|
||||
?>
|
||||
<div class = "input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('organization', array(
|
||||
'label' => 'Organization',
|
||||
'before' => $this->Html->div('forminfo', 'The organization having the external server you want to sync with.<br/>Example: <i>BE</i>'),
|
||||
));
|
||||
?>
|
||||
<div class = "input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('authkey', array(
|
||||
'before' => $this->Html->div('forminfo', 'You can find the authentication key on your profile on the external server.'),
|
||||
));
|
||||
?>
|
||||
<div class = "input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('push', array(
|
||||
'div' => 'input clear',
|
||||
'before' => $this->Html->div('forminfo', 'Allow the <em>upload</em> of events and their attributes.'),
|
||||
));
|
||||
?>
|
||||
<div class = "input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('pull', array(
|
||||
'before' => $this->Html->div('forminfo', 'Allow the <em>download</em> of events and their attributes from the server.'),
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->button('Edit', array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
$id = $this->Form->value('Server.id');
|
||||
?>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('List Servers', array('controller' => 'servers', 'action' => 'index'));?></li>
|
||||
<li><?php if ($isAclAdd && $me['org'] == 'ADMIN') echo $this->Html->link(__('New Server'), array('controller' => 'servers', 'action' => 'add')); ?></li>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $this->Form->value('Server.id')), null, __('Are you sure you want to delete # %s?', $this->Form->value('Server.id'))); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'sync', 'menuItem' => 'edit'));
|
||||
?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//
|
||||
var formInfoValues = {
|
||||
'ServerUrl' : "The base-url to the external server you want to sync with. Example: https://foo.sig.mil.be",
|
||||
'ServerOrganization' : "The organization having the external server you want to sync with. Example: BE",
|
||||
'ServerAuthkey' : "You can find the authentication key on your profile on the external server.",
|
||||
'ServerPush' : "Allow the upload of events and their attributes.",
|
||||
'ServerPull' : "Allow the download of events and their attributes from the server.",
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#ServerUrl, #ServerOrganization, #ServerAuthkey, #ServerPush, #ServerPull").on('mouseleave', function(e) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
});
|
||||
|
||||
$("#ServerUrl, #ServerOrganization, #ServerAuthkey, #ServerPush, #ServerPull").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
content: formInfoValues[e.currentTarget.id],
|
||||
}).popover('show');
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -83,9 +83,6 @@ endforeach; ?>
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li class="active"><?php echo $this->Html->link('List Servers', array('controller' => 'servers', 'action' => 'index'));?></li>
|
||||
<li><?php if ($isAclAdd && $me['org'] == 'ADMIN') echo $this->Html->link('New Server', array('controller' => 'servers', 'action' => 'add')); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'sync', 'menuItem' => 'index'));
|
||||
?>
|
|
@ -70,19 +70,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li class="active"><a href="/events/index">List Events</a></li>
|
||||
<?php if ($isAclAdd): ?>
|
||||
<li><a href="/events/add">Add Event</a></li>
|
||||
<?php endif; ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/attributes/index">List Attributes</a></li>
|
||||
<li><a href="/attributes/search">Search Attributes</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/events/export">Export</a></li>
|
||||
<?php if ($isAclAuth): ?>
|
||||
<li><a href="/events/automation">Automation</a></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => 'viewProposals'));
|
||||
?>
|
||||
|
||||
|
|
|
@ -21,18 +21,6 @@
|
|||
<?php echo $this->Form->button(__('Submit'), array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();?>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li class="active"><a href="/admin/users/add">New User</a></li>
|
||||
<li><a href="/admin/users/index">List Users</a></li>
|
||||
<li class="divider"></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><a href="/admin/roles/add">New Role</a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="/admin/roles/index">List Role</a></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/admin/users/email">Contact Users</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'addUser'));
|
||||
?>
|
|
@ -30,19 +30,7 @@
|
|||
echo $this->Form->button(__('Submit'), array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();?>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('New User', array('controller' => 'users', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<li><?php echo $this->Html->link('List Users', array('controller' => 'users', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<li class="divider"></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><?php echo $this->Html->link('New Role', array('controller' => 'roles', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
<li><?php echo $this->Html->link('List Roles', array('controller' => 'roles', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('Contact users', array('controller' => 'users', 'action' => 'email', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'editUser'));
|
||||
?>
|
||||
|
||||
|
|
|
@ -64,21 +64,9 @@ function showMessage(){
|
|||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('New User', array('controller' => 'users', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<li><?php echo $this->Html->link('List Users', array('controller' => 'users', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<li class="divider"></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><?php echo $this->Html->link('New Role', array('controller' => 'roles', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
<li><?php echo $this->Html->link('List Roles', array('controller' => 'roles', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li class="active"><?php echo $this->Html->link('Contact users', array('controller' => 'users', 'action' => 'email', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'contact'));
|
||||
?>
|
||||
<script>
|
||||
$("#recipient").change(setRecipientEmailList);
|
||||
$("#recipient").change(setGPG);
|
||||
|
|
|
@ -89,18 +89,6 @@ endforeach; ?>
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('New User', array('controller' => 'users', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<li class="active"><?php echo $this->Html->link('List Users', array('controller' => 'users', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<li class="divider"></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><?php echo $this->Html->link('New Role', array('controller' => 'roles', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
<li><?php echo $this->Html->link('List Roles', array('controller' => 'roles', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('Contact users', array('controller' => 'users', 'action' => 'email', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'indexUser'));
|
||||
?>
|
|
@ -131,20 +131,6 @@ if (h($user['User']['change_pw']) == 1) {
|
|||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('Edit User', array('admin' => true, 'action' => 'edit', $user['User']['id'])); ?></li>
|
||||
<li class="divider"></li>
|
||||
<li class="active"><?php echo $this->Html->link('New User', array('controller' => 'users', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<li><?php echo $this->Html->link('List Users', array('controller' => 'users', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<li class="divider"></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><?php echo $this->Html->link('New Role', array('controller' => 'roles', 'action' => 'add', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
<li><?php echo $this->Html->link('List Roles', array('controller' => 'roles', 'action' => 'index', 'admin' => true)); ?> </li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('Contact users', array('controller' => 'users', 'action' => 'email', 'admin' => true)); ?> </li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'viewUser'));
|
||||
?>
|
|
@ -12,12 +12,6 @@ echo $this->Form->button(__('Submit'), array('class' => 'btn btn-primary'));
|
|||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><a href="/users/news">News</a></li>
|
||||
<li><a href="/users/view/me">My Profile</a></li>
|
||||
<li><a href="/users/memberslist">Members List</a></li>
|
||||
<li><a href="/pages/display/doc/general">User Guide</a></li>
|
||||
<li><a href="/users/terms">Terms & Conditions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'globalActions', 'menuItem' => 'news'));
|
||||
?>
|
||||
|
|
|
@ -19,12 +19,7 @@
|
|||
<?php echo $this->Form->button(__('Submit'), array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();?>
|
||||
</div>
|
||||
<div class="actions <?php echo $debugMode;?>">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link(__('News', true), array('controller' => 'users', 'action' => 'news')); ?> </li>
|
||||
<li><?php echo $this->Html->link(__('My Profile', true), array('controller' => 'users', 'action' => 'view', 'me')); ?> </li>
|
||||
<li><?php echo $this->Html->link(__('Members List', true), array('controller' => 'users', 'action' => 'memberslist')); ?> </li>
|
||||
<li><?php echo $this->Html->link(__('User Guide', true), array('controller' => 'pages', 'action' => 'display', 'documentation')); ?> </li>
|
||||
<li><?php echo $this->Html->link(__('Terms & Conditions', true), array('controller' => 'users', 'action' => 'terms')); ?> </li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
$user['User']['id'] = $id;
|
||||
echo $this->element('side_menu', array('menuList' => 'globalActions', 'menuItem' => 'edit', 'user' => $user));
|
||||
?>
|
||||
|
|
|
@ -61,6 +61,6 @@ if (!empty($user['User']['gpgkey'])) {
|
|||
</dl>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'globalActions', 'menuItem' => 'me'));
|
||||
echo $this->element('side_menu', array('menuList' => 'globalActions', 'menuItem' => 'view'));
|
||||
?>
|
||||
|
||||
|
|
Loading…
Reference in New Issue