Added warnings for no counties to members dashboard and main dashboard GLM Associate...
authorChuck Scott <cscott@gaslightmedia.com>
Tue, 4 Apr 2017 19:33:32 +0000 (15:33 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Tue, 4 Apr 2017 19:33:32 +0000 (15:33 -0400)
models/admin/dashboardWidget/index.php
models/admin/members/index.php
views/admin/dashboardWidget/index.html

index 25c22a4..73a355b 100644 (file)
@@ -156,6 +156,12 @@ class GlmMembersAdmin_dashboardWidget_index extends GlmDataMembers
         $citiesStats = $Cities->getStats();
         $haveCities = ($citiesStats > 0);
 
+        // Check for required Counties
+        require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataCounties.php';
+        $Counties      = new GlmDataCounties($this->wpdb, $this->config);
+        $countiesStats = $Counties->getStats();
+        $haveCounties  = ($countiesStats > 0);
+
         // Check for required Regions
         require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataRegions.php';
         $Regions = new GlmDataRegions($this->wpdb, $this->config);
@@ -190,6 +196,7 @@ class GlmMembersAdmin_dashboardWidget_index extends GlmDataMembers
             'haveAmenities' => $haveAmenities,
             'haveRegions' => $haveRegions,
             'haveCities' => $haveCities,
+            'haveCounties' => $haveCounties,
             'pendingList' => $pendingList
 //            'addOns' => $this->config['addOns']
         );
index 1f72d46..959b233 100644 (file)
@@ -132,6 +132,12 @@ class GlmMembersAdmin_members_index extends GlmDataMembers
         $citiesStats = $Cities->getStats();
         $haveCities  = ($citiesStats > 0);
 
+        // Check for required Counties
+        require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataCounties.php';
+        $Counties      = new GlmDataCounties($this->wpdb, $this->config);
+        $countiesStats = $Counties->getStats();
+        $haveCounties  = ($countiesStats > 0);
+
         // Check for required Regions
         require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataRegions.php';
         $Regions      = new GlmDataRegions($this->wpdb, $this->config);
@@ -167,6 +173,7 @@ class GlmMembersAdmin_members_index extends GlmDataMembers
             'haveMemberTypes' => $haveMemberTypes,
             'haveCategories'  => $haveCategories,
             'haveAmenities'   => $haveAmenities,
+            'haveCounties'    => $haveCounties,
             'haveRegions'     => $haveRegions,
             'haveCities'      => $haveCities,
             'pendingList'     => $pendingList
index 1de6800..6101a0d 100644 (file)
 
 {if $settings.enable_members && apply_filters('glm_members_permit_admin_widget_warnings', true)}
     <table class="wp-list-table striped glm-admin-table">
-  {if !$haveMemberTypes || !$haveCategories || !$haveAmenities || !$haveCities || !$haveRegions || $numbMembers == 0}
-        <tr><th colspan="2"><h4><span  class="glm-error">Pending {$terms.term_member_cap} Information</span></h4></th></tr>
+  {if !$haveMemberTypes || !$haveCategories || !$haveAmenities || !$haveCities || !$haveCounties || !$haveRegions || $numbMembers == 0}
     {if !$haveMemberTypes}
         <tr>
-            <th class="glm-error">No {$terms.term_member_cap} Types</th>
-            <td><a href="{$adminUrl}?page=glm-members-admin-menu-configure&glm_action=memberTypes" class="glm-right">Add</a></td>
+            <th class="glm-error">No {$terms.term_member_cap} Types Listed</th>
+            <td><a href="{$adminUrl}?page=glm-members-admin-menu-settingts&glm_action=memberTypes" class="glm-right">Add</a></td>
         </tr>
     {/if}                
     {if !$haveCategories}
         <tr>
-            <th><span class="glm-error">No {$terms.term_member_cap} Categories</span></th>
-            <td><a href="{$adminUrl}?page=glm-members-admin-menu-configure&glm_action=categories" class="glm-right">Add</a></td>
+            <th><span class="glm-error">No {$terms.term_member_cap} Categories Listed</span></th>
+            <td><a href="{$adminUrl}?page=glm-members-admin-menu-settings&glm_action=categories" class="glm-right">Add</a></td>
         </tr>
     {/if}                
     {if !$haveAmenities}
         <tr>
-            <th><span class="glm-error">No Amenities</span></th>
-            <td><a href="{$adminUrl}?page=glm-members-admin-menu-configure&glm_action=amenities" class="glm-right">Add</a></td>
+            <th><span class="glm-error">No Amenities Listed</span></th>
+            <td><a href="{$adminUrl}?page=glm-members-admin-menu-settings&glm_action=amenities" class="glm-right">Add</a></td>
         </tr>
     {/if}                
     {if !$haveCities}
         <tr>
-            <th><span class="glm-error">No Cities</span></th>
-            <td><a href="{$adminUrl}?page=glm-members-admin-menu-configure&glm_action=cities" class="glm-right">Add</a></td>
+            <th><span class="glm-error">No Cities Listed</span></th>
+            <td><a href="{$adminUrl}?page=glm-members-admin-menu-settings&glm_action=cities" class="glm-right">Add</a></td>
+        </tr>
+    {/if}
+    {if !$haveCounties}
+        <tr>
+            <th><span class="glm-error">No {$terms.term_county_plur_cap} Listed</span></th>
+            <td><a href="{$adminUrl}?page=glm-members-admin-menu-settings&glm_action=counties" class="glm-right">Add</a></td>
         </tr>
     {/if}                
     {if !$haveRegions}
         <tr>
-            <th><span class="glm-error">No Regions</span></th>
-            <td><a href="{$adminUrl}?page=glm-members-admin-menu-configure&glm_action=regions" class="glm-right">Add</a></td>
+            <th><span class="glm-error">No Regions Listed</span></th>
+            <td><a href="{$adminUrl}?page=glm-members-admin-menu-settings&glm_action=regions" class="glm-right">Add</a></td>
         </tr>
     {/if}                
     {if $numbMembers == 0}
         <tr>
-           <th> <span class="glm-error">No {$terms.term_member_plur_cap}</span></th>
+           <th> <span class="glm-error">No {$terms.term_member_plur_cap} Listed</span></th>
             <td><a href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=index&member_id=" class="glm-right">Add a {$terms.term_member_cap}</a></td>
         </tr>
     {/if}