<label class="" id="title-prompt-text" for="title"><?php sc_e('Contact Name'); ?> </label> <?php } ?> <input type="text" name="post_title" size="30" value="<?php echo esc_html($title); ?> " id="title"> </div> <div id="sc_type_select"> <?php sc_type_select(); ?> <span class="helptip client_type_help" data-sa-dropdown="#client_type_select_help"></span> <div id="client_type_select_help" class="sa-dropdown sa-dropdown-tip sa-dropdown-relative "> <div class="sa-dropdown-panel"> <?php self::_e('Select the type of client this contact is. If a type does not exist you can always create a new one that better fits.'); ?> </div> </div> </div><!-- #sc_type_select --> </div> <div id="sc_status_selections" class="clearfix"> <?php sc_status_select($id);
/** * Display the content for the column * * @param string $column_name * @param int $id post_id * @return string */ public static function column_display($column_name, $id) { $client = Sprout_Client::get_instance($id); if (!is_a($client, 'Sprout_Client')) { return; // return for that temp post } switch ($column_name) { case 'sc_client_type': sc_type_select($id); break; case 'sc_client_status': sc_status_select($id); break; case 'lead_info': echo '<p>'; $address = si_format_address($client->get_address(), 'string', '<br/>'); print $address; if ('' !== $address) { echo '<br/>'; } echo make_clickable(esc_url($client->get_website())); echo '</p>'; break; case 'contacts': $associated_users = $client->get_associated_users(); echo '<p>'; printf('<b>%s</b>: ', sc__('User Contacts')); if (!empty($associated_users)) { $users_print = array(); foreach ($associated_users as $user_id) { $user = get_userdata($user_id); if (!is_a($user, 'WP_User')) { $client->remove_associated_user($user_id); continue; } $users_print[] = sprintf('<span class="associated_user"><a href="%s">%s</a></span>', get_edit_user_link($user_id), sc_get_users_full_name($user_id)); } } if (!empty($users_print)) { print implode(', ', $users_print); } else { sc_e('No associated people/users.'); } echo '</p>'; break; default: // code... break; } }