summaryrefslogtreecommitdiff
path: root/app/frontend/controls/HeaderMenu.tpl
blob: 265d29ef5c1e23d7548d463846b2d5622045b2b9 (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
29
30
31
32
33
34
35
36
37
38
39
40
<nav role="navigation">
  <com:THyperLink>
    <prop:Text><%[ Home ]%></prop:Text>
    <prop:NavigateUrl><%= $this->Service->constructUrl(NULL) %></prop:NavigateUrl>
  </com:THyperLink>
  <com:TActiveLinkButton OnCommand="loginUser">
    <prop:Text><%[ Login ]%></prop:Text>
    <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>
    <prop:Text><%[ Profile ]%></prop:Text>
    <prop:NavigateUrl><%= $this->Service->constructUrl('Profile') %></prop:NavigateUrl>
    <prop:Visible><%= !$this->User->IsGuest %></prop:Visible>
  </com:THyperLink>
  <com:THyperLink>
    <prop:Text><%[ Calendar list ]%></prop:Text>
    <prop:NavigateUrl><%= $this->Service->constructUrl('Select') %></prop:NavigateUrl>
  </com:THyperLink>
  <com:TActiveLinkButton OnCommand="logoutUser">
    <com:TTranslate>
      Logout ({name})
      <com:TTranslateParameter Key="name"><%= $this->User->Name %></com:TTranslateParameter>
    </com:TTranslate>
    <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>
    <prop:Text><%[ New user ]%></prop:Text>
    <prop:NavigateUrl><%= $this->Service->constructUrl('Signup') %></prop:NavigateUrl>
    <prop:Visible><%= $this->User->getIsAdmin() %></prop:Visible>
  </com:THyperLink>
  <com:THyperLink>
    <prop:Text><%[ Admin calendars ]%></prop:Text>
    <prop:NavigateUrl><%= $this->Service->constructUrl('Admin') %></prop:NavigateUrl>
    <prop:Visible><%= $this->User->getIsAdmin() %></prop:Visible>
  </com:THyperLink>
</nav>