]> dev.renevier.net Git - syj.git/blob - application/layouts/scripts/footer.phtml
interface to manage list of created routes
[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');
41 }
42
43 /*
44  * list link
45  */
46 if ($mainpage or $this->loggedUser) {
47     echo $this->footerLink(array(
48             'route' => 'list',
49             'action'     => 'index',
50             'controller' => 'list'),
51         $this->translate("my routes"), false,
52         'logged-show');
53 }
54
55 /*
56  * login or logout links
57  */
58 if (!$mainpage) {
59     if ($this->loggedUser) {
60
61         echo $this->footerLink(array(
62             'route' => 'logout',
63             'action'     => 'logout',
64             'controller' => 'login'),
65         $this->translate("logout"),
66         false);
67     } else {
68         echo $this->footerLink(array(
69             'route' => 'login',
70             'action'     => 'login',
71             'controller' => 'login'),
72         $this->translate("login"),
73         isset($this->redirectLinks) ? $this->redirectLinks : true
74         );
75     }
76 }
77
78 /*
79  * termsofuse
80  */
81 echo $this->footerLink(array(
82     'route' => 'termsofuse',
83     'action'     => 'index',
84     'controller' => 'termsofuse'),
85     $this->translate("terms of use"),
86     false);
87
88 echo '</div>' . PHP_EOL;
89
90 ?>