Skip to content

Instantly share code, notes, and snippets.

@JimMackin
Created July 2, 2015 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JimMackin/8c14245058b65ce69369 to your computer and use it in GitHub Desktop.
Save JimMackin/8c14245058b65ce69369 to your computer and use it in GitHub Desktop.
Custom list view action item
<?php
require_once 'modules/Calls/views/view.list.php';
class CustomCallsViewList extends CallsViewList{
public function preDisplay(){
parent::preDisplay();
$this->lv->actionsMenuExtraItems[] = $this->getNewActionMenuItem();
}
private function getNewActionMenuItem(){
global $mod_strings;
return <<<EOF
<a href='javascript:void(0)'
onclick="return sListView.send_form(true, 'Calls', 'index.php?entryPoint=myNewEntryPoint','Please select at least 1 record to proceed.')">
{$mod_strings['LBL_NEW_ACTION']}
</a>";
EOF;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment