]> dev.renevier.net Git - syj.git/blobdiff - application/views/scripts/idx/index.phtml
exported path: use title instead of idx for filename
[syj.git] / application / views / scripts / idx / index.phtml
index a6d276044be7b75c12975ce92558d1a77d33b3d4..03355a2a817799b132cbbcc502db1286ff3e7cbb 100644 (file)
@@ -9,15 +9,26 @@
 </noscript>
 
 <div id="map"></div>
+<div id="map-overlay"></div>
 
-<div id="message" class="message info">
-<?php if (!$this->path and !$this->loggedUser) {?>
-<?php echo $this->translate('Welcome on Syj.')?>
-<br/>
-<?php echo $this->translate('To create a journey, just click on the map to add points to your route. You can zoom and move the map with the controls in the top left corner')?>
-<br/>
-<?php echo $this->translate('When you have finished a path, press "save", button.')?>
-<?php }?>
+<?php
+$message = "";
+$msgclass = "";
+if ($this->errorMsg) {
+    $message .= $this->errorMsg;
+    $msgclass = "error";
+} else if (!$this->path and !$this->loggedUser) {
+    $message .= $this->translate('To create a journey, press <strong>"start a route"</strong> button, then click on the map to add points. To delete a point, hold shift pressed while clicking on it.');
+    $message .= "<br>";
+    $message .= $this->translate('You can zoom and move the map with the controls in the top left corner.');
+    $message .= "<br>";
+    $message .= $this->translate('When you have finished a path, press "create", button.');
+    $msgclass = "info optional";
+}
+?>
+
+<div id="message" class="message <?php echo $msgclass?>">
+    <?php echo $message ?>
 </div>
 
 
 
                     <div id="path-export-title" class="info-title"><?php echo $this->translate("export")?></div>
                     <div id="path-export-content"><?php
-                       $href = $fullBaseUrl . 'geom/' . urlencode($this->path->id) . '.kml';
+                       $href = $fullBaseUrl . 'geom/' . rawurlencode($this->path->displayTitle) . '.kml';
                        printf('<a href="%s" title="%s">%s</a>',
                                         $href,
                                         $this->translate('kml export'),
                                         $this->translate('kml export'));
 
                         print '<br>';
-                       $href = $fullBaseUrl . 'geom/' . urlencode($this->path->id) . '.gpx';
+                       $href = $fullBaseUrl . 'geom/' . rawurlencode($this->path->displayTitle) . '.gpx';
                        printf('<a href="%s" title="%s">%s</a>',
                                         $href,
                                         $this->translate('gpx export'),