From 7dea24937003f49c4631163daaed44d909a5dd5c Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 11 Oct 2016 15:02:48 -0400 Subject: [PATCH] Update package list for member manager. make the list not limit to 5. Only get the current packages. --- models/admin/dashboard/packaging.php | 8 ++++---- views/admin/dashboard/packaging.html | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/models/admin/dashboard/packaging.php b/models/admin/dashboard/packaging.php index b4f5b15..375c774 100644 --- a/models/admin/dashboard/packaging.php +++ b/models/admin/dashboard/packaging.php @@ -129,10 +129,10 @@ class GlmMembersAdmin_dashboard_packaging extends GlmDataPackages } else { // This should be the Current Packages that are current running. - $where = ''; - $packages = $this->getList( $where, '', true, 'id', 1, 5 ); + $where = 'T.start_date <= now() and T.end_date >= now()'; + $packages = $this->getList( $where ); // If we have some, tell the template - if ($packages && count($packages['list']) > 0) { + if ($packages && count($packages) > 0) { $havePackages = true; } } @@ -152,7 +152,7 @@ class GlmMembersAdmin_dashboard_packaging extends GlmDataPackages $templateData = array( 'lockedToMember' => $lockedToMember, 'havePackages' => $havePackages, - 'packages' => $packages['list'], + 'packages' => (isset($packages['list']) ? $packages['list']: $packages), 'memberID' => $memberID, ); diff --git a/views/admin/dashboard/packaging.html b/views/admin/dashboard/packaging.html index 95b2f2c..563089e 100644 --- a/views/admin/dashboard/packaging.html +++ b/views/admin/dashboard/packaging.html @@ -4,6 +4,8 @@ Packages {if $lockedToMember}  Add a New Package for this {$terms.term_member_cap}  + {else} + (Current) {/if}
-- 2.17.1