Add links to SAPO maps.
authorJan <jan@horde.org>
Thu, 8 Jul 2010 08:37:29 +0000 (09:37 +0100)
committerJan <jan@horde.org>
Tue, 17 Aug 2010 12:35:53 +0000 (13:35 +0100)
kronolith/templates/itip/notification.html.php
kronolith/templates/itip/notification.plain.php

index 9f0c951..b125fd2 100644 (file)
     <?php if (strlen($this->event->location)): ?>
     <tr>
       <td style="font-weight:bold;vertical-align:top"><?php echo _("Location:") ?></td>
-      <td><?php echo $this->h($this->event->location) ?></td>
+      <td><?php echo $this->h($this->event->location) ?>
+      <?php if (strtolower($GLOBALS['conf']['maps']['driver']) == 'sapo'): ?>
+        <?php if ($this->event->geoLocation['lat'] != null && $this->event->geoLocation['lon'] != null): ?>
+            <?php echo "<a href='http://mapas.sapo.pt/?ll=".$this->event->geoLocation['lon'].",".$this->event->geoLocation['lat']."&z=6&t=m&mks=".$this->event->geoLocation['lon'].",".$this->event->geoLocation['lat'].",1,".urlencode($this->event->getTitle()).$_descr."'>"._("Ver no Mapa")."</a>"; ?>
+        <? endif; ?>
+      <? endif; ?>      
+      </td>
     </tr>
     <?php endif; ?>
     <?php if (strlen($this->event->description)): ?>
index 402f864..0c65294 100644 (file)
@@ -3,6 +3,11 @@
 <?php if (strlen($this->event->location)): ?>
 <?php echo _("Location:") ?> <?php echo $this->event->location ?>
 
+    <?php if (strtolower($GLOBALS['conf']['maps']['driver']) == 'sapo'): ?>
+        <?php if ($this->event->geoLocation['lat'] != null && $this->event->geoLocation['lon'] != null): ?>
+            <?php echo _("Ver no Mapa:"); ?> <?= "http://mapas.sapo.pt/?ll=".$this->event->geoLocation['lon'].",".$this->event->geoLocation['lat']."&z=6&t=m&mks=".$this->event->geoLocation['lon'].",".$this->event->geoLocation['lat'].",1,".urlencode($this->event->getTitle()).$_descr; ?>
+        <? endif; ?>
+     <? endif; ?>
 
 <?php endif; ?>
 <?php if ($this->attendees): ?>