From bbd241fdf102ebef8d81c3f4a336cd478ddd3035 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Tue, 15 Jul 2014 12:35:08 -0400 Subject: [PATCH] Turning the image into a link to google maps Adding an tag around the map image with an href to google maps utilising the property[] array to create a dynamic link for directions. Display was just changed to not show an empty image and address line on the page play-11. --- Toolkit/Property/Display.php | 7 ++++--- templates/template.html | 8 +++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Toolkit/Property/Display.php b/Toolkit/Property/Display.php index e424d89..f75dd85 100644 --- a/Toolkit/Property/Display.php +++ b/Toolkit/Property/Display.php @@ -57,9 +57,10 @@ class Toolkit_Property_Display $dbh, $propertyId ); - $property = ($property) - ? $property->getPropertiesAsArray() - : false; + if (!$property) { + return false; + } + $property = $property->getPropertiesAsArray(); $mapImageName = "prop-{$propertyId}.png"; if (file_exists(BASE . 'Toolkit/Property/Maps/' . $mapImageName)) { $property['mapimg'] = $mapImageName; diff --git a/templates/template.html b/templates/template.html index 8126e6e..76907ad 100644 --- a/templates/template.html +++ b/templates/template.html @@ -37,11 +37,13 @@
  • {toolboxContent:h} -
    +
    {property[street]} · {property[city]}, {property[state]} {property[zip]} · {property[phone]} · {property[url]}
    -
    - +
    -- 2.17.1