]> dev.renevier.net Git - syj.git/blobdiff - application/layouts/scripts/footer.phtml
fixes: link to create a route was not active
[syj.git] / application / layouts / scripts / footer.phtml
index 08b2ff95e67124410037a5aa61b731706c0167f5..e6d733f349ce274843d3ba9a7932736d5a8c4ee4 100644 (file)
@@ -1,5 +1,7 @@
 <?php
-echo '<div id="footer">' . PHP_EOL;
+
+echo '<!--[if IE]><script>document.createElement("footer");</script><![endif]-->' . PHP_EOL;
+echo '<footer>' . PHP_EOL;
 echo '<div id="footer-padding"></div>' . PHP_EOL;
 
 /*
@@ -8,11 +10,8 @@ echo '<div id="footer-padding"></div>' . PHP_EOL;
 
 $front = Zend_Controller_Front::getInstance();
 $reqParams = $front->getRequest()->getParams();
-if ($reqParams['controller'] == 'idx' and (!isset($reqParams['url']))) {
-    $mainpage = true;
-} else {
-    $mainpage = false;
-}
+
+$mainpage = ($reqParams['controller'] === 'idx') && (!isset($reqParams['url']));
 
 $content = $this->translate("create a route");
 $link = ($mainpage) ? $this->escape($content) : $this->anchor($this->baseUrl(), $content, array('class' => 'footer-anchor'));
@@ -31,19 +30,33 @@ echo $this->footerLink(array(
 /*
  * account link
  */
-if ($mainpage or $this->loggedUser) {
+if ($this->loginform or $this->loggedUser) {
     echo $this->footerLink(array(
             'route' => 'account',
             'action'     => 'index',
             'controller' => 'account'),
         $this->translate("my account"), true,
+        'logged-show logged-pseudo',
+        $this->loggedUser ?  " ({$this->loggedUser->pseudo})": " (%s)"
+        );
+}
+
+/*
+ * list link
+ */
+if ($this->loginform or $this->loggedUser) {
+    echo $this->footerLink(array(
+            'route' => 'list',
+            'action'     => 'index',
+            'controller' => 'list'),
+        $this->translate("my routes"), false,
         'logged-show');
 }
 
 /*
  * login or logout links
  */
-if (!$mainpage) {
+if (!$this->loginform) {
     if ($this->loggedUser) {
 
         echo $this->footerLink(array(
@@ -73,6 +86,16 @@ echo $this->footerLink(array(
     $this->translate("terms of use"),
     false);
 
-echo '</div>' . PHP_EOL;
+/*
+ * faq
+ */
+echo $this->footerLink(array(
+    'route' => 'faq',
+    'action'     => 'index',
+    'controller' => 'faq'),
+    $this->translate("help"),
+    false);
+
+echo '</footer>' . PHP_EOL;
 
 ?>