header.tpl 10.2 KB
Newer Older
Naomi Guyer's avatar
Naomi Guyer committed
1 2 3 4 5
<!doctype html>
<!--[if IE 8 ]><html{if $LANGDIRECTION == 'rtl'} dir="rtl"{/if} lang="{$LANGUAGE}" class="ie ie8"><![endif]-->
<!--[if IE 9 ]><html{if $LANGDIRECTION == 'rtl'} dir="rtl"{/if} lang="{$LANGUAGE}" class="ie ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html{if $LANGDIRECTION == 'rtl'} dir="rtl"{/if} lang="{$LANGUAGE}"><!--<![endif]-->
{include file="header/head.tpl"}
6
<body data-usethemedjs="true" class="no-js {if $ADMIN || $INSTITUTIONALADMIN || $STAFF || $INSTITUTIONALSTAFF}admin{/if} {if $loggedout}loggedout{/if} {if $pagename}{$pagename}{/if} {$presentation|default:'window'}">
7
    <div class="skiplink btn-group btn-group-top">
8
        <a class="sr-only sr-only-focusable btn btn-secondary" {if $headertype=='page'}href="#header-content"{else}href="#main"{/if}>{str tag=skipmenu}</a>
9
    </div>
Naomi Guyer's avatar
Naomi Guyer committed
10

Pat Kira's avatar
Pat Kira committed
11
    {if $USERMASQUERADING || !$PRODUCTIONMODE || $SITECLOSED || $SITETOP}
Evonne's avatar
Evonne committed
12
        <div class="site-messages">
Pat Kira's avatar
Pat Kira committed
13 14 15
    {/if}

        {if $USERMASQUERADING}
16
            <div class="site-message alert alert-warning" role="alert">
Evonne's avatar
Evonne committed
17 18 19 20
                <div class="container">
                    <span>{$masqueradedetails}</span>
                    <a href="{$becomeyoulink}">{$becomeyouagain}</a>
                </div>
21
            </div>
Pat Kira's avatar
Pat Kira committed
22 23
        {/if}
        {if !$PRODUCTIONMODE}
24
            <div class="site-message alert alert-info" role="alert">
Evonne's avatar
Evonne committed
25 26 27
                <div class="container">
                    {str tag=notproductionsite section=error}
                </div>
28
            </div>
Pat Kira's avatar
Pat Kira committed
29
        {/if}
30 31 32 33 34
        {if $SITEOUTOFSYNC}
            <div class="site-message alert alert-warning" role="alert">
                {str tag=siteoutofsyncfor section=error arg1=$SITEOUTOFSYNC}
            </div>
        {/if}
Pat Kira's avatar
Pat Kira committed
35
        {if $SITECLOSED}
36 37 38
            <div class="site-message alert alert-danger" role="alert">
                {if $SITECLOSED == 'logindisabled'}{str tag=siteclosedlogindisabled section=mahara arg1="`$WWWROOT`admin/upgrade.php"}{else}{str tag=siteclosed}{/if}
            </div>
Pat Kira's avatar
Pat Kira committed
39 40 41 42 43 44 45 46
        {/if}
        {if $SITETOP}
            <div id="switchwrap">{$SITETOP|safe}</div>
        {/if}

    {if $USERMASQUERADING || !$PRODUCTIONMODE || $SITECLOSED || $SITETOP}
        </div>
    {/if}
47

Liam's avatar
Liam committed
48
    <header class="header fixed-top no-site-messages">
49 50
        <div class="navbar navbar-default navbar-main">
            <div class="container">
51
                <div id="logo-area" class="logo-area">
52 53
                    <a href="{$WWWROOT}" class="logo {if $sitelogocustomsmall || (!$sitelogocustomsmall && !$sitelogocustom)}change-to-small{/if}">
                        <img src="{$sitelogo}" alt="{$sitename}" data-customlogo="{$sitelogocustom}" >
54
                    </a>
55
                    {if $sitelogocustomsmall}
56
                        <a href="{$WWWROOT}" class="logoxs">
57 58 59 60 61
                            <img src="{$sitelogocustomsmall}" alt="{$sitename}">
                        </a>
                    {/if}
                    {if !$sitelogocustom && !$sitelogocustomsmall}
                        <a href="{$WWWROOT}" class="logoxs change-to-small-default">
62 63 64 65 66
                            <img src="{$sitelogosmall}" alt="{$sitename}">
                        </a>
                    {/if}
                    {if $ADMIN || $INSTITUTIONALADMIN || $STAFF || $INSTITUTIONALSTAFF}
                        <div class="admin-title">
67
                            <a href="{$WWWROOT}admin/" class="admin-site">{str tag="administration"}</a>
68 69
                        </div>
                    {/if}
70
                    <div id="loading-box" class="loading-box d-none"></div>
71
                </div>
72 73
                    <div class="nav-toggle-area">
                        {if $MAINNAV}
74
                            <button class="main-nav-toggle navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".nav-main" aria-expanded="false" aria-controls="main-nav" title='{str tag="mainmenu"}'>
75 76 77 78 79
                                <span class="sr-only">{str tag="showmainmenu"}</span>
                                <span class="icon icon-bars icon-lg" role="presentation" aria-hidden="true"></span>
                            </button>
                        {/if}
                        {if $MAINNAVADMIN}
80
                            <button class="admin-toggle navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".nav-main-admin" aria-expanded="false" aria-controls="main-nav-admin" title='{str tag="adminmenu"}'>
81 82 83 84 85
                                <span class="sr-only">{str tag="showadminmenu"}</span>
                                <span class="icon icon-wrench icon-large" role="presentation" aria-hidden="true"></span>
                            </button>
                        {/if}
                        {if $LOGGEDIN}
