<?php

    $this->placeholder("connected-menu")->captureStart();



    if (\Website\Model\Auth::isLogged())

        if (\Website\Model\Auth::CurrentAgencyUid() != ''){

            $agency = \Website\Model\Agency::getByUid(\Website\Model\Auth::CurrentAgencyUid());

            $token = $agency->getDashboard_token();

            $secret = $agency->getSeerus_secret();

        }

?>



<li><?php if ($this->editmode) echo 'Mon Espace'; echo $this->link("my-space"); ?>

    <ul>

                                                                                     <li><?php if($this->editmode) echo 'change password';  echo $this->link("change-password");  ?></li>

        <?php if(0 && (\Website\Model\Auth::CurrentAgencyUid() || $this->editmode)) {?>     <li><?php if($this->editmode) echo 'Mon agence' ;      echo $this->link("mon-agence");       ?></li><?php }?>

        <?php if((!\Website\Model\Auth::CurrentAgencyUid() || $this->editmode)) {?>    <li><?php if($this->editmode) echo 'Create agence';    echo $this->link("link-agence");      ?></li><?php }?>

        <?php if(0 && ($secret || $this->editmode)) {?>                                     <li><?php if($this->editmode) echo 'Envoi Enquete' ;   echo $this->link("envoi-enquete");    ?></li><?php }?>

        <?php if($token || $this->editmode) {?>                                      <li><?php if($this->editmode) echo 'Dashboard' ;       echo $this->link("seerus_dashboard"); ?></li><?php }?>

                                                                                     <li><?php if($this->editmode) echo 'Logout';           echo $this->link("logout");           ?></li>

    </ul>

</li>



<?php $this->placeholder("connected-menu")->captureEnd();

