summaryrefslogtreecommitdiff
path: root/app/php/controls/HeaderMenu.tpl
blob: c475a23cb96268e00edb17435b751e0c7e544781 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<nav role="navigation">
  <com:TActiveLinkButton Text="Login" OnCommand="loginUser">
    <prop:Visible><%= $this->User->IsGuest %></prop:Visible>
    <prop:ClientSide.OnFailure>window.location.replace('<%= $this->Service->constructUrl('Login') %>')</prop:ClientSide.OnFailure>
    <prop:ClientSide.OnException>window.location.replace('<%= $this->Service->constructUrl('Login') %>')</prop:ClientSide.OnException>
  </com:TActiveLinkButton>
  <com:THyperLink Text="Profile">
    <prop:NavigateUrl><%= $this->Service->constructUrl('Profile') %></prop:NavigateUrl>
    <prop:Visible><%= !$this->User->IsGuest %></prop:Visible>
  </com:THyperLink>
  <com:TActiveLinkButton OnCommand="logoutUser">
    <prop:Text>Logout (<%= $this->User->Name %>)</prop:Text>
    <prop:Visible><%= !$this->User->IsGuest %></prop:Visible>
  </com:TActiveLinkButton>
  <com:THyperLink Text="New user">
    <prop:NavigateUrl><%= $this->Service->constructUrl('Signup') %></prop:NavigateUrl>
    <prop:Visible><%= $this->User->getIsAdmin() %></prop:Visible>
  </com:THyperLink>
  <com:THyperLink Text="Admin calendars">
    <prop:NavigateUrl><%= $this->Service->constructUrl('Admin') %></prop:NavigateUrl>
    <prop:Visible><%= $this->User->getIsAdmin() %></prop:Visible>
  </com:THyperLink>
</nav>