' . "\n"; /********************************************************************** ********************************************************************** ********************************************************************** ********************************************************************** * Contact Detail Main Section */ $rows = array(array('First Name', $contact['Contact']['first_name']), array('Middle Name', $contact['Contact']['middle_name']), array('Last Name', $contact['Contact']['last_name']), array('Company', $contact['Contact']['company_name']), array('SSN', $contact['Contact']['id_federal']), array('ID', ($contact['Contact']['id_local'] . ($contact['Contact']['id_local'] ? " - ".$contact['Contact']['id_local_state'] : ""))), array('Comment', $contact['Contact']['comment'])); echo $this->element('table', array('class' => 'item contact detail', 'caption' => 'Contact Details', 'rows' => $rows, 'column_class' => array('field', 'value'))); /********************************************************************** * Contact Info Box */ echo '
' . "\n"; $rows = array(); echo $this->element('table', array('class' => 'summary', 'rows' => $rows, 'column_class' => array('field', 'value'), 'suppress_alternate_rows' => true, )); echo '
' . "\n"; /********************************************************************** ********************************************************************** ********************************************************************** ********************************************************************** * Supporting Elements Section */ echo '
' . "\n"; /********************************************************************** * Phones */ $headers = array('Phone', 'Preference', 'Comment'); $rows = array(); foreach($contact['ContactPhone'] AS $phone) { $rows[] = array(FormatHelper::phone($phone['phone']) . ($phone['ext'] ? " x".$phone['ext'] : ""), $phone['ContactsMethod']['preference'] . " / " . $phone['ContactsMethod']['type'] . " / " . $phone['type'], $phone['comment']); } echo $this->element('table', array('class' => 'item phone list', 'caption' => 'Phone', 'headers' => $headers, 'rows' => $rows, 'column_class' => $headers)); /********************************************************************** * Addresses */ $headers = array('Address', 'Preference', 'Comment'); $rows = array(); foreach($contact['ContactAddress'] AS $address) { $rows[] = array(preg_replace("/\n/", "
\n", $address['address']) . "
\n" . $address['city'] . ", " . $address['state'] . " " . $address['postcode'], //. ? "
\n" . $address['country'], $address['ContactsMethod']['preference'] . " / " . $address['ContactsMethod']['type'], $address['comment']); } echo $this->element('table', array('class' => 'item address list', 'caption' => 'Address', 'headers' => $headers, 'rows' => $rows, 'column_class' => $headers)); /********************************************************************** * Emails */ $headers = array('Email', 'Preference', 'Comment'); $rows = array(); foreach($contact['ContactEmail'] AS $email) { $rows[] = array($email['email'], $email['ContactsMethod']['preference'] . " / " . $email['ContactsMethod']['type'], $email['comment']); } echo $this->element('table', array('class' => 'item email list', 'caption' => 'Email', 'headers' => $headers, 'rows' => $rows, 'column_class' => $headers)); /********************************************************************** * Customers */ echo $this->element('customers', array ('config' => array ('caption' => 'Related Customers', 'rows' => $contact['Customer'], ))); /* End "detail supporting" div */ echo '
' . "\n"; /* End page div */ echo '' . "\n";