'decorators' => array(
'ViewHelper',
'label',
- array('HtmlTag', array('tag' => 'div', 'id' => 'geom_accept_container')))));
+ array('HtmlTag', array('tag' => 'div', 'id' => 'geom_accept_container', 'class' => 'logged-hide')))));
$submit = array('Submit', 'geom_submit', array('label' => __("save")));
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');
+}
+
+/*
+ * 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',
class Syj_View_Helper_FooterLink extends Zend_View_Helper_Abstract
{
- public function FooterLink($routeoptions, $text, $redirect=true) {
+ public function FooterLink($routeoptions, $text, $redirect=true, $extraclass=null) {
$page = new Zend_Navigation_Page_Mvc($routeoptions);
if ($page->isActive()) {
$link = $this->view->escape($text);
}
$link = $this->view->anchor($href, $text, array('class' => 'footer-anchor'));
}
- return '<div class="footer-link">' . $link . '</div>' . PHP_EOL;
+ $class = "footer-link";
+ if (isset($extraclass)) {
+ $class = "$class $extraclass";
+ }
+ return '<div class="' . $class . '">' . $link . '</div>' . PHP_EOL;
}
}
}
if (this.logged) {
this.controlsdeck.setIndex(1);
- $("geom_accept_container").hide();
+ $$(".logged-hide").invoke('hide');
+ $$(".logged-show").invoke('show');
} else {
this.controlsdeck.setIndex(0);
- $("geom_accept_container").show();
+ $$(".logged-hide").invoke('show');
+ $$(".logged-show").invoke('hide');
}
if (this.iscreator) {