$v) {
$filterParamsString[] = sprintf(
'%s: %s',
h(ucfirst($k)),
h($v)
);
}
$filterParamsString = implode(' & ', $filterParamsString);
$data = array(
'children' => array(
array(
'children' => array(
array(
'id' => 'create-button',
'title' => __('Modify filters'),
'fa-icon' => 'search',
'onClick' => 'getPopup',
'onClickParams' => array($urlparams, 'events', 'filterEventIndex')
)
)
),
array(
'children' => array(
array(
'id' => 'multi-delete-button',
'title' => __('Delete selected Events'),
'fa-icon' => 'trash',
'class' => 'hidden mass-select',
'onClick' => 'multiSelectDeleteEvents'
)
)
),
array(
'children' => array(
array(
'requirement' => count($passedArgsArray) > 0,
'html' => sprintf(
'
%s: %s',
__('Filters'),
$filterParamsString
)
),
array(
'requirement' => count($passedArgsArray) > 0,
'url' => '/events/index',
'title' => __('Remove filters'),
'fa-icon' => 'times'
)
)
),
array(
'children' => array(
array(
'title' => __('My events only'),
'text' => __('My Events'),
'data' => array(
'searchemail' => h($me['email'])
),
'class' => 'searchFilterButton',
'active' => isset($passedArgsArray['email']) && $passedArgsArray['email'] === $me['email']
),
array(
'title' => __('My organisation\'s events only'),
'text' => __('Org Events'),
'data' => array(
'searchorg' => h($me['org_id'])
),
'class' => 'searchFilterButton',
'active' => isset($passedArgsArray['org']) && $passedArgsArray['org'] === $me['org_id']
)
)
),
array(
'type' => 'search',
'button' => 'Filter',
'placeholder' => 'Enter value to search',
'data' => '',
)
)
);
if (!$ajax) {
echo $this->element('/genericElements/ListTopBar/scaffold', array('data' => $data));
}
echo $this->element('Events/eventIndexTable');
?>
Paginator->counter(array(
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
));
?>