2016-12-05 00:47:34 +01:00
|
|
|
<?php
|
2020-03-12 11:10:11 +01:00
|
|
|
echo '<div class="index">';
|
|
|
|
echo $this->element('/genericElements/IndexTable/index_table', array(
|
|
|
|
'data' => array(
|
|
|
|
'data' => $galaxyList,
|
|
|
|
'top_bar' => array(
|
|
|
|
'children' => array(
|
|
|
|
array(
|
|
|
|
'type' => 'simple',
|
|
|
|
'children' => array(
|
|
|
|
array(
|
|
|
|
'active' => $context === 'all',
|
|
|
|
'url' => $baseurl . '/galaxies/index/context:all',
|
|
|
|
'text' => __('All'),
|
2020-04-15 08:46:21 +02:00
|
|
|
)
|
2020-03-12 11:10:11 +01:00
|
|
|
)
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'type' => 'search',
|
|
|
|
'button' => __('Filter'),
|
|
|
|
'placeholder' => __('Enter value to search'),
|
|
|
|
'data' => '',
|
|
|
|
'searchKey' => 'value',
|
|
|
|
'value' => $searchall
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'fields' => array(
|
|
|
|
array(
|
|
|
|
'name' => __('Galaxy Id'),
|
|
|
|
'sort' => 'Galaxy.id',
|
|
|
|
'element' => 'links',
|
|
|
|
'class' => 'short',
|
|
|
|
'data_path' => 'Galaxy.id',
|
|
|
|
'url' => $baseurl . '/galaxies/view/%s'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'name' => __('Icon'),
|
|
|
|
'element' => 'icon',
|
|
|
|
'class' => 'short',
|
|
|
|
'data_path' => 'Galaxy.icon',
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'name' => __('Name'),
|
|
|
|
'sort' => 'name',
|
|
|
|
'class' => 'short',
|
|
|
|
'data_path' => 'Galaxy.name',
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'name' => __('version'),
|
|
|
|
'class' => 'short',
|
|
|
|
'data_path' => 'Galaxy.version',
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'name' => __('Namespace'),
|
|
|
|
'class' => 'short',
|
|
|
|
'data_path' => 'Galaxy.namespace',
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'name' => __('Description'),
|
|
|
|
'data_path' => 'Galaxy.description',
|
|
|
|
)
|
|
|
|
),
|
|
|
|
'title' => __('Galaxy index'),
|
|
|
|
'actions' => array(
|
|
|
|
array(
|
|
|
|
'url' => '/galaxies/view',
|
|
|
|
'url_params_data_paths' => array(
|
|
|
|
'Galaxy.id'
|
|
|
|
),
|
|
|
|
'icon' => 'eye',
|
|
|
|
'dbclickAction' => true
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'url' => '/galaxies/delete',
|
|
|
|
'url_params_data_paths' => array(
|
|
|
|
'Galaxy.id'
|
|
|
|
),
|
|
|
|
'postLink' => true,
|
|
|
|
'postLinkConfirm' => __('Are you sure you want to delete the Galaxy?'),
|
|
|
|
'icon' => 'trash'
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
));
|
|
|
|
echo '</div>';
|
2020-09-22 14:42:13 +02:00
|
|
|
echo $this->element('/genericElements/SideMenu/side_menu', array('menuList' => 'galaxies', 'menuItem' => 'index', 'element_id' => 'galaxy_index'));
|
2016-12-05 00:47:34 +01:00
|
|
|
?>
|
2020-03-12 11:10:11 +01:00
|
|
|
<script type="text/javascript">
|
|
|
|
var passedArgsArray = <?php echo $passedArgs; ?>;
|
|
|
|
if (passedArgsArray['context'] === undefined) {
|
|
|
|
passedArgsArray['context'] = 'pending';
|
|
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#quickFilterButton').click(function() {
|
|
|
|
runIndexQuickFilter('/context:' + passedArgsArray['context']);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|