if ($call->status != "Planned") { $history_list[] = array('name' => $call->name, 'id' => $call->id, 'type' => "Call", 'direction' => $call->direction, 'module' => "Calls", 'status' => $call->status, 'parent_id' => $call->parent_id, 'parent_type' => $call->parent_type, 'parent_name' => $call->parent_name, 'contact_id' => $call->contact_id, 'contact_name' => $call->contact_name, 'date_modified' => $call->date_modified); } else { $open_activity_list[] = array('name' => $call->name, 'id' => $call->id, 'direction' => $call->direction, 'type' => "Call", 'module' => "Calls", 'status' => $call->status, 'parent_id' => $call->parent_id, 'parent_type' => $call->parent_type, 'parent_name' => $call->parent_name, 'contact_id' => $call->contact_id, 'contact_name' => $call->contact_name, 'date_due' => $call->date_start); } } foreach ($focus_emails_list as $email) { $history_list[] = array('name' => $email->name, 'id' => $email->id, 'type' => "Email", 'direction' => '', 'module' => "Emails", 'status' => '', 'parent_id' => $email->parent_id, 'parent_type' => $email->parent_type, 'parent_name' => $email->parent_name, 'contact_id' => $email->contact_id, 'contact_name' => $email->contact_name, 'date_modified' => $email->date_start . " " . $email->time_start); } foreach ($focus_notes_list as $note) { $history_list[] = array('name' => $note->name, 'id' => $note->id, 'type' => "Note", 'direction' => '', 'module' => "Notes", 'status' => '', 'parent_id' => $note->parent_id, 'parent_type' => $note->parent_type, 'parent_name' => $note->parent_name, 'contact_id' => $note->contact_id, 'contact_name' => $note->contact_name, 'date_modified' => $note->date_modified); if (!empty($note->filename)) { $count = count($history_list); $count--; $history_list[$count]['filename'] = $note->filename; $history_list[$count]['fileurl'] = UploadFile::get_upload_url($note); } } if ($currentModule == 'Contacts') { $xtpl = new XTemplate('modules/Activities/SubPanelViewContacts.html'); $xtpl->assign("CONTACT_ID", $focus->id); } else { $xtpl = new XTemplate('modules/Activities/SubPanelView.html'); } $xtpl->assign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_DELETE'])); $xtpl->assign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT'])); $xtpl->assign("MOD", $current_module_strings); $xtpl->assign("APP", $app_strings); $button = "<form border='0' action='index.php' method='post' name='form' id='form'>\n"; $button .= "<input type='hidden' name='module'>\n"; $button .= "<input type='hidden' name='type'>\n";
function get_list_view_data() { $note_fields = $this->get_list_view_array(); global $app_list_strings, $focus, $action, $currentModule, $mod_strings, $sugar_config; if (isset($this->parent_type)) { $note_fields['PARENT_MODULE'] = $this->parent_type; } if (!empty($this->filename)) { if (file_exists("upload://{$this->id}")) { $note_fields['FILENAME'] = $this->filename; $note_fields['FILE_URL'] = UploadFile::get_upload_url($this); } } if (isset($this->contact_id) && $this->contact_id != '') { $contact = new Contact(); $contact->retrieve($this->contact_id); if (isset($contact->id)) { $this->contact_name = $contact->full_name; } } if (isset($this->contact_name)) { $note_fields['CONTACT_NAME'] = $this->contact_name; } global $current_language; $mod_strings = return_module_language($current_language, 'Notes'); $note_fields['STATUS'] = $mod_strings['LBL_NOTE_STATUS']; return $note_fields; }
function get_list_view_data() { $note_fields = $this->get_list_view_array(); global $app_list_strings, $focus, $action, $currentModule, $mod_strings, $sugar_config; if (isset($this->parent_type)) { $note_fields['PARENT_MODULE'] = $this->parent_type; } if (!empty($this->filename)) { if (file_exists("upload://{$this->id}")) { $note_fields['FILENAME'] = $this->filename; $note_fields['FILE_URL'] = UploadFile::get_upload_url($this); } elseif (!empty($sugar_config['disc_client']) && $sugar_config['disc_client']) { $file_display = " (" . $mod_strings['LBL_OC_FILE_NOTICE'] . ")"; $note_fields['FILENAME'] = $file_display; } } if (isset($this->contact_id) && $this->contact_id != '') { $contact = BeanFactory::getBean('Contacts', $this->contact_id); if (isset($contact->id)) { $this->contact_name = $contact->full_name; } } if (isset($this->contact_name)) { $note_fields['CONTACT_NAME'] = $this->contact_name; } global $current_language; $mod_strings = return_module_language($current_language, 'Notes'); $note_fields['STATUS'] = $mod_strings['LBL_NOTE_STATUS']; return $note_fields; }