]> dev.renevier.net Git - syj.git/blob - application/layouts/scripts/footer.phtml
fixes: link to create a route was not active
[syj.git] / application / layouts / scripts / footer.phtml
1 <?php
2
3 echo '<!--[if IE]><script>document.createElement("footer");</script><![endif]-->' . PHP_EOL;
4 echo '<footer>' . PHP_EOL;
5 echo '<div id="footer-padding"></div>' . PHP_EOL;
6
7 /*
8  * main page link
9  */
10
11 $front = Zend_Controller_Front::getInstance();
12 $reqParams = $front->getRequest()->getParams();
13
14 $mainpage = ($reqParams['controller'] === 'idx') && (!isset($reqParams['url']));
15
16 $content = $this->translate("create a route");
17 $link = ($mainpage) ? $this->escape($content) : $this->anchor($this->baseUrl(), $content, array('class' => 'footer-anchor'));
18 echo '<div class="footer-link">' . $link . '</div>' . PHP_EOL;
19
20 /*
21  * contact page link
22  */
23 echo $this->footerLink(array(
24         'action'     => 'index',
25         'controller' => 'contact',
26         'route' => 'contact'),
27     $this->translate("contact"),
28     isset($this->redirectLinks) ? $this->redirectLinks : true);
29
30 /*
31  * account link
32  */
33 if ($this->loginform or $this->loggedUser) {
34     echo $this->footerLink(array(
35             'route' => 'account',
36             'action'     => 'index',
37             'controller' => 'account'),
38         $this->translate("my account"), true,
39         'logged-show logged-pseudo',
40         $this->loggedUser ?  " ({$this->loggedUser->pseudo})": " (%s)"
41         );
42 }
43
44 /*
45  * list link
46  */
47 if ($this->loginform or $this->loggedUser) {
48     echo $this->footerLink(array(
49             'route' => 'list',
50             'action'     => 'index',
51             'controller' => 'list'),
52         $this->translate("my routes"), false,
53         'logged-show');
54 }
55
56 /*
57  * login or logout links
58  */
59 if (!$this->loginform) {
60     if ($this->loggedUser) {
61
62         echo $this->footerLink(array(
63             'route' => 'logout',
64             'action'     => 'logout',
65             'controller' => 'login'),
66         $this->translate("logout"),
67         false);
68     } else {
69         echo $this->footerLink(array(
70             'route' => 'login',
71             'action'     => 'login',
72             'controller' => 'login'),
73         $this->translate("login"),
74         isset($this->redirectLinks) ? $this->redirectLinks : true
75         );
76     }
77 }
78
79 /*
80  * termsofuse
81  */
82 echo $this->footerLink(array(
83     'route' => 'termsofuse',
84     'action'     => 'index',
85     'controller' => 'termsofuse'),
86     $this->translate("terms of use"),
87     false);
88
89 /*
90  * faq
91  */
92 echo $this->footerLink(array(
93     'route' => 'faq',
94     'action'     => 'index',
95     'controller' => 'faq'),
96     $this->translate("help"),
97     false);
98
99 echo '</footer>' . PHP_EOL;
100
101 ?>