</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 map with controls upper left.')?>
-<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-length" class="menu-group">
+ <div id="path-length-title" class="info-title"><?php echo $this->translate('route length')?></div>
+ <div id="path-length-content">
+ </div>
+</div>
+
<div id="menu">
<?php echo $this->localeSwitcher(); ?>
- <div id="login_controls">
+ <div id="login_controls" class="menu-group">
<div>
- <div class="login-anchor">
+ <div class="menu-item">
<?php
echo $this->anchor('login', $this->translate('login'), array('id' => 'login_control_anchor'));
$anchortext = sprintf("<span id=\"account-create-anchor\">%s</span><span id=\"account-info\"><br>%s</span>",
$this->translate('Whith an account, you can manage and modify your routes'));
?>
</div>
- <div class="login-anchor">
+ <div class="menu-item">
<?php
echo $this->anchor('', $anchortext, array('id' => 'user_control_anchor'), false);
?>
</div>
</div>
+ <?php if (isset($this->path)) { ?>
+ <div id="path-infos" class="menu-group">
+ <div class="menu-item">
+ <div id="path-infos-toggler"><a href="" id="path-infos-anchor"><?php echo $this->translate("route infos")?></a></div>
+ </div>
+ <div id="path-infos-content" class="menu-item">
+
+ <section class="info-section">
+ <h1 id="path-directlink-title"><?php echo $this->translate("direct link")?></h1>
+ <?php
+ $urlcomp = urlencode($this->path->urlcomp ?: $this->path->id);
+ $href = $this->baseUrl() . '/idx/' . $urlcomp . '?format=raw';
+ printf('<a href="%s" title="%s">%s</a>',
+ $href,
+ $this->translate('direct link'),
+ $this->escape($href));
+ ?>
+ </section>
+
+ <section class="info-section">
+ <h1 id="path-export-title"><?php echo $this->translate("export")?></h1>
+ <?php
+ $fileName = $this->path->title ?: $this->path->id;
+ $href = $this->baseUrl() . '/geom/' . rawurlencode($fileName) . '.kml';
+ printf('<a href="%s" title="%s">%s</a>',
+ $href,
+ $this->translate('kml export'),
+ $this->translate('kml export'));
+
+ print '<br>';
+ $href = $this->baseUrl() . '/geom/' . rawurlencode($fileName) . '.gpx';
+ printf('<a href="%s" title="%s">%s</a>',
+ $href,
+ $this->translate('gpx export'),
+ $this->translate('gpx export'));
+ ?>
+ </section>
+
+ <?php if ($this->profileActive) { ?>
+ <section class="info-section">
+ <h1 id="path-profile-title"><?php echo $this->translate("altitude profile")?></h1>
+ <?php
+ $urlcomp = urlencode($this->path->urlcomp ?: $this->path->id);
+ $href = $this->baseUrl() . '/profile/' . $urlcomp . '.png';
+ $imgsrc = $this->addParamToUrl($href, 'size', 'small', true);
+ printf('<a href="%s"><img src="%s"></a>', $href, $imgsrc);
+ ?>
+ </section>
+ <?php }?>
+
+
+ </div>
+ </div>
+ <?php }?>
+
<div id="data_controls">
<div id="data_controls_btns">
<img id="nominatim-throbber" src="icons/throbber.gif">
</div>
- <div id="nominatim-suggestions">
- <div id="nominatim-suggestions-title"><?php echo $this->translate('more results')?></div>
- <ul id="nominatim-suggestions-list"></ul>
- </div>
-
</form>
<input id="create-btn" name="create-btn" type="button" value="<?php echo $this->translate('start a route');?>">
<?php
print $this->geomform;
?>
+
</div>
+<?php if (!isset($this->path)) {?>
+ <div id="nominatim-suggestions">
+ <div id="nominatim-suggestions-title"><?php echo $this->translate('more results')?></div>
+ <ul id="nominatim-suggestions-list"></ul>
+ </div>
+<?php }?>
+
+
</div>
<div id="newpwd_area" class="modal">