/** * Render the customer name column * * @since 1.0 * * @param object $item * * @return string */ function column_name($subscriber_contact) { $contact = new \WeDevs\ERP\CRM\Contact($subscriber_contact->user_id); $actions = array(); $delete_url = ''; $edit_url = ''; $actions['edit'] = sprintf('<a href="%s" data-id="%d" title="%s">%s</a>', $edit_url, $subscriber_contact->user_id, __('Edit this item', 'wp-erp'), __('Edit', 'wp-erp')); $actions['delete'] = sprintf('<a href="%s" class="submitdelete" data-id="%d" title="%s">%s</a>', $delete_url, $subscriber_contact->user_id, __('Delete this item', 'wp-erp'), __('Delete', 'wp-erp')); return sprintf('%4$s <a href="%3$s"><strong>%1$s</strong></a> %2$s', $contact->get_full_name(), $this->row_actions($actions), erp_crm_get_details_url($contact->id, $contact->type), $contact->get_avatar()); }
<span class="sep">:</span> <span class="value"><?php echo $current_user->display_name; ?> </span> </p> <p class="email-to"> <input type="hidden" name="user_id" v-model="feedData.user_id" value="<?php echo $customer->id; ?> "> <label>To</label> <span class="sep">:</span> <span class="value"><?php echo $customer->get_full_name(); ?> </span> </p> <p class="email-subject"> <label>Subject</label> <span class="sep">:</span> <span class="value"> <input type="text" name="email_subject" v-model="feedData.email_subject" placeholder="<?php _e('Subject...', 'wp-erp'); ?> "> </span> </p>
/** * Render the customer name column * * @since 1.0 * * @param object $item * * @return string */ function column_name($customer) { $customer = new \WeDevs\ERP\CRM\Contact(intval($customer->id), $this->contact_type); $actions = array(); $delete_url = ''; $view_url = $customer->get_details_url(); $data_hard = isset($_REQUEST['status']) && $_REQUEST['status'] == 'trash' ? 1 : 0; $delete_text = isset($_REQUEST['status']) && $_REQUEST['status'] == 'trash' ? __('Permanent Delete', 'wp-erp') : __('Delete', 'wp-erp'); $customer_name = $customer->first_name . ' ' . $customer->last_name; $edit_title = $customer->type == 'company' ? __('Edit this Company', 'wp-erp') : __('Edit this customer', 'wp-erp'); $view_title = $customer->type == 'company' ? __('View this Company', 'wp-erp') : __('View this customer', 'wp-erp'); $actions['edit'] = sprintf('<a href="%s" data-id="%d" title="%s">%s</a>', $delete_url, $customer->id, $edit_title, __('Edit', 'wp-erp')); $actions['view'] = sprintf('<a href="%s" title="%s">%s</a>', $view_url, $view_title, __('View', 'wp-erp')); $actions['delete'] = sprintf('<a href="%s" class="submitdelete" data-id="%d" data-hard=%d title="%s">%s</a>', $delete_url, $customer->id, $data_hard, __('Delete this item', 'wp-erp'), $delete_text); if (isset($_REQUEST['status']) && $_REQUEST['status'] == 'trash') { $actions['restore'] = sprintf('<a href="%s" class="restoreCustomer" data-id="%d" title="%s">%s</a>', $delete_url, $customer->id, __('Restore this item', 'wp-erp'), __('Restore', 'wp-erp')); } return sprintf('%4$s <a href="%3$s"><strong>%1$s</strong></a> %2$s', $customer->get_full_name(), $this->row_actions($actions), $customer->get_details_url(), $customer->get_avatar()); }