forked from pkp/pkp-lib
/
header.tpl
144 lines (127 loc) · 5.51 KB
/
header.tpl
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!-- templates/common/header.tpl -->
{**
* header.tpl
*
* Copyright (c) 2000-2010 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Common site header.
*}
{strip}
{if !$pageTitleTranslated}{translate|assign:"pageTitleTranslated" key=$pageTitle}{/if}
{if $pageCrumbTitle}
{translate|assign:"pageCrumbTitleTranslated" key=$pageCrumbTitle}
{elseif !$pageCrumbTitleTranslated}
{assign var="pageCrumbTitleTranslated" value=$pageTitleTranslated}
{/if}
{/strip}<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$defaultCharset|escape}" />
<title>{$pageTitleTranslated}</title>
<meta name="description" content="{$metaSearchDescription|escape}" />
<meta name="keywords" content="{$metaSearchKeywords|escape}" />
<meta name="generator" content="{$applicationName} {$currentVersionString|escape}" />
{$metaCustomHeaders}
{if $displayFavicon}<link rel="icon" href="{$faviconDir}/{$displayFavicon.uploadName|escape:"url"}" />{/if}
<link rel="stylesheet" href="{$baseUrl}/lib/pkp/styles/common.css" type="text/css" />
<link rel="stylesheet" href="{$baseUrl}/styles/common.css" type="text/css" />
<!-- Base Jquery -->
{if $allowCDN}<script src="http://www.google.com/jsapi"></script>
<script>
google.load("jquery", "{$smarty.const.CDN_JQUERY_VERSION}");
google.load("jqueryui", "{$smarty.const.CDN_JQUERY_UI_VERSION}");
</script>
{else}
<script type="text/javascript" src="{$baseUrl}/lib/pkp/js/lib/jquery/jquery.min.js"></script>
<script type="text/javascript" src="{$baseUrl}/lib/pkp/js/lib/jquery/plugins/jqueryUi.min.js"></script>
{/if}
{call_hook|assign:"leftSidebarCode" name="Templates::Common::LeftSidebar"}
{call_hook|assign:"rightSidebarCode" name="Templates::Common::RightSidebar"}
{if $leftSidebarCode || $rightSidebarCode}<link rel="stylesheet" href="{$baseUrl}/styles/sidebar.css" type="text/css" />{/if}
{if $leftSidebarCode}<link rel="stylesheet" href="{$baseUrl}/styles/leftSidebar.css" type="text/css" />{/if}
{if $rightSidebarCode}<link rel="stylesheet" href="{$baseUrl}/styles/rightSidebar.css" type="text/css" />{/if}
{if $leftSidebarCode && $rightSidebarCode}<link rel="stylesheet" href="{$baseUrl}/styles/bothSidebars.css" type="text/css" />{/if}
{foreach from=$stylesheets item=cssUrl}
<link rel="stylesheet" href="{$cssUrl}" type="text/css" />
{/foreach}
<script type="text/javascript" src="{$baseUrl}/lib/pkp/js/general.js"></script>
<script type="text/javascript" src="{$baseUrl}/lib/pkp/js/tag-it.js"></script>
<!-- Add javascript required for font sizer -->
<script type="text/javascript" src="{$baseUrl}/lib/pkp/js/jquery.cookie.js"></script>
<script type="text/javascript" src="{$baseUrl}/lib/pkp/js/fontController.js" ></script>
<script type="text/javascript">{literal}
$(function(){
fontSize("#sizer", "body", 9, 16, 32, "{/literal}{$baseUrl}{literal}"); // Initialize the font sizer
});
{/literal}</script>
<script type="text/javascript">
// initialise plugins
{literal}
$(function(){
{/literal}{if $validateId}{literal}
jqueryValidatorI18n("{/literal}{$baseUrl}{literal}", "{/literal}{$currentLocale}{literal}"); // include the appropriate validation localization
$("form[name={/literal}{$validateId}{literal}]").validate({
errorClass: "error",
highlight: function(element, errorClass) {
$(element).parent().parent().addClass(errorClass);
},
unhighlight: function(element, errorClass) {
$(element).parent().parent().removeClass(errorClass);
}
});
{/literal}{/if}{literal}
});
{/literal}
</script>
{$additionalHeadData}
</head>
<body>
<div id="container">
<div id="header">
<div id="headerTitle">
<h1>
{if $displayPageHeaderLogo && is_array($displayPageHeaderLogo)}
<img src="{$publicFilesDir}/{$displayPageHeaderLogo.uploadName|escape:"url"}" width="{$displayPageHeaderLogo.width|escape}" height="{$displayPageHeaderLogo.height|escape}" {if $displayPageHeaderLogoAltText != ''}alt="{$displayPageHeaderLogoAltText|escape}"{else}alt="{translate key="common.pageHeaderLogo.altText"}"{/if} />
{/if}
{if $displayPageHeaderTitle && is_array($displayPageHeaderTitle)}
<img src="{$publicFilesDir}/{$displayPageHeaderTitle.uploadName|escape:"url"}" width="{$displayPageHeaderTitle.width|escape}" height="{$displayPageHeaderTitle.height|escape}" {if $displayPageHeaderTitleAltText != ''}alt="{$displayPageHeaderTitleAltText|escape}"{else}alt="{translate key="common.pageHeader.altText"}"{/if} />
{elseif $displayPageHeaderTitle}
{$displayPageHeaderTitle}
{elseif $alternatePageHeader}
{$alternatePageHeader}
{elseif $siteTitle}
{$siteTitle}
{else}
{$applicationName}
{/if}
</h1>
</div>
</div>
<div id="body">
{if $leftSidebarCode || $rightSidebarCode}
<div id="sidebar">
{if $leftSidebarCode}
<div id="leftSidebar">
{$leftSidebarCode}
</div>
{/if}
{if $rightSidebarCode}
<div id="rightSidebar">
{$rightSidebarCode}
</div>
{/if}
</div>
{/if}
<div id="main">
{include file="common/navbar.tpl"}
{if !$hideBreadcrumbOnHomepage}{include file="common/breadcrumbs.tpl"}{/if}
{if !$hideTitleOnHomepage} <h2>{$pageTitleTranslated}</h2> {/if}
{if $pageSubtitle && !$pageSubtitleTranslated}{translate|assign:"pageSubtitleTranslated" key=$pageSubtitle}{/if}
{if $pageSubtitleTranslated}
<h3>{$pageSubtitleTranslated}</h3>
{/if}
<div id="content">
<!-- / templates/common/header.tpl -->