X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Flayouts%2Fscripts%2Ffooter.phtml;h=776d906aad8d9e70dcee6dccf36271523e28763a;hb=208a09a18b0212eecb94b74fd63840e6fcce8878;hp=4003423b558562f2b0b476a9b1cf04e53af3c7ad;hpb=190fd621df4920c56a422c03663874cddaa67d64;p=syj.git diff --git a/application/layouts/scripts/footer.phtml b/application/layouts/scripts/footer.phtml index 4003423..776d906 100644 --- a/application/layouts/scripts/footer.phtml +++ b/application/layouts/scripts/footer.phtml @@ -5,25 +5,17 @@ echo '' . PHP_EOL; /* * main page link */ -$page = new Zend_Navigation_Page_Mvc(array( - 'route' => 'idx', - 'params' => array( - 'action' => 'index', - 'controller' => 'idx', - 'url' => ''))); $front = Zend_Controller_Front::getInstance(); $reqParams = $front->getRequest()->getParams(); if ($reqParams['controller'] == 'idx' and (!isset($reqParams['url']))) { - $current = true; + $mainpage = true; } else { - $current = false; + $mainpage = false; } -$mainpage = $current; - -$content = $this->translate("main page"); -$link = ($current) ? $this->escape($content) : $this->anchor($page->getHRef(), $content, array('class' => 'footer-anchor')); +$content = $this->translate("create a route"); +$link = ($mainpage) ? $this->escape($content) : $this->anchor($this->baseUrl(), $content, array('class' => 'footer-anchor')); echo '' . PHP_EOL; /* @@ -37,24 +29,44 @@ echo $this->footerLink(array( isset($this->redirectLinks) ? $this->redirectLinks : true); /* - * login, logout, account links + * account link */ -if ($this->loggedUser()) { +if ($mainpage or $this->loggedUser) { echo $this->footerLink(array( 'route' => 'account', 'action' => 'index', 'controller' => 'account'), - $this->translate("my account")); - if (!$mainpage) { + $this->translate("my account"), true, + 'logged-show logged-pseudo', + $this->loggedUser ? " ({$this->loggedUser->pseudo})": " (%s)" + ); +} + +/* + * list link + */ +if ($mainpage 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->loggedUser) { + echo $this->footerLink(array( 'route' => 'logout', 'action' => 'logout', 'controller' => 'login'), $this->translate("logout"), false); - } -} else { - if (!$mainpage) { + } else { echo $this->footerLink(array( 'route' => 'login', 'action' => 'login', @@ -75,6 +87,16 @@ echo $this->footerLink(array( $this->translate("terms of use"), false); +/* + * faq + */ +echo $this->footerLink(array( + 'route' => 'faq', + 'action' => 'index', + 'controller' => 'faq'), + $this->translate("faq"), + false); + echo '' . PHP_EOL; ?>