navigation.tpl 4.67 KB
Newer Older
Evonne Cheung's avatar
Evonne Cheung committed
1
2
3

{if $MAINNAV}
        <div id="main-nav" class="{if $ADMIN || $INSTITUTIONALADMIN || $STAFF || $INSTITUTIONALSTAFF}{if $DROPDOWNMENU}dropdown-adminnav {else}adminnav {/if}{/if}main-nav">
4
            <h3 class="rd-nav-title"><a href="#">{if $ADMIN || $INSTITUTIONALADMIN || $STAFF || $INSTITUTIONALSTAFF}{str tag=admin} {/if}{str tag=menu}<span class="rd-arrow"></span></a></h3>
Evonne Cheung's avatar
Evonne Cheung committed
5
6
7
            <ul id="{if $DROPDOWNMENU}dropdown-nav{else}nav{/if}">
{strip}
{foreach from=$MAINNAV item=item}
8
                <li class="{if $item.path}{$item.path}{else}dashboard{/if}{if $item.selected} selected{/if}{if $DROPDOWNMENU} dropdown-nav-home{/if}"><span><a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if} class="{if $item.path}{$item.path}{else}dashboard{/if}">{if $item.accessibletitle && !$DROPDOWNMENU}<span aria-hidden="true" role="presentation">{/if}{$item.title}{if $item.accessibletitle && !$DROPDOWNMENU}</span> <span class="accessible-hidden">({$item.accessibletitle})</span>{/if}{if $DROPDOWNMENU && $item.submenu} <span class="accessible-hidden">({str tag=dropdownmenu})</span>{/if}</a></span>
Evonne Cheung's avatar
Evonne Cheung committed
9
10
11
12
{if $item.submenu}
                    <ul class="{if $DROPDOWNMENU}dropdown-sub {/if}rd-subnav">
{strip}
{foreach from=$item.submenu item=subitem}
13
                        <li class="{if $subitem.selected}selected {/if}{if $subitem.submenu}has-sub {/if}"><span>
14
                            <a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$subitem.url}"{if $subitem.accesskey} accesskey="{$subitem.accesskey}"{/if}>{$subitem.title}</a>
15
16
17
18
19
                        </span>
                        {if $subitem.submenu}
                            <ul class="dropdown-tertiary">
                            {foreach from=$subitem.submenu item=tertiaryitem}
                                <li{if $tertiaryitem.selected} class="selected"{/if}><span>
20
                                    <a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$tertiaryitem.url}"{if $tertiaryitem.accesskey} accesskey="{$tertiaryitem.accesskey}"{/if}>{$tertiaryitem.title}</a>
21
22
23
24
25
                                </span></li>
                            {/foreach}
                            </ul>
                        {/if}
                        </li>
Evonne Cheung's avatar
Evonne Cheung committed
26
27
28
29
30
31
32
33
34
{/foreach}
{/strip}
                                        <div class="cl"></div>
                    </ul>
{/if}
                </li>
{/foreach}
{if $ADMIN || $INSTITUTIONALADMIN || $STAFF || $INSTITUTIONALSTAFF}
                <li class="returntosite"><span><a href="{$WWWROOT}" accesskey="h" class="return-site">{str tag="returntosite"}</a></span></li>
35
{elseif $USER->get('admin')}
36
                <li class="siteadmin"><span><a href="{$WWWROOT}admin/" accesskey="a" class="admin-site">{str tag="administration"}</a></span></li>
37
{elseif $USER->is_institutional_admin()}
38
                <li class="instituteadmin"><span><a href="{$WWWROOT}admin/users/search.php" accesskey="a" class="admin-user">{str tag="administration"}</a></span></li>
Evonne Cheung's avatar
Evonne Cheung committed
39
40
41
42
43
44
45
46
47
48
49
50
51
{elseif $USER->get('staff')}
                <li class="siteinfo"><span><a href="{$WWWROOT}admin/users/search.php" accesskey="a" class="admin-user">{str tag="siteinformation"}</a></span></li>
{elseif $USER->is_institutional_staff()}
                <li class="instituteinfo"><span><a href="{$WWWROOT}admin/users/search.php" accesskey="a" class="admin-user">{str tag="institutioninformation"}</a></span></li>
{/if}
            {/strip}</ul>
        </div>
{if $DROPDOWNMENU}
{else}
        <div id="sub-nav">
{if $SELECTEDSUBNAV}
            <ul>{strip}
{foreach from=$SELECTEDSUBNAV item=item}
52
               <li{if $item.selected} class="selected"{/if}><span><a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if}>{$item.title}</a></span>
53
54
55
56
               {if $item.submenu && $item.selected}
               {assign var=tertiarymenu value=$item.submenu}
               {/if}
               </li>
Evonne Cheung's avatar
Evonne Cheung committed
57
58
59
60
{/foreach}
            {/strip}</ul>
{/if}
            <div class="cb"></div>
61
62
63
64
65
66
            </div>
            {if $tertiarymenu}
                <div id="tertiary-nav">
                   <ul>{strip}
                   {foreach from=$tertiarymenu item=tertiaryitem}
                       <li{if $tertiaryitem.selected} class="selected"{/if}><span>
67
                           <a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$tertiaryitem.url}"{if $tertiaryitem.accesskey} accesskey="{$tertiaryitem.accesskey}"{/if}>{$tertiaryitem.title}</a>
68
69
70
71
72
73
                       </span></li>
                   {/foreach}
                   {/strip}</ul>
            <div class="cb"></div>
            </div>
           {/if}
Evonne Cheung's avatar
Evonne Cheung committed
74
75
{/if}
{/if}