Exemplo n.º 1
0
 /**
  * These tasks are the core set of tasks that the user can perform
  * on a contact / group of contacts
  *
  * @return array the set of tasks for a group of contacts
  * @static
  * @access public
  */
 static function &tasks()
 {
     if (!self::$_tasks) {
         self::$_tasks = array(1 => ts('Delete Participants'), 3 => ts('Export Participants'), 4 => ts('Batch Update Participants Via Profile'), 5 => ts('Cancel Registration'), 13 => ts('New Smart Group'), 6 => ts('Send Email to Contacts'), 15 => ts('Change Participant Status'));
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete in CiviEvent')) {
             unset(self::$_tasks[1]);
         }
     }
     asort(self::$_tasks);
     return self::$_tasks;
 }
Exemplo n.º 2
0
 /**
  * These tasks are the core set of tasks that the user can perform
  * on a contact / group of contacts
  *
  * @return array the set of tasks for a group of contacts
  * @static
  * @access public
  */
 static function &tasks()
 {
     if (!self::$_tasks) {
         self::$_tasks = array(1 => array('title' => ts('Delete Participants'), 'class' => 'CRM_Event_Form_Task_Delete', 'result' => FALSE), 2 => array('title' => ts('Print Selected Rows'), 'class' => 'CRM_Event_Form_Task_Print', 'result' => FALSE), 3 => array('title' => ts('Export Participants'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => FALSE), 4 => array('title' => ts('Batch Update Participants Via Profile'), 'class' => array('CRM_Event_Form_Task_PickProfile', 'CRM_Event_Form_Task_Batch'), 'result' => TRUE), 5 => array('title' => ts('Cancel Registration'), 'class' => 'CRM_Event_Form_Task_Cancel', 'result' => FALSE), 6 => array('title' => ts('Send Email to Contacts'), 'class' => 'CRM_Event_Form_Task_Email', 'result' => TRUE), 13 => array('title' => ts('New Smart Group'), 'class' => 'CRM_Event_Form_Task_SaveSearch', 'result' => TRUE), 14 => array('title' => ts('Update Smart Group'), 'class' => 'CRM_Event_Form_Task_SaveSearch_Update', 'result' => TRUE), 15 => array('title' => ts('Change Participant Status'), 'class' => 'CRM_Event_Form_Task_ParticipantStatus', 'result' => TRUE), 16 => array('title' => ts('Print Event Name Badges'), 'class' => 'CRM_Event_Form_Task_Badge', 'result' => FALSE));
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete in CiviEvent')) {
             unset(self::$_tasks[1]);
         }
     }
     CRM_Utils_Hook::searchTasks('event', self::$_tasks);
     asort(self::$_tasks);
     return self::$_tasks;
 }
Exemplo n.º 3
0
 /**
  * These tasks are the core set of tasks that the user can perform
  * on a contact / group of contacts
  *
  * @return array
  *   the set of tasks for a group of contacts
  */
 public static function &tasks()
 {
     if (!self::$_tasks) {
         self::$_tasks = array(1 => array('title' => ts('Delete participants from event'), 'class' => 'CRM_Event_Form_Task_Delete', 'result' => FALSE), 2 => array('title' => ts('Print selected rows'), 'class' => 'CRM_Event_Form_Task_Print', 'result' => FALSE), 3 => array('title' => ts('Export participants'), 'class' => array('CRM_Export_Form_Select', 'CRM_Export_Form_Map'), 'result' => FALSE), 4 => array('title' => ts('Update multiple participants'), 'class' => array('CRM_Event_Form_Task_PickProfile', 'CRM_Event_Form_Task_Batch'), 'result' => TRUE), 5 => array('title' => ts('Cancel registration'), 'class' => 'CRM_Event_Form_Task_Cancel', 'result' => FALSE), 6 => array('title' => ts('Email - send now'), 'class' => 'CRM_Event_Form_Task_Email', 'result' => TRUE), 13 => array('title' => ts('Group - create smart group'), 'class' => 'CRM_Event_Form_Task_SaveSearch', 'result' => TRUE), 14 => array('title' => ts('Group - update smart group'), 'class' => 'CRM_Event_Form_Task_SaveSearch_Update', 'result' => TRUE), 15 => array('title' => ts('Participant status - change (emails sent)'), 'class' => 'CRM_Event_Form_Task_ParticipantStatus', 'result' => TRUE), 16 => array('title' => ts('Name badges - print'), 'class' => 'CRM_Event_Form_Task_Badge', 'result' => FALSE), 17 => array('title' => ts('PDF letter - print for participants'), 'class' => 'CRM_Event_Form_Task_PDF', 'result' => TRUE), 20 => array('title' => ts('Group - add contacts'), 'class' => 'CRM_Event_Form_Task_AddToGroup', 'result' => FALSE));
         //CRM-4418, check for delete
         if (!CRM_Core_Permission::check('delete in CiviEvent')) {
             unset(self::$_tasks[1]);
         }
         //CRM-12920 - check for edit permission
         if (!CRM_Core_Permission::check('edit event participants')) {
             unset(self::$_tasks[4], self::$_tasks[5], self::$_tasks[15]);
         }
     }
     CRM_Utils_Hook::searchTasks('event', self::$_tasks);
     return self::$_tasks;
 }