Esempio n. 1
0
 function get_list_view_data()
 {
     $user_fields = parent::get_list_view_data();
     if ($this->is_admin) {
         $user_fields['IS_ADMIN_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', '', null, null, '.gif', translate('LBL_CHECKMARK', 'Users'));
     } elseif (!$this->is_admin) {
         $user_fields['IS_ADMIN'] = '';
     }
     if ($this->is_group) {
         $user_fields['IS_GROUP_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', '', null, null, '.gif', translate('LBL_CHECKMARK', 'Users'));
     } else {
         $user_fields['IS_GROUP_IMAGE'] = '';
     }
     if ($this->is_admin) {
         $user_fields['IS_ADMIN_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', '', null, null, '.gif', translate('LBL_CHECKMARK', 'Users'));
     } elseif (!$this->is_admin) {
         $user_fields['IS_ADMIN'] = '';
     }
     if ($this->is_group) {
         $user_fields['IS_GROUP_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', '', null, null, '.gif', translate('LBL_CHECKMARK', 'Users'));
     } else {
         $user_fields['NAME'] = empty($this->name) ? '' : $this->name;
     }
     $user_fields['REPORTS_TO_NAME'] = $this->reports_to_name;
     if (isset($_REQUEST['module']) && $_REQUEST['module'] == 'Teams' && (isset($_REQUEST['record']) && !empty($_REQUEST['record']))) {
         $q = "SELECT count(*) c FROM team_memberships WHERE deleted=0 AND user_id = '{$this->id}' AND team_id = '{$_REQUEST['record']}' AND explicit_assign = 1";
         $r = $this->db->query($q);
         $a = $this->db->fetchByAssoc($r);
         $user_fields['UPLINE'] = translate('LBL_TEAM_UPLINE', 'Users');
         if ($a['c'] > 0) {
             $user_fields['UPLINE'] = translate('LBL_TEAM_UPLINE_EXPLICIT', 'Users');
         }
     }
     return $user_fields;
 }
Esempio n. 2
0
 function get_list_view_data()
 {
     global $mod_strings;
     $user_fields = parent::get_list_view_data();
     if ($this->is_admin) {
         $user_fields['IS_ADMIN_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', '', null, null, '.gif', $mod_strings['LBL_CHECKMARK']);
     } elseif (!$this->is_admin) {
         $user_fields['IS_ADMIN'] = '';
     }
     if ($this->is_group) {
         $user_fields['IS_GROUP_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', '', null, null, '.gif', $mod_strings['LBL_CHECKMARK']);
     } else {
         $user_fields['IS_GROUP_IMAGE'] = '';
     }
     if ($this->is_admin) {
         $user_fields['IS_ADMIN_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', '', null, null, '.gif', translate('LBL_CHECKMARK', 'Users'));
     } elseif (!$this->is_admin) {
         $user_fields['IS_ADMIN'] = '';
     }
     if ($this->is_group) {
         $user_fields['IS_GROUP_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', '', null, null, '.gif', translate('LBL_CHECKMARK', 'Users'));
     } else {
         $user_fields['NAME'] = empty($this->name) ? '' : $this->name;
     }
     $user_fields['REPORTS_TO_NAME'] = $this->reports_to_name;
     return $user_fields;
 }
Esempio n. 3
0
 function get_list_view_data($filter_fields = array())
 {
     $temp_array = parent::get_list_view_data();
     if ($filter_fields && !empty($filter_fields['sync_contact'])) {
         $this->load_contacts_users_relationship();
         $temp_array['SYNC_CONTACT'] = !empty($this->contacts_users_id) ? 1 : 0;
     }
     $temp_array['EMAIL_AND_NAME1'] = "{$this->full_name} <" . $temp_array['EMAIL1'] . ">";
     //Ezt tudom hogy nem itt kellet volna, hanem a customban, de még szokni kell a rendszert
     if (!empty($temp_array['CONTACT_PHOTO_C'])) {
         $temp_array['CONTACT_PHOTO_C'] = "<img src='cache/images/thumb/" . $temp_array['ID'] . "_" . $temp_array['CONTACT_PHOTO_C'] . "' style='max-height: 150px; max-width:100%'>";
     }
     return $temp_array;
 }
