/** * Contact for the contact message overview page * * @version 1.0 * Copyright 2011 Andy Potanin, Usability Dynamics, Inc. <*****@*****.**> */ function crm_page_wp_crm_contact_messages() { global $current_screen, $wp_crm, $wpdb; $wp_list_table = new WP_CMR_List_Table("table_scope=wp_crm_contact_messages&per_page=25&ajax_action=wp_crm_messages_table"); //** Load items into table class */ $wp_list_table->all_items = class_contact_messages::get_messages(); //** Items are only loaded, prepare_items() only paginates them */ $wp_list_table->prepare_items(); $wp_list_table->data_tables_script(); //** Determine if sidebar filter shuold be displayed */ $show_filter = false; if (count($wp_crm['wp_crm_contact_system_data']) > 1) { $show_filter = true; } //** Check if we have archived messaged*/ if ($wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->crm_log} WHERE value = 'archived'")) { $show_filter = true; } $show_filter = apply_filters('wp_crm_messages_show_filter', $show_filter); ?> <div class="wp_crm_overview_wrapper wrap"> <div class="wp_crm_ajax_result"></div> <h2><?php _e('Contact Messages', 'wp_crm'); ?> </h2> <div id="poststuff" class="<?php echo $current_screen->id; ?> _table metabox-holder <?php if ($show_filter) { ?> has-right-sidebar<?php } ?> "> <form id="wp-crm-filter" action="#" method="POST"> <?php if ($show_filter) { ?> <div class="wp_crm_sidebar inner-sidebar"> <div class="meta-box-sortables ui-sortable"> <?php do_meta_boxes($current_screen->id, 'normal', $wp_list_table); ?> </div> </div> <?php } ?> <div id="post-body"> <div id="post-body-content"> <?php $wp_list_table->display(); ?> </div> <?php /* .post-body-content */ ?> </div> <?php /* .post-body */ ?> </form> <br class="clear" /> </div> <?php /* #poststuff */ ?> </div> <?php /* .wp_crm_overview_wrapper */ ?> <?php }
/** * Contact for the contact message overview page * * @version 1.0 * Copyright 2011 Andy Potanin, Usability Dynamics, Inc. <*****@*****.**> */ static function crm_page_wp_crm_contact_messages() { global $current_screen, $screen_layout_columns; $wp_list_table = new WP_CMR_List_Table("table_scope=wp_crm_contact_messages&per_page=25&ajax_action=wp_crm_messages_table"); //** Load items into table class */ $wp_list_table->all_items = class_contact_messages::get_messages(); //** Items are only loaded, prepare_items() only paginates them */ $wp_list_table->prepare_items(); $wp_list_table->data_tables_script(); ?> <div class="wp_crm_overview_wrapper wrap"> <div class="wp_crm_ajax_result"></div> <h2><?php _e('Contact Messages', ud_get_wp_crm()->domain); ?> </h2> <form id="wp-crm-filter" action="#" method="POST"> <?php if (!CRM_UD_F::is_older_wp_version('3.4')) { ?> <div id="poststuff"> <div id="post-body" class="metabox-holder <?php echo 2 == $screen_layout_columns ? 'columns-2' : 'columns-1'; ?> "> <div id="post-body-content"> <?php $wp_list_table->display(); ?> </div> <div id="postbox-container-1" class="postbox-container"> <div id="side-sortables" class="meta-box-sortables ui-sortable"> <?php do_meta_boxes($current_screen->id, 'normal', $wp_list_table); ?> </div> </div> </div> </div><!-- /poststuff --> <?php } else { ?> <div id="poststuff" class="<?php echo $current_screen->id; ?> _table metabox-holder <?php echo 2 == $screen_layout_columns ? 'has-right-sidebar' : ''; ?> "> <div class="wp_crm_sidebar inner-sidebar"> <div class="meta-box-sortables ui-sortable"> <?php do_meta_boxes($current_screen->id, 'normal', $wp_list_table); ?> </div> </div> <div id="post-body"> <div id="post-body-content"> <?php $wp_list_table->display(); ?> </div><!-- /.post-body-content --> </div><!-- /.post-body --> <br class="clear"/> </div><!-- /#poststuff --> <?php } ?> </form> </div><!-- /.wp_crm_overview_wrapper --> <?php }