path-infos simplification
authorArno Renevier <arno@renevier.net>
Wed, 28 Dec 2011 17:16:30 +0000 (18:16 +0100)
committerArno Renevier <arno@renevier.net>
Wed, 28 Dec 2011 17:22:56 +0000 (18:22 +0100)
application/views/scripts/idx/index.phtml
public/css/syj.css

index da47129..1e34d35 100644 (file)
@@ -71,12 +71,9 @@ if ($this->errorMsg) {
                 <div id="path-infos-content" class="menu-item">
 
                     <div id="path-directlink-title" class="info-title"><?php echo $this->translate("direct link")?></div>
-                    <div id="path-directlink-content"><?php
-                            $serverUrl = rtrim($this->serverUrl(), '/');
-                            $baseUrl = trim($this->baseUrl(), '/');
-                            $fullBaseUrl = $serverUrl . '/' . ($baseUrl ? ($baseUrl . '/'): '');
+                    <div id="path-directlink-content" class="info-content"><?php
                             $urlcomp = urlencode($this->path->urlcomp ?: $this->path->id);
-                            $href = $fullBaseUrl . 'idx/' . $urlcomp . '?format=raw';
+                            $href = $this->baseUrl() . '/idx/' . $urlcomp . '?format=raw';
                             printf('<a href="%s" title="%s">%s</a>',
                                         $href,
                                         $this->translate('direct link'),
@@ -84,16 +81,16 @@ if ($this->errorMsg) {
                         ?></div>
 
                     <div id="path-export-title" class="info-title"><?php echo $this->translate("export")?></div>
-                    <div id="path-export-content"><?php
+                    <div id="path-export-content" class="info-content"><?php
                        $fileName = $this->path->title ?: $this->path->id;
-                       $href = $fullBaseUrl . 'geom/' . rawurlencode($fileName) . '.kml';
+                       $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 = $fullBaseUrl . 'geom/' . rawurlencode($fileName) . '.gpx';
+                       $href = $this->baseUrl() . '/geom/' . rawurlencode($fileName) . '.gpx';
                        printf('<a href="%s" title="%s">%s</a>',
                                         $href,
                                         $this->translate('gpx export'),
index e88f3da..8e29c42 100644 (file)
@@ -117,17 +117,17 @@ body, html {
 .info-title {
     text-decoration: underline;
 }
+.info-content a {
+    text-decoration: none;
+}
 
 #path-infos-content {
     text-align: center;
     padding: 4px 15px 15px 15px;
 }
 
-#path-export-title {
-    margin-top: 1em;
-}
-#path-export-content a {
-    text-decoration: none;
+.info-content {
+    margin-bottom: 0.5em;
 }
 
 #path-length {