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