navigation.tpl 6.28 KB
Newer Older
Naomi Guyer's avatar
Naomi Guyer committed
1
{if $MAINNAV}
Naomi Guyer's avatar
Naomi Guyer committed
2

Pat Kira's avatar
Pat Kira committed
3
4
5
    <nav id="main-nav" class="{if $ADMIN || $INSTITUTIONALADMIN || $STAFF || $INSTITUTIONALSTAFF}{if $DROPDOWNMENU}dropdown-adminnav {else}adminnav {/if}{/if} nav collapse navbar-collapse nav-main main-nav navbar-inverse">
       <div class="container">
           {if $ADMIN || $INSTITUTIONALADMIN || $STAFF || $INSTITUTIONALSTAFF}
Naomi Guyer's avatar
Naomi Guyer committed
6
                <div class="navbar-header">
Naomi Guyer's avatar
Naomi Guyer committed
7
                    <a class="navbar-brand" href="{$WWWROOT}" accesskey="h" class="return-site">
8
                        <span class="fa fa-chevron-left"></span>
Naomi Guyer's avatar
Naomi Guyer committed
9
10
                        {str tag="returntosite"}
                    </a>
Naomi Guyer's avatar
Naomi Guyer committed
11
                </div>
Pat Kira's avatar
Pat Kira committed
12
13
            {/if}
            <ul id="{if $DROPDOWNMENU}dropdown-nav{else}nav{/if}" class="nav navbar-nav">
Naomi Guyer's avatar
Naomi Guyer committed
14

Pat Kira's avatar
Pat Kira committed
15
16

            {strip}
Naomi Guyer's avatar
Naomi Guyer committed
17
                {foreach from=$MAINNAV item=item name=menu}
Pat Kira's avatar
Pat Kira committed
18
19
20
21
                    <li class="{if $item.path}{$item.path}{else}dashboard{/if}{if $item.selected} active{/if}{if $DROPDOWNMENU} dropdown-nav-home{/if}">
                            <a href="{$WWWROOT}{$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">
Naomi Guyer's avatar
Naomi Guyer committed
22
                                {/if}
Pat Kira's avatar
Pat Kira committed
23
24
25
                                {$item.title}
                                {if $item.accessibletitle && !$DROPDOWNMENU}
                                    </span>
Naomi Guyer's avatar
Naomi Guyer committed
26
                                    <span class="accessible-hidden sr-only">
Pat Kira's avatar
Pat Kira committed
27
28
29
30
                                        ({$item.accessibletitle})
                                    </span>
                                {/if}
                                {if $DROPDOWNMENU && $item.submenu}
Naomi Guyer's avatar
Naomi Guyer committed
31
                                    <span class="accessible-hidden sr-only">
Pat Kira's avatar
Pat Kira committed
32
33
34
                                        ({str tag=dropdownmenu})
                                    </span>
                                {/if}
Naomi Guyer's avatar
Naomi Guyer committed
35

Pat Kira's avatar
Pat Kira committed
36
37
                            </a>
                            {if $item.submenu}
Naomi Guyer's avatar
Naomi Guyer committed
38
                                <button type="button" class="navbar-showchildren navbar-toggle dropdown-toggle {if !$item.selected}collapsed{/if}" data-toggle="collapse" data-target="#childmenu-{$dwoo.foreach.menu.index}">
39
                                    <span class="fa fa-chevron-down"></span>
Naomi Guyer's avatar
Naomi Guyer committed
40
41
42
43
                                    <span class="nav-title sr-only">{str tag="show"} {str tag="menu"}</span>
                                </button>
                            {/if}
                            {if $item.submenu}
Pat Kira's avatar
Pat Kira committed
44
                                <ul id="childmenu-{$dwoo.foreach.menu.index}" class="{if $DROPDOWNMENU}has-dropdown{else}hidden-md hidden-lg hidden-sm {if $item.selected}in{/if}{/if} collapse child-nav" role="menu">
Pat Kira's avatar
Pat Kira committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
                                    {strip}
                                        {foreach from=$item.submenu item=subitem}
                                            <li class="{if $subitem.selected}active {/if}{if $subitem.submenu}has-sub {/if}">
                                                <a href="{$WWWROOT}{$subitem.url}"{if $subitem.accesskey} accesskey="{$subitem.accesskey}"{/if}>
                                                    {$subitem.title}
                                                </a>
                                                {if $subitem.submenu}
                                                <ul class="dropdown-tertiary">
                                                    {foreach from=$subitem.submenu item=tertiaryitem}
                                                        <li{if $tertiaryitem.selected} class="selected"{/if}>
                                                            <a href="{$WWWROOT}{$tertiaryitem.url}"{if $tertiaryitem.accesskey} accesskey="{$tertiaryitem.accesskey}"{/if}>
                                                                {$tertiaryitem.title}
                                                            </a>
                                                        </li>
                                                    {/foreach}
                                                </ul>
                                                {/if}
                                            </li>
                                        {/foreach}
                                    {/strip}
                                </ul>
Naomi Guyer's avatar
Naomi Guyer committed
66
                            {/if}
Pat Kira's avatar
Pat Kira committed
67
68
                    </li>
                {/foreach}
Naomi Guyer's avatar
Naomi Guyer committed
69

Pat Kira's avatar
Pat Kira committed
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
                {if $ADMIN || $INSTITUTIONALADMIN || $STAFF || $INSTITUTIONALSTAFF}
                {elseif $USER->get('admin')}
                    <li class="siteadmin">
                        <a href="{$WWWROOT}admin/" accesskey="a" class="admin-site">{str tag="administration"}</a>
                    </li>
                {elseif $USER->is_institutional_admin()}
                    <li class="instituteadmin">
                        <a href="{$WWWROOT}admin/users/search.php" accesskey="a" class="admin-user">{str tag="administration"}</a>
                    </li>
                {elseif $USER->get('staff')}
                    <li class="siteinfo">
                        <a href="{$WWWROOT}admin/users/search.php" accesskey="a" class="admin-user">{str tag="siteinformation"}</a>
                    </li>
                {elseif $USER->is_institutional_staff()}
                    <li class="instituteinfo">
                        <a href="{$WWWROOT}admin/users/search.php" accesskey="a" class="admin-user">{str tag="institutioninformation"}</a>
                    </li>
                {/if}
            {/strip}
            </ul>
Naomi Guyer's avatar
Naomi Guyer committed
90
91
92
93
94
        </div>
    </nav>

    {if $DROPDOWNMENU}
    {else}
Pat Kira's avatar
Pat Kira committed
95
96
97

        {if $SELECTEDSUBNAV}

Pat Kira's avatar
Pat Kira committed
98
        <div class="navbar navbar-default minor-nav hidden-xs">
Pat Kira's avatar
Pat Kira committed
99
100
            <div class="container">
                <ul class="nav navbar-nav">
Naomi Guyer's avatar
Naomi Guyer committed
101
102
103
104
105
106
107
108
                {strip}
                    {foreach from=$SELECTEDSUBNAV item=item}
                        <li{if $item.selected} class="active"{/if}>
                            <a href="{$WWWROOT}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if}>{$item.title}</a>
                        </li>
                    {/foreach}
                {/strip}
                </ul>
Pat Kira's avatar
Pat Kira committed
109
110
111
            </div>
        </div>
        {/if}
Naomi Guyer's avatar
Naomi Guyer committed
112
    {/if}
Pat Kira's avatar
Pat Kira committed
113

Naomi Guyer's avatar
Naomi Guyer committed
114
{/if}