Example #1
0
 public function body()
 {
     $this->rb = $this->init_module('Utils/RecordBrowser', 'crm_meeting', 'crm_meeting');
     $me = CRM_ContactsCommon::get_my_record();
     CRM_CommonCommon::status_filter($this->rb);
     $this->rb->set_filters_defaults(array('employees' => $this->rb->crm_perspective_default(), 'date__to' => date('Y-m-d')));
     $this->rb->set_defaults(array('employees' => array($me['id']), 'status' => 0, 'permission' => 0, 'priority' => CRM_CommonCommon::get_default_priority(), 'date' => date('Y-m-d'), 'time' => date('H:i:s'), 'duration' => 3600));
     $this->rb->set_default_order(array('date' => 'DESC', 'time' => 'DESC', 'status' => 'DESC'));
     $this->display_module($this->rb);
 }
Example #2
0
 public function body()
 {
     $this->help('Phone Call Help', 'main');
     $this->rb = $this->init_module('Utils/RecordBrowser', 'phonecall', 'phonecall');
     $me = CRM_ContactsCommon::get_my_record();
     CRM_CommonCommon::status_filter($this->rb);
     $this->rb->set_filters_defaults(array('employees' => $this->rb->crm_perspective_default(), 'status' => '__NO_CLOSED__'));
     $this->rb->set_defaults(array('date_and_time' => date('Y-m-d H:i:s'), 'employees' => array($me['id']), 'permission' => '0', 'status' => '0', 'priority' => CRM_CommonCommon::get_default_priority()));
     $this->rb->set_default_order(array('status' => 'ASC', 'date_and_time' => 'ASC', 'subject' => 'ASC'));
     $this->display_module($this->rb);
 }
Example #3
0
 public function body()
 {
     $this->help('Tasks Help', 'main');
     $this->rb = $this->init_module(Utils_RecordBrowser::module_name(), 'task', 'task');
     $me = CRM_ContactsCommon::get_my_record();
     CRM_CommonCommon::status_filter($this->rb);
     $this->rb->set_filters_defaults(array('employees' => $this->rb->crm_perspective_default(), 'status' => '__NO_CLOSED__'));
     $this->rb->set_custom_filter('longterm', array('type' => 'select', 'label' => __('Display tasks marked as'), 'args' => array('__NULL__' => __('Both'), 1 => __('Short-term'), 2 => __('Long-term')), 'trans' => array('__NULL__' => array(), 1 => array('!longterm' => 1), 2 => array('longterm' => 1))));
     $this->rb->set_defaults(array('employees' => array($me['id']), 'status' => 0, 'permission' => 0, 'priority' => CRM_CommonCommon::get_default_priority()));
     $this->rb->set_default_order(array('deadline' => 'ASC', 'longterm' => 'ASC', 'priority' => 'DESC', 'title' => 'ASC'));
     $this->display_module($this->rb);
 }