From: Laury GvR Date: Thu, 12 Jan 2017 18:21:35 +0000 (-0500) Subject: Contact list ordered, county search hidden if empty X-Git-Tag: v1.0.17^2~3 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=ec302978cf1ab4094d17835df96c13d83519ed42;p=WP-Plugins%2Fglm-member-db-contacts.git Contact list ordered, county search hidden if empty The county search is now hidden if there are no counties. The contact list is also ordered by lname, fname. --- diff --git a/models/front/contacts/list.php b/models/front/contacts/list.php index af0b950..65c4ce2 100644 --- a/models/front/contacts/list.php +++ b/models/front/contacts/list.php @@ -134,6 +134,7 @@ class GlmMembersFront_contacts_list extends GlmDataContacts $userDeleted = false; $wpUserDeleted = false; $contactMembers = array(); + $order = false; $numbContacts = false; $numbDisplayed = false; @@ -272,14 +273,12 @@ class GlmMembersFront_contacts_list extends GlmDataContacts $start = $newStart; } } - + $order = "lname, fname"; // Get list of contacts - $contactsList = $this->getList($where); + $contactsList = $this->getList($where, $order); if ($contactsList != false) { - if ($paging) { - //Get paging results $numbDisplayed = $contactsList['returned']; $lastDisplayed = $contactsList['last']; diff --git a/views/front/contacts/list.html b/views/front/contacts/list.html index b3bcf50..90bfa98 100644 --- a/views/front/contacts/list.html +++ b/views/front/contacts/list.html @@ -23,6 +23,7 @@ and open the template in the editor.
Text Search:
+ {if $countyList}
County Search:
+ {/if}