From: Laury GvR Date: Thu, 20 Sep 2018 16:59:56 +0000 (-0400) Subject: Added test 'active' table, replaced some common strings with variables, removed baseU... X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=a51ab80637fbb2877367e51108711bcf96b37f21;p=WP-Plugins%2Fglm-member-db-packaging.git Added test 'active' table, replaced some common strings with variables, removed baseUrl from textSearch --- diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 58f5fa9..b790dd1 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -49,6 +49,7 @@ add_filter( function ( $member = null ) { $packagingIndexPage = GLM_MEMBERS_PACKAGING_PLUGIN_ADMIN_URL . '?page=glm-members-admin-menu-packaging-index&glm_action=index'; $packagesTable = GLM_MEMBERS_PACKAGING_PLUGIN_DB_PREFIX . "packages"; + $packagingEditPage = GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE.'member&glm_action=packaging&option=edit'; $content = [ 'title' => 'Packaging', 'buttons' => [ @@ -89,26 +90,39 @@ add_filter( 'textSearch' => [ 'order' => 2, 'component' => 'textSearch', + 'entityID' => 'packageID', 'table' => $packagesTable, 'fields' => "id, title, image, ref_dest", - 'baseUrl' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE.'member&glm_action=packaging', - 'resultUrl' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE.'member&glm_action=packaging&option=edit', - 'entityID' => 'packageID' + 'resultUrl' => $packagingEditPage, + ], + 'active' => [ + 'title' => "Active Packages", + 'slug' => "active-packages", + 'order' => 3, + 'component' => 'list', + 'entityID' => 'packageID', + 'table' => $packagesTable, + 'fields' => "id, title, ref_dest", + 'where' => 'status='.$this->config['status_numb']['Active'] . '', + 'resultUrl' => $packagingEditPage, ], 'pending' => [ 'title' => "Pending Packages", 'slug' => "pending-packages", 'order' => 3, 'component' => 'list', + 'entityID' => 'packageID', 'table' => $packagesTable, 'fields' => "id, title, ref_dest", - 'where' => 'status = '.$this->config['status_numb']['Pending'], + 'where' => 'status='.$this->config['status_numb']['Pending'] . '', + 'resultUrl' => $packagingEditPage, ], 'expired' => [ 'title' => "Expired Packages", 'slug' => "expired-packages", 'order' => 4, 'component' => 'list', + 'entityID' => 'packageID', 'table' => $packagesTable, 'fields' => "id, title, ref_dest", // 'fields' => [