From 42a627578e8c01c8c96c7b01e880dcf06e301ae8 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 9 Nov 2018 15:08:29 -0500 Subject: [PATCH] Update map on trip planner list Add anchors around the phone numbers and apply the formatting. --- models/front/itinerary/list.php | 12 ++- views/front/itinerary/list.html | 141 ++++++++++++++++++++++++++++++-- 2 files changed, 143 insertions(+), 10 deletions(-) diff --git a/models/front/itinerary/list.php b/models/front/itinerary/list.php index 34f5902..ef0a1c6 100755 --- a/models/front/itinerary/list.php +++ b/models/front/itinerary/list.php @@ -26,12 +26,20 @@ class GlmMembersFront_itinerary_list // extends GlmMembersFront_events_baseActio */ public function modelAction( $actionData = false ) { - $status = true; - $view = 'list.html'; + $status = true; + $view = 'list.html'; + $members = array(); + + if ( isset( $_SESSION['travel-list'] ) ) { + foreach ( $_SESSION['travel-list'] as $item ) { + $members[] = apply_filters( 'glm-member-get-memberinfo-data', '', $item['ref_dest'] ); + } + } $templateData = array( 'baseurl' => get_bloginfo( 'url' ), + 'members' => $members, ); error_reporting(E_ALL ^ E_NOTICE); diff --git a/views/front/itinerary/list.html b/views/front/itinerary/list.html index 63ab8c1..b873816 100644 --- a/views/front/itinerary/list.html +++ b/views/front/itinerary/list.html @@ -1,3 +1,11 @@ +{* Trip Planner (Itinerary) List page *} + + + + + + +

{$settings.itinerary_page_content}

@@ -8,7 +16,9 @@

Sign In:

+ + Forgot your Password? @@ -30,21 +40,37 @@
-
- {foreach $smarty.session['travel-list'] as $record} -
- {$data = apply_filters('glm-member-get-memberinfo-data', '', $record.ref_dest)} - -

{$data.member_name}

+
+
+
+ +{if $members} + {foreach $members as $data} +
+ {$data.member_name}
{$data.addr1}
{$data.city}, {$data.state} {$data.zip}
- {if $data.phone}Phone: {$data.phone}
{/if} + {if $data.phone}Phone: {apply_filters('glm_associate_phone_filter', $data.phone)}
{/if} {if $data.url}Website
{/if}
{/foreach} -
+
+ {foreach $members as $data} +
+ +

{$data.member_name}

+
+ {$data.addr1}
+ {$data.city}, {$data.state} {$data.zip}
+ {if $data.phone}Phone: {apply_filters('glm_associate_phone_filter', $data.phone)}
{/if} + {if $data.url}Website
{/if} +
+
+ {/foreach} +
+{/if} -- 2.17.1