Hello,
i’m trying to add a sub item in my custom module like this(see attached file).
I think a good starting point could be this view.list.php:
<?php
require_once 'include/MVC/View/views/view.list.php';
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class sugo_ComputersViewList extends ViewList{
public function preDisplay(){
parent::preDisplay();
$this->lv->actionsMenuExtraItems[] = $this->getNewActionMenuItem();
}
private function getNewActionMenuItem(){
global $mod_strings;
return <<<EOF
<ul id="menu">
<li><a href="">MY CUSTOM MENU</a>
<ul>
<li><a href="">My Custom Action</a></li>
</ul>
</li>
</ul>
<a class='parent-dropdown-action.handler' style='margin: 0px; width: 150px;' href='javascript:void(0)'
onclick="sugarListView.get_checks();
if(sugarListView.get_checks_count() < 1) {
alert('{$app_strings['LBL_LISTVIEW_NO_SELECTED']}');
return false;
}
document.MassUpdate.action.value='displaypassedids';
document.MassUpdate.submit();">
{$mod_strings['LBL_CUSTOM_ACTION']}
</a>
EOF;
}
}
Of course, a styling should be added or even maybe any ready to go class to achieve this.
Does anyone can point me in the right direction?
Regards