$this->view->mailbox_actions allow to append mailbox list action buttons. %id% will be replaced by
mailbox id form the list. below is example array which creates edit mailbox button, and another button
with drop down options for purge or edit mailbox. Only one drop down button can be defined per button group,
and it always be appended at the end.
$actions = [
[ //Simple link button
'tagName' => 'a', //Mandatory parameter for element type.
'href' => OSS_Utils::genUrl( "mailbox", "edit" ) . "/mid/%id%", //Url for action
'title' => "Edit",
'class' => "btn btn-mini have-tooltip", //Class for css options.
'id' => "test-%id%", //If setting id id must have %id% which will be replaced by original mailbox id to avoid same ids.
'child' => [ //Mandatory element if is not array it will be shown as text.
'tagName' => "i", //Mandatory option if child is array to define element type
'class' => "icon-pencil" //Icon class
],
],
[ //Drop down button
'tagName' => 'span', //Mandatory parameter for element type
'title' => "Settings",
'class' => "btn btn-mini have-tooltip dropdown-toggle", //Class dropdown-toggle is mandatory for drop down button
'data-toggle' => "dropdown", //data-toggle attribute is mandatory for drop down button
'id' => "cog-%id%",
'style' => "max-height: 15px;",
'child' => [
'tagName' => "i",
'class' => "icon-cog"
],
'menu' => [ //menu array is mandatory then defining drop down button
[
'id' => "menu-edit-%id%", //Not mandatory attribute but if is set %id% should be use to avoid same ids.
'text' => " Edit", //Mandatory for display action text
'url' => OSS_Utils::genUrl( "mailbox", "edit" ) . "/mid/%id%" //Mandatory to redirect the action.
],
[ 'text' => " Purge", 'url' => OSS_Utils::genUrl( "mailbox", "purge" ) . "/mid/%id%" ],
]
]
];