MISP/app/View/Events/index.ctp

99 lines
5.4 KiB
Plaintext
Raw Normal View History

2015-04-18 07:53:18 +02:00
<div class="events <?php if (!$ajax) echo 'index'; ?>">
2018-01-10 00:05:29 +01:00
<h2><?php echo __('Events');?></h2>
2013-06-01 08:46:21 +02:00
<div class="pagination">
<ul>
<?php
$this->Paginator->options(array(
'update' => '.span12',
'evalScripts' => true,
'before' => '$(".progress").show()',
'complete' => '$(".progress").hide()',
));
echo $this->Paginator->prev('&laquo; ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
echo $this->Paginator->next(__('next') . ' &raquo;', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
?>
</ul>
</div>
<?php
2014-08-08 15:28:37 +02:00
$tab = "Center";
2016-02-12 05:47:06 +01:00
if (!isset($simple)) $simple = false;
2014-08-08 15:28:37 +02:00
$filtered = false;
2016-02-12 05:47:06 +01:00
if (!$simple && count($passedArgsArray) > 0) {
2014-08-08 15:28:37 +02:00
$tab = "Left";
$filtered = true;
}
2016-02-12 05:47:06 +01:00
if (!$ajax && !$simple):
?>
<div class="tabMenuFixedContainer" style="display:inline-block;">
<span class="tabMenuFixed tabMenuFixed<?php echo $tab; ?> tabMenuSides">
2018-01-09 13:07:08 +01:00
<span role="button" tabindex="0" aria-label="<?php echo __('Modify filters');?>" id="create-button" title="<?php echo __('Modify filters');?>" class="icon-search useCursorPointer" title="Filter events" role="button" tabindex="0" aria-label="<?php echo __('Filter events');?>" onClick="getPopup('<?php echo h($urlparams);?>', 'events', 'filterEventIndex');"></span>
<span id="multi-delete-button" title="<?php echo __('Delete selected Events');?>" role="button" tabindex="0" aria-label="<?php echo __('Delete selected Events');?>" class="hidden icon-trash mass-select useCursorPointer" onClick="multiSelectDeleteEvents();"></span>
</span>
<?php
if ($filtered):
foreach ($passedArgsArray as $k => $v):?>
<span class="tabMenuFixed tabMenuFixedElement">
<?php echo h(ucfirst($k)) . " : " . h($v); ?>
</span>
<?php endforeach; ?>
<span class="tabMenuFixed tabMenuFixedRight tabMenuSides">
2018-01-09 13:07:08 +01:00
<?php echo $this->Html->link('', array('controller' => 'events', 'action' => 'index'), array('class' => 'icon-remove', 'title' => __('Remove filters')));?>
</span>
<?php endif;?>
2018-01-10 00:05:29 +01:00
<span role="button" tabindex="0" aria-label="<?php echo __('Quickfilter');?>" title="<?php echo __('Quickfilter');?>" id="quickFilterButton" class="tabMenuFilterFieldButton useCursorPointer" onClick="quickFilter(<?php echo h($passedArgs); ?>, '<?php echo $baseurl . '/events/index'; ?>');"><?php echo __('Filter');?></span>
<input class="tabMenuFilterField" type="text" id="quickFilterField"></input>
2014-08-08 15:28:37 +02:00
<?php
$tempArgs = json_decode($passedArgs, true);
$tabBackground = "";
if (isset($tempArgs['searchemail']) && $tempArgs['searchemail'] === $me['email']) {
unset($tempArgs['searchemail']);
$tabBackground = 'background-lightblue';
} else {
$tempArgs['searchemail'] = $me['email'];
}
$tempArgs = json_encode($tempArgs);
?>
<span class="tabMenuFixed tabMenuFixedLeft tabMenuSides useCursorPointer <?php echo $tabBackground; ?>" style="margin-left:50px;">
2018-01-10 00:05:29 +01:00
<span role="button" tabindex="0" aria-label="<?php echo __('My events only');?>" title="<?php echo __('My events only');?>" id="myOrgButton" title="<?php echo __('Modify filters');?>" onClick="executeFilter(<?php echo h($tempArgs);?>, '<?php echo $baseurl;?>/events/index');"><?php echo __('My Events');?></span>
</span>
2016-06-04 01:10:45 +02:00
<?php
$tempArgs = json_decode($passedArgs, true);
$tabBackground = "";
if (isset($tempArgs['searchorg']) && $tempArgs['searchorg'] === $me['Organisation']['id']) {
unset($tempArgs['searchorg']);
$tabBackground = 'background-lightblue';
2013-06-01 08:46:21 +02:00
} else {
$tempArgs['searchorg'] = $me['Organisation']['id'];
2013-06-01 08:46:21 +02:00
}
$tempArgs = json_encode($tempArgs);
?>
<span class="tabMenuFixed tabMenuFixedRight tabMenuSides useCursorPointer <?php echo $tabBackground; ?>">
2018-01-09 13:07:08 +01:00
<span role="button" tabindex="0" aria-label="<?php echo __('My organisation\'s events only');?>" id="myOrgButton" title="<?php echo __('My organisation\'s events only');?>" onClick="executeFilter(<?php echo h($tempArgs);?>, '<?php echo $baseurl;?>/events/index');"><?php echo __('Org Events');?></span>
</span>
</div>
<?php
endif;
echo $this->element('Events/eventIndexTable');
?>
2011-11-26 10:45:31 +01:00
<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}')
));
?>
</p>
<div class="pagination">
<ul>
<?php
echo $this->Paginator->prev('&laquo; ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
echo $this->Paginator->next(__('next') . ' &raquo;', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
?>
</ul>
</div>
2011-11-26 10:45:31 +01:00
</div>
<input type="hidden" class="keyboardShortcutsConfig" value="/shortcuts/event_index.json" />
<?php
2015-04-18 07:53:18 +02:00
if (!$ajax) echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => 'index'));