From: Anthony Talarico Date: Tue, 21 Nov 2017 19:53:22 +0000 (-0500) Subject: added pending only search to the list view X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=252003effadddb215cb34a63661ed806de7417f8;p=WP-Plugins%2Fglm-member-db-for-sale.git added pending only search to the list view pending only search checkbox added to list search --- diff --git a/models/admin/forSale/index.php b/models/admin/forSale/index.php index dc8580b..5c4ff45 100644 --- a/models/admin/forSale/index.php +++ b/models/admin/forSale/index.php @@ -107,6 +107,8 @@ class GlmMembersAdmin_forSale_index extends GlmDataForSale $haveMember = false; $where = 'TRUE'; + $isPending = ( !empty( $_REQUEST['pending-item'] ) ) ? true : false; + // Check if there's a logged in user who is locked to their own entity $lockedToMember = apply_filters('glm_members_locked_to_member_id', false); if ($lockedToMember) { @@ -178,7 +180,9 @@ class GlmMembersAdmin_forSale_index extends GlmDataForSale $this->item_id = false; } } - + if($isPending){ + $where .= ' AND active = 0 '; + } $item_data = $this->getList($where,'topic DESC, title'); switch ($option) { @@ -280,6 +284,7 @@ class GlmMembersAdmin_forSale_index extends GlmDataForSale 'itemAddError' => $itemAddError, 'option' => $option, 'item' => $item, + 'isPending' => $isPending, 'assetsUrl' => GLM_MEMBERS_FOR_SALE_PLUGIN_URL . 'assets/', ); diff --git a/views/admin/forSale/edit.html b/views/admin/forSale/edit.html index d6e88a4..269b62c 100644 --- a/views/admin/forSale/edit.html +++ b/views/admin/forSale/edit.html @@ -34,6 +34,15 @@ + +
+
+ Active +
+
+ +
+
@@ -177,15 +186,7 @@
{include file='admin/forSale/parts/image_input.html'}
- -
-
- Active -
-
- -
-
+
diff --git a/views/admin/forSale/list.html b/views/admin/forSale/list.html index 5689664..e076d16 100644 --- a/views/admin/forSale/list.html +++ b/views/admin/forSale/list.html @@ -1,32 +1,53 @@ {include file='admin/header.html'} -{if $haveMember} - -{if !$lockedToMember} - -{/if} - -{/if} - +