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