hasPerm(Task::PERM_CLOSE, false)) { if (isset($options['status'])) { $status = $options['status']; if (strpos($status, 'closed') !== false) { $actions += array( 'reopen' => array( 'icon' => 'icon-undo', 'action' => __('Reopen') )); } if (strpos($status, 'open') !== false) { $actions += array( 'close' => array( 'icon' => 'icon-ok-circle', 'action' => __('Close') )); } } } if ($agent->hasPerm(Task::PERM_ASSIGN, false)) { $actions += array( 'claim' => array( 'icon' => 'icon-user', 'action' => __('Claim') )); $actions += array( 'assign/agents' => array( 'icon' => 'icon-user', 'action' => __('Assign to Agent') )); $actions += array( 'assign/teams' => array( 'icon' => 'icon-group', 'action' => __('Assign to Team') )); } if ($agent->hasPerm(Task::PERM_TRANSFER, false)) { $actions += array( 'transfer' => array( 'icon' => 'icon-share', 'action' => __('Transfer') )); } if ($agent->hasPerm(Task::PERM_DELETE, false)) { $actions += array( 'delete' => array( 'class' => 'danger', 'icon' => 'icon-trash', 'action' => __('Delete') )); } if ($actions && isset($options['status'])) { $more = $options['morelabel'] ?: __('More'); ?>