From a0dd32b2ec706edb85213089cbb4366424bdb2d1 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 12 Jun 2018 15:59:12 -0400 Subject: [PATCH] Setup new profile flags for has_no_map_data and has_no_profile. has_no_profile will keep member detail page link from showing. has_no_map_data will keep the Bad Lat Lon error messages from showing in the dashboards. --- classes/data/dataMemberInfo.php | 17 ++++++++++++++++- models/admin/dashboardWidget/index.php | 2 +- models/admin/members/index.php | 2 +- views/admin/member/index.html | 2 +- .../member/memberInfo/editProfileAddress.html | 1 + .../member/memberInfo/editProfileStatus.html | 14 ++++++++++---- views/front/members/list.html | 10 +++++----- 7 files changed, 35 insertions(+), 13 deletions(-) diff --git a/classes/data/dataMemberInfo.php b/classes/data/dataMemberInfo.php index ed583356..8a940c7c 100644 --- a/classes/data/dataMemberInfo.php +++ b/classes/data/dataMemberInfo.php @@ -222,6 +222,20 @@ class GlmDataMemberInfo extends GlmDataAbstract 'use' => 'a' ), + // Has no map data + 'has_no_map_data' => array( + 'field' => 'has_no_map_data', + 'type' => 'checkbox', + 'use' => 'a', + ), + + // Has no profile page + 'has_no_profile' => array( + 'field' => 'has_no_profile', + 'type' => 'checkbox', + 'use' => 'a', + ), + // Address Line 1 'addr1' => array ( 'field' => 'addr1', @@ -818,7 +832,8 @@ class GlmDataMemberInfo extends GlmDataAbstract T.url, R.name AS region, T.logo, - T.short_descr + T.short_descr, + T.has_no_profile FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX. "member_info T LEFT OUTER JOIN ".GLM_MEMBERS_PLUGIN_DB_PREFIX. "regions R ON (R.id = T.region) diff --git a/models/admin/dashboardWidget/index.php b/models/admin/dashboardWidget/index.php index 73a355b3..6d0e70f7 100644 --- a/models/admin/dashboardWidget/index.php +++ b/models/admin/dashboardWidget/index.php @@ -175,7 +175,7 @@ class GlmMembersAdmin_dashboardWidget_index extends GlmDataMembers // Get member records with bad or no lat/lon $hideArchived = " T.status != ".$this->config['status_numb']['Archived']; - $badLatLonList = $MemberInfo->getSimpleMemberInfoList($hideArchived.' AND (T.lat = 0 OR T.lon = 0)'); + $badLatLonList = $MemberInfo->getSimpleMemberInfoList($hideArchived.' AND (T.lat = 0 OR T.lon = 0) AND !has_no_map_data'); $haveBadLatLon = (is_array($badLatLonList) && count($badLatLonList) > 0); // If there's members with pending information, list them diff --git a/models/admin/members/index.php b/models/admin/members/index.php index 959b233f..16340f20 100644 --- a/models/admin/members/index.php +++ b/models/admin/members/index.php @@ -151,7 +151,7 @@ class GlmMembersAdmin_members_index extends GlmDataMembers // Get member information records with bad or no lat/lon $hideArchived = " T.status != ".$this->config['status_numb']['Archived']; - $badLatLonList = $MemberInfo->getSimpleMemberInfoList($hideArchived.' AND (T.lat = 0 OR T.lon = 0)'); + $badLatLonList = $MemberInfo->getSimpleMemberInfoList($hideArchived.' AND (T.lat = 0 OR T.lon = 0) AND !T.has_no_map_data'); $haveBadLatLon = (is_array($badLatLonList) && count($badLatLonList) > 0); // If there's members with pending information, list them diff --git a/views/admin/member/index.html b/views/admin/member/index.html index 2aead12c..ccb6bafd 100644 --- a/views/admin/member/index.html +++ b/views/admin/member/index.html @@ -180,7 +180,7 @@ {$m.create_time.datetime} {$m.modify_time.datetime} - {if $settings.memb_info_location} {if $m.bad_lat_lon}Bad Map Location{/if} {/if} + {if $settings.memb_info_location} {if $m.bad_lat_lon && !$m.has_no_map_data.value}Bad Map Location{/if} {/if} {if apply_filters('glm_members_permit_admin_member_index_clone_activate_info_version', true)} Clone  {if $m.status.name != 'Active'}Activate{/if} diff --git a/views/admin/member/memberInfo/editProfileAddress.html b/views/admin/member/memberInfo/editProfileAddress.html index f0d99068..f36ab0f4 100644 --- a/views/admin/member/memberInfo/editProfileAddress.html +++ b/views/admin/member/memberInfo/editProfileAddress.html @@ -111,6 +111,7 @@
{if $memberInfo.fieldRequired.lat}

{else}

{/if}Location:

+ Has no map data

Drag the pointer to the desired location for this {$terms.term_member}. diff --git a/views/admin/member/memberInfo/editProfileStatus.html b/views/admin/member/memberInfo/editProfileStatus.html index 24663269..51fbcf15 100644 --- a/views/admin/member/memberInfo/editProfileStatus.html +++ b/views/admin/member/memberInfo/editProfileStatus.html @@ -3,11 +3,17 @@

Profile Status:

{if $memberInfo.fieldFail.status}

{$memberInfo.fieldFail.status}

{/if} + + Has no profile page +
+
+
+
@@ -37,4 +43,4 @@ {$terms.term_member} profile.
--> -
\ No newline at end of file + diff --git a/views/front/members/list.html b/views/front/members/list.html index 96caa7ed..4770ba01 100644 --- a/views/front/members/list.html +++ b/views/front/members/list.html @@ -113,7 +113,7 @@ {/if}
- {if $settings.list_map_show_detaillink} + {if $settings.list_map_show_detaillink && !$m.has_no_profile.value} {$m.member_name} {else} {$m.member_name} @@ -142,7 +142,7 @@ {if $m.region && $settings.list_map_show_region}Region: {$m.region}{/if}

{if $m.short_descr && $settings.list_map_show_short_descr}{$m.short_descr}
{/if} + {/literal} --> {apply_filters('glm-member-db-front-members-list-memberInfoTop', '', $member.member_pointer)}

- {if $settings.list_show_detail_link} + {if $settings.list_show_detail_link && !$member.has_no_profile.value} {$member.member} {else} {$member.member} -- 2.17.1