standard_page.smarty
18 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>{$page->title|sanitize}{if ($page->secondary_title != null)} — {$page->secondary_title|sanitize}{/if} | {$page->systemName}</title>
<!-- CSS Files. -->
{foreach item=sResourceURL from=$page->getCSSResources()}
<link rel="stylesheet" type="text/css" href="{$rootUrl}/{$sResourceURL}" />
{/foreach}
{if $config->get("ui/morphEnabled") == '1'}
{foreach item=sResourceURL from=$page->getThemeCSSResources()}
<link rel="stylesheet" type="text/css" href="{$rootUrl}/{$sResourceURL}" />
{/foreach}
{/if}
<link rel="stylesheet" type="text/css" href="{$rootUrl}/resources/css/kt-print.css"
media="print" />
<link rel="icon" href="{$rootUrl}/resources/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="{$rootUrl}/resources/favicon.ico" type="image/x-icon">
{if $refreshTimeout}
<meta http-equiv="refresh" content="{$refreshTimeout}" />
{/if}
<!-- evil CSS workarounds - inspired by Plone's approach -->
<!-- Internet Explorer CSS Fixes -->
<!--[if lt IE 7]>
{foreach item=sResourceURL from=$page->getCSSResourcesForIE()}
<style type="text/css" media="all">@import url({$rootUrl}/{$sResourceURL});</style>
{/foreach}
{if $config->get("ui/morphEnabled") == '1'}
{foreach item=sResourceURL from=$page->getThemeCSSResourcesForIE()}
<style type="text/css" media="all">@import url({$rootUrl}/{$sResourceURL});</style>
{/foreach}
{/if}
<![endif]-->
<!-- Standalone CSS. -->
{foreach item=sCSS from=$page->getCSSStandalone()}
<style>
{$sCSS}
</style>
{/foreach}
<!-- Javascript Files. -->
{foreach item=sResourceURL from=$page->getJSResources()}
<script type="text/javascript" src="{$rootUrl}/{$sResourceURL}"> </script>
{/foreach}
<!-- Standalone Javascript. -->
{foreach item=sJavascript from=$page->getJSStandalone()}
<script type="text/javascript">
{$sJavascript}
</script>
{/foreach}
<!--[if IE 7]>
<style type="text/css" media="all">@import url({$rootUrl}/resources/css/kt-ie-7.css);</style>
<![endif]-->
</head>
<body {if (!$page->show_portlets)}class="noportlets"{/if}>
<div id="wrapper">
<input type="hidden" name="kt-core-baseurl" id="kt-core-baseurl" value="{$rootUrl}" />
<div id="pageBody">
<div id="bodyPad">
<div id="logobar">
{if $config->get("ui/mainLogo") != ''}
<a href="{$rootUrl}"><img src="{$config->get("ui/mainLogo")}" class="primary" alt="{$config->get("ui/companyLogoTitle")}" title="{$config->get("ui/mainLogoTitle")}"/></a>
{else}
<a href="{$page->systemURL}"><img src="{$rootUrl}/resources/graphics/ktlogo-topbar-right.png" class="primary" title="{$page->systemName}"/></a>
{/if}
{if $config->get("ui/companyLogo") != ''}
<a href="{$rootUrl}/"><img src="{$config->get("ui/companyLogo")}" height="50px" width="{$config->get("ui/companyLogoWidth")}" alt="{$config->get("ui/companyLogoTitle")}" title="{$config->get("companyLogoTitle")}" class="secondary" /></a>
{/if}
<div class="floatClear"></div>
</div>
{if (!$page->hide_navbar)}
<div id="navbarBorder">
<div id="navbar">
<ul>
<!-- area menu -->
{foreach item=aMenuItem from=$page->menu}
{if ($aMenuItem.active == 1)}
<li class="active"><a href="{$aMenuItem.url}">{$aMenuItem.label}</a></li>
{else}
<li><a href="{$aMenuItem.url}">{$aMenuItem.label}</a></li>
{/if}
<li><div id="menu_divider"></div></li>
{/foreach}
{literal}
<script language="javascript">
function search(elname)
{
var sc = document.getElementById(elname);
var val = sc.value;
if (val == "{/literal}{i18n}Enter search criteria{/i18n}{literal}" || val == "")
{
alert('{/literal}{i18n}Please enter some search criteria{/i18n}{literal}');
return;
}
var sq = document.getElementById('txtQuery');
var so = document.getElementById('searchOptions');
val = val.replace(/\"/g, "'");
if (so.value == 's')
{
sq.value = '(GeneralText contains "' + val + '")';
}
else
{
sq.value = '(Metadata contains "' + val + '")';
}
var frm = document.getElementById('frmQuickSearch');
frm.submit();
}
function processSearchEnter(event, elname)
{
var sc = document.getElementById(elname);
if(event && event.which)
{
characterCode = event.which;
}
else
{
characterCode = event.keyCode;
}
if (characterCode.toString() == '13')
search(elname);
if (sc.value == "{/literal}{i18n}Enter search criteria{/i18n}{literal}")
{
sc.value = '';
}
return true;
}
function searchGotFocus(elname)
{
var sc = document.getElementById(elname);
if (sc.value == "{/literal}{i18n}Enter search criteria{/i18n}{literal}")
{
sc.value = "";
}
}
function searchLostFocus(elname)
{
var sc = document.getElementById(elname);
if (sc.value == "")
{
sc.value = "{/literal}{i18n}Enter search criteria{/i18n}{literal}";
}
}
function updateSelect(el, idx, value, name)
{
var elOptNew = new Option(name, value);
var elOptOld = el.options[idx];
try
{
el.add(elOptNew, elOptOld); // standards compliant; doesn't work in IE
}
catch(ex)
{
el.add(elOptNew, idx); // IE only
}
el.remove(idx+1);
}
function searchOptionSelect(elname)
{
var so = document.getElementById(elname);
switch(so.value)
{
case '':
break
case 's':
updateSelect(so, 1, 's', "{/literal}{i18n}content and metadata{/i18n}{literal} *");
updateSelect(so, 2, 'm', "{/literal}{i18n}metadata{/i18n}{literal}");
$('cbQuickGeneral').value = 1;
break
case 'm':
updateSelect(so, 1, 's', "{/literal}{i18n}content and metadata{/i18n}{literal}");
updateSelect(so, 2, 'm', "{/literal}{i18n}metadata{/i18n}{literal} *");
$('cbQuickGeneral').value = 0;
break;
case 'A':
document.location="{/literal}{$rootUrl}{literal}/search2.php?action=guiBuilder";
break;
case 'R':
document.location="{/literal}{$rootUrl}{literal}/search2.php?action=searchResults";
break;
default:
document.location="{/literal}{$rootUrl}{literal}/search2.php?action=processSaved&fSavedSearchId=" + so.value + "";
break;
}
}
</script>
{/literal}
<!-- user menu -->
<li class="pref">
{if ($page->user)}
<span class="ktLoggedInUser">{$page->user->getName()}</span>
{/if}
{if !empty($page->userMenu)}
·
{/if}
{foreach item=aMenuItem from=$page->userMenu name=prefmenu}
{if ($aMenuItem.active == 1)}
<a style='border: 4px solid red;' href="{$aMenuItem.url}">{$aMenuItem.label}</a>
{else}
<a href="{$aMenuItem.url}">{$aMenuItem.label}</a>
{/if}
{if !$smarty.foreach.prefmenu.last}
·
{/if}
{/foreach}
{if ($page->getHelpURL() != null)} <span class="fahrner"><a href="{$page->getHelpURL()}"><img src="thirdparty/icon-theme/16x16/apps/help-browser.gif" border="0" align="top" /></a>{/if}
</li>
<li class="pref">
<div style="position: absolute;">
<input id=searchCriteria value="{$search2_quickQuery|sanitize}" style="width:129px; font-size:12px; position:relative; top: -2px; left: -180px; z-index: 11"
onfocus="searchGotFocus('searchCriteria')" onblur="searchLostFocus('searchCriteria')" onkeypress="return processSearchEnter(event,'searchCriteria')" >
<img onclick="search('searchCriteria')" src="resources/tango-icons/system-search.png" border="0" style="position: relative; left: -183px; top: 4px; z-index: 11" />
<select id=searchOptions style="width:170px; font-size:12px; position:absolute; left: -180px; z-index: 10" onchange="searchOptionSelect('searchOptions')">
<option value="">--- {i18n}quick search{/i18n} ---
<option value="s" {if $search2_general==1}selected{/if}>{i18n}content and metadata{/i18n} {if $search2_general==1}*{/if}
<option value="m" {if $search2_general==0}selected{/if}>{i18n}metadata{/i18n} {if $search2_general==0}*{/if}
<option value="">--- {i18n}search{/i18n} ---
<option value="A">{i18n}Advanced Search{/i18n}
<option value="R">{i18n}Previous Results{/i18n}
{if count($savedSearches) > 0}
<option value="">--- {i18n}saved searches{/i18n} ---
{foreach item=searchitem from=$savedSearches}
<option value="{$searchitem.id}">{$searchitem.name|sanitize}
{/foreach}
{/if}
</select>
<form id=frmQuickSearch method=post action="{$rootUrl}/search2.php?action=process">
<input id=txtQuery name=txtQuery type=hidden>
<input type=hidden name="cbQuickQuery" id="cbQuickQuery" value="1">
<input type=hidden name="cbQuickGeneral" id="cbQuickGeneral" value="1"></form>
</div>
</li>
</ul>
</div>
<div id="navbarLeft"></div>
<div id="navbarRight"></div>
</div>
{/if}
{if (!$page->hide_section)}
<div id="breadcrumbs">
<span class="additional">{i18n}You are here{/i18n}: </span>
{if ($page->breadcrumbSection !== false)}
{if ($page->breadcrumbSection.url) }
<a href="{$page->breadcrumbSection.url}" class="primary">{$page->breadcrumbSection.label|sanitize}</a>
{else}
<span class="primary">{$page->breadcrumbSection.label|sanitize}</span>
{/if}
{/if}
{if (($page->breadcrumbSection !== false) && ($page->breadcrumbs !== false))}
»
{/if}
{if ($page->breadcrumbs !== false)}
{foreach item=aCrumb from=$page->breadcrumbs name=bc}
{if ($aCrumb.url) }
<a href="{$aCrumb.url}">{$aCrumb.label|sanitize}</a>
{else}
<span>{$aCrumb.label|mb_truncate:40:"...":true|sanitize}</span>
{/if}
{if (!$smarty.foreach.bc.last)}
»
{/if}
{/foreach}
{/if}
{if ($page->breadcrumbDetails !== false)}
<span class="additional">({$page->breadcrumbDetails|sanitize})</span>
{/if}
</div>
{/if}
</div>
<div id="kt-wrapper">
<table width="100%">
<tr align="left">
<td valign="top">
<div id="portletbar">
{foreach item=oPortlet from=$page->portlets}
{assign var=portlet_output value=$oPortlet->render() }
{if $portlet_output}
<div class="portlet {if $oPortlet->getActive()}expanded{/if}">
<h4 onclick="toggleElementClass('expanded',this.parentNode)">{$oPortlet->getTitle()}</h4>
<div class="portletTopRepeat"></div>
<div class="portletTopRight"></div>
<div class="portletbody">
{$portlet_output}
</div>
</div>
<div class="floatClear"></div>
{/if}
{/foreach}
</div>
</td>
<td valign="top" width="100%">
<div id="content" {if $page->content_class}class="{$page->content_class}"{/if}>
{if (!$page->hide_section)}
<h1 class="{$page->componentClass}"><span class="fahrner">{$page->componentLabel}</span>
{if ($page->getHelpURL() != null)}<a class="ktHelp" href="{$page->getHelpURL()}">Help</a> {/if}
</h1>
{/if}
<!-- any status / error messages get added here. -->
{if (!empty($page->errStack))}
<div class="ktError">
<div class="error_dashlet_rightrepeat_bottom"></div>
<div class="error_dashlet_leftrepeat_bottom"></div>
{foreach item=sError from=$page->errStack}
<p>{$sError|sanitize}</p>
{/foreach}
<div class="error_dashlet_topleft_small"></div>
<div class="error_dashlet_toprepeat_small"></div>
<div class="error_dashlet_topright_small"></div>
<div class="error_dashlet_bottomleft"></div>
<div class="error_dashlet_bottomrepeat_small"></div>
<div class="error_dashlet_bottomright"></div>
</div>
{/if}
{if (!empty($page->infoStack))}
<div class="ktInfo">
<div class="info_dashlet_rightrepeat_bottom"></div>
<div class="info_dashlet_leftrepeat_bottom"></div>
{foreach item=sInfo from=$page->infoStack}
<p>{$sInfo|sanitize}</p>
{/foreach}
<div class="info_dashlet_topleft_small"></div>
<div class="info_dashlet_toprepeat_small"></div>
<div class="info_dashlet_topright_small"></div>
<div class="info_dashlet_bottomleft"></div>
<div class="info_dashlet_bottomrepeat_small"></div>
<div class="info_dashlet_bottomright"></div>
</div>
{/if}
<!-- and finally, the content. -->
{$page->contents}
<div class="floatClear"></div>
</div>
</td>
</tr>
</table>
</div>
</div>
<div id="copyrightbarBorder">
<table width="98%" align="center">
<tr>
<td align="left">
<span>{i18n}© 2007 <a href="http://www.knowledgetree.com/">The Jam Warehouse Software (Pty) Ltd.</a> All Rights Reserved{/i18n}</span>
<p>{$page->getDisclaimer()}</p>
</td>
<td align="right">
<span>{i18n arg_timing=$page->getReqTime()}Request created in #timing#s{/i18n}</span><br />
<span>{i18n arg_version="$versionname" arg_appname="$appname"}#appname# Version: #version#{/i18n}</span><br/>
{if $config->get("ui/poweredByDisabled") == '0'}
<a href="{$rootUrl}"><img src="{$config->get("ui/powerLogo")}" border="0" alt="{$config->get("ui/powerLogoTitle")}" title="{$config->get("ui/powerLogoTitle")}"/></a>
{/if}
</td>
</tr>
</table>
<div class="floatClear"></div>
</div>
</div>
</body>
</html>