Esempio n. 4
0
 function get_list_view_data()
 {
     $user_fields = parent::get_list_view_data();
     // Copy over the reports_to_name
     if (isset($GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type])) {
         $user_fields['MESSENGER_TYPE'] = $GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type];
     }
     if (isset($GLOBALS['app_list_strings']['employee_status_dom'][$this->employee_status])) {
         $user_fields['EMPLOYEE_STATUS'] = $GLOBALS['app_list_strings']['employee_status_dom'][$this->employee_status];
     }
     $user_fields['REPORTS_TO_NAME'] = $this->reports_to_name;
     return $user_fields;
 }
Esempio n. 5
0
 function get_list_view_data($filter_fields = array())
 {
     $temp_array = parent::get_list_view_data();
     if ($filter_fields && !empty($filter_fields['sync_contact'])) {
         $this->load_contacts_users_relationship();
         $temp_array['SYNC_CONTACT'] = !empty($this->contacts_users_id) ? 1 : 0;
     }
     $temp_array['EMAIL_AND_NAME1'] = "{$this->full_name} &lt;" . $temp_array['EMAIL1'] . "&gt;";
     return $temp_array;
 }
Esempio n. 6
0
 function get_list_view_data()
 {
     $temp_array = parent::get_list_view_data();
     $temp_array['ACC_NAME_FROM_ACCOUNTS'] = empty($temp_array['ACC_NAME_FROM_ACCOUNTS']) ? $temp_array['ACCOUNT_NAME'] : $temp_array['ACC_NAME_FROM_ACCOUNTS'];
     return $temp_array;
 }
Esempio n. 7
0
 function get_list_view_data()
 {
     /*global $app_list_strings;
     		global $current_user;
     
     		$temp_array = $this->get_list_view_array();
     		$temp_array['STATUS'] = (empty($temp_array['STATUS'])) ? '' : $temp_array['STATUS'];
     		$temp_array['ENCODED_NAME']=$this->name;
     		$temp_array['NAME']=$this->name;
     		$temp_array['EMAIL1'] = $this->emailAddress->getPrimaryAddress($this);
     		$this->email1 = $temp_array['EMAIL1'];
     		$temp_array['EMAIL1_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView');
         	$temp_array['ACC_NAME_FROM_ACCOUNTS'] = empty($temp_array['ACC_NAME_FROM_ACCOUNTS']) ? ($temp_array['ACCOUNT_NAME']) : ($temp_array['ACC_NAME_FROM_ACCOUNTS']);
     		return $temp_array;
     		*/
     $this->_create_proper_name_field();
     $temp_array = parent::get_list_view_data();
     $temp_array['ACC_NAME_FROM_ACCOUNTS'] = empty($temp_array['ACC_NAME_FROM_ACCOUNTS']) ? $temp_array['ACCOUNT_NAME'] : $temp_array['ACC_NAME_FROM_ACCOUNTS'];
     return $temp_array;
 }
Esempio n. 8
0
 function get_list_view_data()
 {
     $temp_array = parent::get_list_view_data();
     if (!empty($temp_array['ACC_NAME_FROM_ACCOUNTS'])) {
         $temp_array['ACC_NAME_FROM_ACCOUNTS'] = $temp_array['ACC_NAME_FROM_ACCOUNTS'];
     } elseif (!empty($temp_array['ACCOUNT_NAME'])) {
         $temp_array['ACC_NAME_FROM_ACCOUNTS'] = $temp_array['ACCOUNT_NAME'];
     } else {
         $temp_array['ACC_NAME_FROM_ACCOUNTS'] = '';
     }
     return $temp_array;
 }
Esempio n. 9
0
 function get_list_view_data($filter_fields = array())
 {
     $temp_array = parent::get_list_view_data();
     if ($filter_fields && !empty($filter_fields['sync_contact'])) {
         $this->load_relationship('user_sync');
         $temp_array['SYNC_CONTACT'] = $this->user_sync->_relationship->relationship_exists($this, $GLOBALS['current_user']) ? 1 : 0;
     }
     $temp_array['EMAIL_AND_NAME1'] = "{$this->full_name} &lt;" . $temp_array['EMAIL1'] . "&gt;";
     return $temp_array;
 }