focus =(object) $value; } function setContactsList(&$value){ $this->contacts_list =$value; } function setUsersList(&$value){ $this->users_list =$value; } function setHideUsers($value){ $this->hideUsers = $value; } function setHideContacts($value){ $this->hideContacts = $value; } function setHideNewButton($value){ $this->hideNewButton = $value; } function SubPanelViewContactsAndUsers(){ global $theme; $theme_path="themes/".$theme."/"; require_once($theme_path.'layout_utils.php'); } function getHeaderText($action, $currentModule){ global $app_strings; global $mod_strings; $button = "\n"; $button .= "\n"; if ($currentModule == 'Contacts') { if (isset($this->focus->primary_address_street)) $button .= "\n"; if (isset($this->focus->primary_address_city)) $button .= "\n"; if (isset($this->focus->primary_address_state)) $button .= "\n"; if (isset($this->focus->primary_address_country)) $button .= "\n"; if (isset($this->focus->primary_address_postalcode)) $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= "\n"; } elseif ($currentModule == 'Accounts') { $button .= "\n"; $button .= "\n"; if (isset($this->focus->billing_address_street)) $button .= "\n"; if (isset($this->focus->billing_address_city)) $button .= "\n"; if (isset($this->focus->billing_address_state)) $button .= "\n"; if (isset($this->focus->billing_address_country)) $button .= "\n"; if (isset($this->focus->billing_address_postalcode)) $button .= "\n"; } elseif ($currentModule == 'Opportunities') $button .= "\n\n\n"; //if ($currentModule == 'Accounts') $button .= "\n\n"; //if ($currentModule == 'Cases') $button .= "\n\n\n"; //elseif ($currentModule == 'Opportunities') $button .= "\n\n\n"; $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= ""; if(!$this->hideNewButton){ if($currentModule == 'Contacts') $button .= "\n"; elseif($currentModule == 'Accounts') $button .= "\n"; else$button .= "\n"; } if(!$this->hideUsers){ if($currentModule=='Emails') { $button .= "\n"; } $button .= "\n"; } if(!$this->hideContacts) { $selectName = 'LBL_SELECT_BUTTON'; if(!$this->hideUsers) { $selectName = 'LBL_SELECT_CONTACT_BUTTON'; } if (isset($this->focus->parent_type) && $this->focus->parent_type == "Accounts") $button .= "\n"; elseif($currentModule == 'Contacts') $button.= "\n"; else if(isset($this->focus->account_id) && isset($this->focus->account_name)) $button .= "\n"; else $button .= "\n"; } $button .= "
 focus->account_id."';this.form.account_name.value='".$this->focus->account_name."'; this.form.reports_to_id.value='".$this->focus->id."';this.form.reports_to_name.value='".$this->focus->first_name." ".$this->focus->last_name."'\" type='submit' name='button' value=' ".$app_strings['LBL_NEW_BUTTON_LABEL']." '>focus->id."'\" type='submit''>
\n"; return $button; } function ProcessSubPanelListView($xTemplatePath, &$mod_strings,$action, $curModule=''){ global $currentModule; if(empty($curModule)) $curModule = $currentModule; $ListView = new ListView(); $ListView->initNewXTemplate($xTemplatePath,$mod_strings); $ListView->xTemplateAssign("RETURN_URL", "&return_module=".$curModule."&return_action=DetailView&return_id=".$this->focus->id); $ListView->xTemplateAssign("RECORD_ID", $this->focus->id); $ListView->setHeaderTitle($mod_strings['LBL_INVITEE']); $ListView->setHeaderText($this->getHeaderText($action, $curModule)); if(!$this->hideUsers){ if(!isset($this->users_list)) $this->setUsersList($this->focus->get_users()); $ListView->processListView($this->users_list, "users", "USER"); } if(!$this->hideContacts){ if(!$this->hideUsers){ $ListView->setDisplayHeaderAndFooter(false); } if(!isset($this->contacts_list)){ $this->setContactsList($this->focus->get_contacts()); } $ListView->processListView($this->contacts_list, "contacts", "CONTACT"); } } } ?>