$mainpage = false;
}
-$content = $this->translate("main page");
+$content = $this->translate("create a route");
$link = ($mainpage) ? $this->escape($content) : $this->anchor($this->baseUrl(), $content, array('class' => 'footer-anchor'));
echo '<div class="footer-link">' . $link . '</div>' . PHP_EOL;
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',