summaryrefslogtreecommitdiff
path: root/app/php/controls/HeaderMenu.tpl
blob: a7e666d40cc405005e42f4fdc1743a664b159ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<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:THyperLink Text="Calendar list">
    <prop:NavigateUrl><%= $this->Service->constructUrl('Select') %></prop:NavigateUrl>
  </com:THyperLink>
  <com:TActiveLinkButton OnCommand="logoutUser">
    <prop:Text>Logout (<%= $this->User->Name %>)</prop:Text>
    <prop:Visible><%= !$this->User->IsGuest %></prop:Visible>
    <prop:ClientSide.OnFailure>window.location.reload()</prop:ClientSide.OnFailure>
    <prop:ClientSide.OnException>window.location.reload()</prop:ClientSide.OnException>
  </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>