86
                            <a href="{profile_url($USER)}" class="user-icon user-icon-25" title='{str tag="profilepage"}'>
87
                                <img src="{profile_icon_url user=$USER maxheight=25 maxwidth=25}" alt="{str tag=profileimagefor section=artefact.internal arg1=display_name($USER->get('id'))}">
88
                            </a>
89
                            <button class="user-toggle navbar-toggle" type="button" data-toggle="collapse" data-target=".nav-main-user" aria-expanded="false" aria-controls="main-nav-user" title='{str tag="usermenu"}'>
90 91 92 93
                                <span class="sr-only">{str tag="showusermenu"}</span>
                                <span class="icon icon-chevron-down collapsed"></span>
                            </button>
                        {/if}
94 95
                        {if $MESSAGEBOX}
                            {foreach from=$MESSAGEBOX item=item}
96 97 98 99
                            <a href="{$WWWROOT}{$item.url}" title="{$item.alt}" role="button" id="nav-{$item.path}" class="navbar-toggle navbar-messages collapsed">
                                <span class="sr-only">{$item.title} <span class="{$item.countclasssr}">{$item.unread}</span></span>
                                <span class="icon icon-{$item.iconclass} icon-lg" role="presentation" aria-hidden="true"></span>
                                {if $item.count}
100 101 102
                                    <span class="navbar-messages-count">
                                        <span class="{$item.countclass}">{$item.count}</span>
                                    </span>
103
                                {/if}
104 105 106
                            </a>
                            {/foreach}
                        {/if}
107 108
                        <!-- HIDE WHEN ON DESKTOP -->
                        {if !$nosearch && ($LOGGEDIN || $publicsearchallowed)}
109
                        <button class="search-toggle navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".navbar-form" aria-expanded="false" aria-controls="usf">
110 111
                            <span class="icon icon-search icon-lg" role="presentation" aria-hidden="true"></span>
                            <span class="nav-title sr-only">{str tag="showsearch"}</span>
112
                        </button>
113 114
                        {/if}
                    </div>
115

116 117
                    {include file="header/topright.tpl"}
                    {include file="header/navigation.tpl"}
118
            </div>
Naomi Guyer's avatar
Naomi Guyer committed
119 120 121
        </div>
    </header>

122 123
    {if $headertype == "page"}
        {include file="header/pageheader.tpl"}
124
    {elseif $headertype == "profile"}
125
        {include file="header/profileheader.tpl"}
126
    {elseif $headertype == "matrix"}
127 128 129
        {include file="header/matrixheader.tpl"}
    {/if}

130
    <div class="container main-content">
Naomi Guyer's avatar
Naomi Guyer committed
131
        <div class="row">
132
            <main id="main" class="{if $SIDEBARS}{if $SIDEBLOCKS.right}col-lg-9 {else}col-lg-9 order-md-2 {/if}{else}col-md-12{/if} main">
Pat Kira's avatar
Pat Kira committed
133
                <div id="content" class="main-column{if $selected == 'content'} editcontent{/if}">
Pat Kira's avatar
Pat Kira committed
134
                    <div id="main-column-container">
Naomi Guyer's avatar
Naomi Guyer committed
135

Naomi Guyer's avatar
Naomi Guyer committed
136
                        {if $SUBPAGENAV || $sectiontabs}
137
                        {assign $SUBPAGENAV item}
138
                        <div class="arrow-bar {$item.subnav.class}">
139
                            <span class="arrow d-none d-md-block">
140
                                <span class="text">
141 142 143 144 145
                                {if isset($PAGEHEADINGARROW)}
                                    {$PAGEHEADINGARROW}
                                {elseif isset($PAGEHEADING)}
                                    {$PAGEHEADING}
                                {/if}
146
                                </span>
147
                            </span>
148
                            <div class="right-text">
149
                                {include file="inpagenav.tpl"}
150
                            </div>
151
                        </div>
152
                        {/if}
Pat Kira's avatar
Pat Kira committed
153

154
                        {dynamic}{$messages.messages|safe}{/dynamic}
155
                        {if $institutionselector}
156
                            <div class="institutionselector">
157
                            {$institutionselector|safe}
Naomi Guyer's avatar
Naomi Guyer committed
158
                            </div>
159 160
                        {/if}

161
                        {if isset($PAGEHEADING)}
162
                            <h1 class="{$headingclass}">
163 164
                                {if isset($pageicon)}
                                <span class="{$pageicon}"></span>
165
                                {/if}
166
                                {if $SUBSECTIONHEADING}
167
                                <span class="section-heading">
168
                                    {$SUBSECTIONHEADING}
169 170 171
                                </span>
                                {/if}
                                <span class="section-heading">
172
                                    {if $SUBSECTIONHEADING}| {/if}{$PAGEHEADING}
173
                                </span>
174
                                {if $PAGEHELPNAME}<span class="page-help-icon">{$PAGEHELPICON|safe}</span>{/if}
175
                                {if $publicgroup && $rsswithtitle}
Liam's avatar
Liam committed
176
                                <a href="{$feedlink}" class="mahara-rss-icon text-small float-right " role="presentation" aria-hidden="true">
177
                                    <span class="icon-rss icon icon-lg" role="presentation" aria-hidden="true"></span>
178 179
                                </a>
                                {/if}
180
                            </h1>
Pat Kira's avatar
Pat Kira committed
181
                        {/if}
Naomi Guyer's avatar
Naomi Guyer committed
182

183 184 185
                        {if $SUBPAGETOP}
                            {include file=$SUBPAGETOP}
                        {/if}