mirror of https://github.com/MISP/MISP
chg: [galaxyClusters] Added more entries in side menu
parent
b0afacaf7c
commit
a8cf7de3ee
|
@ -433,6 +433,8 @@ class GalaxyClustersController extends AppController
|
|||
'elements' => __('Valid JSON array composed from Object of the form {key: keyname, value: actualValue}'),
|
||||
'distribution' => Hash::extract($this->Attribute->distributionDescriptions, '{n}.formdesc'),
|
||||
);
|
||||
$this->set('id', $cluster['GalaxyCluster']['id']);
|
||||
$this->set('cluster', $cluster);
|
||||
$this->set('fieldDesc', $fieldDesc);
|
||||
$this->set('distributionLevels', $distributionLevels);
|
||||
$this->set('initialDistribution', $initialDistribution);
|
||||
|
|
|
@ -1196,26 +1196,35 @@
|
|||
));
|
||||
}
|
||||
}
|
||||
if ($menuItem === 'viewGraph' || $menuItem === 'view_cluster' || $menuItem === 'update_cluster') {
|
||||
if ($menuItem === 'viewGraph' || $menuItem === 'view_cluster' || $menuItem === 'update_cluster' || $menuItem === 'add_cluster' || $menuItem === 'edit_cluster') {
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_divider');
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_link', array(
|
||||
'element_id' => 'view',
|
||||
'url' => '/galaxies/view/' . h($galaxy_id),
|
||||
'text' => __('View Galaxy')
|
||||
));
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_link', array(
|
||||
'element_id' => 'view_cluster',
|
||||
'url' => '/galaxy_clusters/view/' . h($id),
|
||||
'text' => __('View Cluster')
|
||||
));
|
||||
if (!$defaultCluster && ($isSiteAdmin || $me['Role']['perm_galaxy_editor'])) {
|
||||
if ($menuItem !== 'add_cluster') {
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_link', array(
|
||||
'element_id' => 'view_cluster',
|
||||
'url' => '/galaxy_clusters/view/' . h($id),
|
||||
'text' => __('View Cluster')
|
||||
));
|
||||
}
|
||||
if ($menuItem !== 'add_cluster' && !$defaultCluster && ($isSiteAdmin || $me['Role']['perm_galaxy_editor'])) {
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_link', array(
|
||||
'element_id' => 'edit_cluster',
|
||||
'url' => '/galaxy_clusters/edit/' . h($id),
|
||||
'text' => __('Edit Cluster')
|
||||
));
|
||||
}
|
||||
if ($isSiteAdmin || $me['Role']['perm_galaxy_editor']) {
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_link', array(
|
||||
'element_id' => 'add_cluster',
|
||||
'url' => '/galaxy_clusters/add/' . h($galaxy_id),
|
||||
'text' => __('Add Cluster')
|
||||
));
|
||||
}
|
||||
if ($menuItem !== 'add_cluster' && ($isSiteAdmin || $me['Role']['perm_galaxy_editor'])) {
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_link', array(
|
||||
'url' => '/galaxy_clusters/add/' . h($galaxy_id) . '/forkUuid:' . h($cluster['GalaxyCluster']['uuid']),
|
||||
'text' => __('Fork Cluster')
|
||||
|
@ -1237,12 +1246,14 @@
|
|||
));
|
||||
}
|
||||
}
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_divider');
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_link', array(
|
||||
'element_id' => 'viewGraph',
|
||||
'url' => '/galaxies/viewGraph/' . h($id),
|
||||
'text' => __('View Correlation Graph')
|
||||
));
|
||||
if ($menuItem !== 'add_cluster') {
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_divider');
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_link', array(
|
||||
'element_id' => 'viewGraph',
|
||||
'url' => '/galaxies/viewGraph/' . h($id),
|
||||
'text' => __('View Correlation Graph')
|
||||
));
|
||||
}
|
||||
}
|
||||
if ($menuItem === 'view' || $menuItem === 'export') {
|
||||
echo $this->element('/genericElements/SideMenu/side_menu_divider');
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
)
|
||||
)
|
||||
));
|
||||
echo $this->element('/genericElements/SideMenu/side_menu', array('menuList' => 'galaxy_cluster', 'menuItem' => $this->action === 'add' ? 'add' : 'edit'));
|
||||
echo $this->element('/genericElements/SideMenu/side_menu', array('menuList' => 'galaxies', 'menuItem' => $this->action === 'add' ? 'add_cluster' : 'edit_cluster'));
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
Loading…
Reference in New Issue