source: trunk/gsdl/macros/document.dm@ 13528

Last change on this file since 13528 was 13528, checked in by mdewsnip, 17 years ago

"I'm feeling lucky" URLs now include the cl argument.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 15.9 KB
RevLine 
[7343]1# this file must be UTF-8 encoded
2
[258]3package document
4
5#######################################################################
6# macros set from within the server
7#######################################################################
8
9_imagethispage_ {}
10_httpprevarrow_ {}
11_httpnextarrow_ {}
[283]12_pagetitle_ {}
[1804]13_phindclassifier_ {}
[6813]14_collageclassifier_ {}
[13427]15
[12944]16# custom header for individual document
17_documentheader_ {}
[13370]18
[13427]19#custom css links for individual document
20_csslink_{
21 <link rel="stylesheet" href="_cssfilelink_" type="text/css"
22 charset="UTF-8" _linktagend_
[13450]23 <link rel="alternate stylesheet" href="_httpimg_/preview-document.css"
24 type="text/css"
[13427]25 title="Preview Document" charset="UTF-8" media="screen" _linktagend_
26 <link rel="stylesheet" href="_httpimg_/print-document.css" type="text/css"
27 charset="UTF-8" media="print" _linktagend_
28}
[13370]29
[258]30#######################################################################
31# page content
32#######################################################################
33
[13527]34_nextsearchresult_ {_If_("_cgiargsrn_" ne "0",<div class="nextresult"><a href="_httpquery_&amp;ifl=1&amp;ifln=_cgiargsrn_">_textnextsearchresult_</a></div>)}
[12944]35
[13527]36_prevsearchresult_ {_If_("_cgiargsrp_" ne "0",<div class="prevresult"><a href="_httpquery_&amp;ifl=1&amp;ifln=_cgiargsrp_">_textprevsearchresult_</a></div>)}
[13370]37
[258]38_content_ {
[7503]39_optnavigationbar_
[11094]40
[10872]41_If_(_phindclassifier__collageclassifier_,
42<p style="text-align: center;">
[1804]43_phindclassifier_
[6813]44_collageclassifier_
[10872]45</p>
46)
[13370]47
[13528]48_If_("_cgiargcl_" eq "search",
[13370]49<div class="searchresults">
[13528]50_prevsearchresult_
51_nextsearchresult_
52</div>)
[13370]53
[10872]54<div class="document">
[13370]55
56
[258]57}
58
[8106]59# Dublin Core Metadata Element Set, Version 1.1
[2802]60_textTitlepage_ {_texticonhtitle_}
[8106]61_textCreatorpage_ {_texticonhcreat_}
[2802]62_textSubjectpage_ {_texticonhsubj_}
[8106]63_textDescriptionpage_ {_texticonhdesc_}
64_textPublisherpage_ {_texticonhpubl_}
65_textContributorpage_ {_texticonhcontr_}
66_textDatepage_ {_texticonhdate_}
67_textTypepage_ {_texticonhtype_}
68_textFormatpage_ {_texticonhform_}
69_textIdentifierpage_ {_texticonhident_}
70_textSourcepage_ {_texticonhsrc_}
71_textLanguagepage_ {_texticonhlang_}
72_textRelationpage_ {_texticonhrel_}
73_textCoveragepage_ {_texticonhcover_}
74_textRightspage_ {_texticonhright_}
75
[2802]76_textTopage_ {_texticonhto_}
77_textFrompage_ {_texticonhfrom_}
78_textSeriespage_ {_texticonhser_}
79_textHowtopage_ {_texticonhhow_}
80_textOrganizationpage_ {_texticonhorg_}
81_textBrowsepage_ {_texticonhbrwse_}
[6813]82_textCollagepage_ {_texticonhcoll_}
[2802]83_textPeoplepage_ {_texticonhpeople_}
84_textAcronympage_ {_texticonhacronym_}
85_textPhrasepage_ {_texticonhphrases_}
86_textArtistpage_ {_texticonhartist_}
[3105]87_textKeywordpage_ {_texticonhkw_}
[3534]88_textVolumepage_ {_texticonhvol_}
[5622]89_textCaptionspage_ {_texticonhcapt_}
[5517]90_textCountriespage_ {_texticonhcount_}
[2802]91
[258]92#######################################################################
93# navigation arrows
94#
95#######################################################################
96
[4868]97# these two may be reset to "" by the server
98_navarrowsbottom_ {_navarrows_}
99_navarrowstop_ {_navarrows_}
100
[258]101_navarrows_ {<center>
102<table width=_pagewidth_ cellpadding=0 cellspacing=0 border=0>
103<tr><td align=left valign=top>
104_prevarrow_
105</td><td align=right valign=top>
106_nextarrow_
107</td></tr></table>
108</center>
109}
110
111_prevarrow_ {_If_(_httpprevarrow_,<a href="_httpprevarrow_">_iconprev_</a>)}
112_nextarrow_ {_If_(_httpnextarrow_,<a href="_httpnextarrow_">_iconnext_</a>)}
113
[548]114_navarrows_ [v=1] {<p>
[258]115_prevarrow_<br>
116_nextarrow_
117}
118
119#######################################################################
120# the goto form
121#######################################################################
122
123_gotoform_ {
124<form name="GotoForm" method="get" action="_gwcgi_">
[876]125<input type=hidden name="e" value="_decodedcompressedoptions_">
[258]126<input type=hidden name="d" value="_cgiargd_">
127<input type=hidden name="cl" value="_cgiargcl_">
[666]128<input type="text" name="gp" size="3" maxlength="4">
[944]129<input type="submit" value="_textgoto_">
[258]130</form>
131}
132
[944]133_textnumpages_ {&nbsp;<i>(_1_ _pages_)</i>}
[666]134_parentarrow_ {}
135
136
[258]137#######################################################################
[1804]138# the phind applet
139#
140# The phind applet is only required on phind classifier pages.
141# Consequently, the _phindclassifier_ macro is not usually set. On screens
142# where it is required, _phindclassifier_ resolves to _phindapplet_, and
143# the following macro is loaded into the web page.
144#######################################################################
145
146_phindapplet_ {
[2507]147<APPLET CODEBASE="_httpprefix_/bin/java" CODE="org.nzdl.gsdl.Phind.Phind.class" ARCHIVE="Phind.jar" WIDTH=500 HEIGHT=400>
[3084]148 <PARAM NAME=library VALUE="_gwcgi_?e=_compressedoptions_">
[2487]149 <PARAM NAME=phindcgi VALUE="_gwcgi_?a=phind">
[1804]150 <PARAM NAME=collection VALUE="_cgiargc_">
[2021]151 <PARAM NAME=classifier VALUE="_phindnumber_">
152
[1804]153 <PARAM NAME=orientation VALUE="vertical">
154 <PARAM NAME=depth VALUE="2">
[2021]155 <PARAM NAME=resultorder VALUE="L,l,E,e,D,d">
156
157 <PARAM NAME=backdrop VALUE="_httpimg_/phindbg1.jpg">
158 <PARAM NAME=fontsize VALUE="10">
[1804]159 <PARAM NAME=blocksize VALUE="10">
[2021]160
[1804]161 The Phind java applet.
162</APPLET>
163}
164
[6813]165_collageapplet_ {
[7332]166 <applet CODEBASE="_httpprefix_/bin/java"
167 code="org.nzdl.gsdl.GsdlCollageApplet.GsdlCollageApplet.class"
168 archive="GsdlCollageApplet.jar"
169 width="_collagexdim_" height="_collageydim_">
[1804]170
[7332]171 <param name="gwcgi" value="_gwcgi_">
172 <param name="collection" value="_cgiargc_">
173 <param name="classifier" value="_cgiargcl_.1">
[6813]174
[7332]175 <param name="hrefMustHave" value="cl=_cgiargcl_.1">
176 <param name="imageMustNotHave" value="hl=\%x=\%gt=\%gc=\%.pr">
177
178 <param name="imageType" value="_collageimageType_">
179 <param name="verbosity" value="_collageverbosity_">
180 <param name="maxDepth" value="_collagemaxDepth_">
181 <param name="maxDisplay" value="_collagemaxDisplay_">
182 <param name="refreshDelay" value="_collagerefreshDelay_">
183 <param name="isJava2" value="_collageisJava2_">
184 <param name="bgcolor" value="_collagebgcolor_">
[11421]185 <param name="documentroot" value="_httpimg_">
[6813]186 </applet>
[7332]187
188<center>
189_collagecaption_
190</center>
191
[6813]192}
193
194
[1804]195#######################################################################
[283]196# icons
[258]197#######################################################################
198
[10872]199_iconsmalltext_ {<img src="_httpiconsmtext_" class="icon" width=_widthsmtext_ height=_heightsmtext_ alt="_texticonsmalltext_" title="_texticonsmalltext_">}
[548]200_iconsmalltext_ [v=1] {<small><b>_texticonsmalltext2_</b></small>}
[283]201
[10872]202_iconarrowsmalltext_ {<img src="_httpiconasmtext_" class="icon" width=_widthasmtext_ height=_heightasmtext_ alt="_texticonsmalltext_" title="_texticonsmalltext_">}
[548]203_iconarrowsmalltext_ [v=1] {<small><b>->_texticonsmalltext2_</b></small>}
[454]204
[10872]205_iconclosedfolder_ {<img src="_httpiconclsdfldr_" class="icon" width=_widthclsdfldr_ height=_heightclsdfldr_ alt="_texticonclosedfolder_" title="_texticonclosedfolder_">}
[548]206_iconclosedfolder_ [v=1] {<small><b>_texticonclosedfolder2_</b></small>}
[283]207
[10872]208_iconarrowclosedfolder_ {<img src=_httpiconaclsdfdr_" class="icon" width=_widthaclsdfdr_ height=_heightaclsdfdr_ alt="_texticonclosedfolder_" title="_texticonclosedfolder_">}
[548]209_iconarrowclosedfolder_ [v=1] {<small><b>->_texticonclosedfolder2_</b></small>}
[454]210
[10872]211_iconopenfolder_ {<img src="_httpiconopenfldr_" class="icon" width=_widthopenfldr_ height=_heightopenfldr_ alt="_texticonopenfolder_" title="_texticonopenfolder_">}
[548]212_iconopenfolder_ [v=1] {<small><b>_texticonopenfolder2_</b></small>}
[283]213
[10872]214_iconarrowopenfolder_ {<img src="_httpiconaopenfdr_" class="icon" width=_widthaopenfdr_ height=_heightaopenfdr_ alt="_texticonopenfolder_" title="_texticonopenfolder_">}
[548]215_iconarrowopenfolder_ [v=1] {<small><b>->_texticonopenfolder2_</b></small>}
[454]216
[10872]217_iconarrowclosedbook_ {<img src="_httpiconabook_" width=_widthabook_ height=_heightabook_ class="icon" alt="_texticonclosedbook_" title="_texticonclosedbook_">}
[548]218_iconarrowclosedbook_ [v=1] {<small><b>->_texticonclosedbook_: </b></small>}
[454]219
[10872]220_iconopenbook_ {<img src="_httpiconopenbook_" width=_widthopenbook_ height=_heightopenbook_ class="icon" alt="_texticonopenbook_" title="_texticonopenbook_">}
[548]221_iconopenbook_ [v=1] {<small><b>_texticonopenbook_: </b></small>}
[283]222
[10872]223_iconarrowopenbook_ {<img src="_httpiconaopenbk_" width=_widthaopenbk_ height=_heightaopenbk_ class="icon" alt="_texticonopenbook_" title="_texticonopenbook_">}
[548]224_iconarrowopenbook_ [v=1] {<small><b>->_texticonopenbook_: </b></small>}
[454]225
[10872]226_iconopenbookshelf_ {<img src="_httpiconbshelf_" class="icon" width=_widthbshelf_ height=_heightbshelf_ alt="_texticonopenbookshelf_" title="_texticonopenbookshelf_">}
[548]227_iconopenbookshelf_ [v=1] {<small><b>_texticonopenbookshelf_: </b></small>}
[283]228
[10872]229_iconarrowopenbookshelf_ {<img src="_httpiconabshelf_" class="icon" width=_widthabshelf_ height=_heightabshelf_ alt="_texticonopenbookshelf_" title="_texticonopenbookshelf_">}
[548]230_iconarrowopenbookshelf_ [v=1] {<small><b>->_texticonopenbookshelf_: </b></small>}
[454]231
[10872]232_iconclosedbookshelf_ {<img src="_httpiconbshelf_" class="icon" width=_widthbshelf_ height=_heightbshelf_ alt="_texticonclosedbookshelf_" title="_texticonclosedbookshelf_">}
[548]233_iconclosedbookshelf_ [v=1] {<small><b>_texticonclosedbookshelf_: </b></small>}
[283]234
[10872]235_iconarrowclosedbookshelf_ {<img src="_httpiconabshelf_" class="icon" width=_widthabshelf_ height=_heightabshelf_ alt="_texticonclosedbookshelf_" title="_texticonclosedbookshelf_">}
[548]236_iconarrowclosedbookshelf_ [v=1] {<small><b>->_texticonclosedbookshelf_: </b></small>}
[454]237
[10872]238_iconpointer_ {<img src="_httpiconarrrght_" class="icon" width=_widtharrrght_ height=_heightarrrght_>}
[548]239_iconpointer_ [v=1] {<small><b>_texticonpointer_-> </b></small>}
[283]240
[11132]241_iconwarning_ {<img src="_httpiconwarning_" width="_widthwarning_" height="_heightwarning_" class="icon" align="left">}
[548]242_iconwarning_ [v=1] {_texticonwarning_}
[283]243
244
[258]245#######################################################################
[283]246# images
247#######################################################################
248
[11132]249_docbutton_ {<div class="button"><span class="button" title="_3_"><a href="_1_">_2_</a></span></div>
250}
[283]251
[11132]252# can't use _docbutton_ macro for detach button as we need to include target
253_imagedetach_ {<div class="button"><span class="button"><a href="_httpcurrentdocument_&amp;x=1" target="\_blank" title="_texticondetach_">_textDETACH_</a></span></div>}
[283]254
[13427]255_imageprint_{<div class="button"><span class="button"><a href="javascript:print_preview()">_textPRINT_</a></span></div>}
256
257
[11132]258_imagehighlight_ {_docbutton_(_httpcurrentdocument_&amp;hl=1&amp;gc=_cgiarggc_&amp;gt=_cgiarggt_,_textHIGHLIGHT_,_texticonhighlight_)}
[283]259
[11132]260_imagenohighlight_ {_docbutton_(_httpcurrentdocument_&amp;hl=0&amp;gc=_cgiarggc_&amp;gt=_cgiarggt_,_document:textNOHIGHLIGHT_,_document:texticonnohighlight_)}
[283]261
[11132]262_imagecontracttoc_ {_docbutton_(_httpcurrentdocument_&amp;gc=0,_textCONTRACTCONTENTS_,_texticoncontracttoc_)}
[283]263
[11132]264_imageexpandtoc_ {_docbutton_(_httpcurrentdocument_&amp;gc=1,_textEXPANDCONTENTS_,_texticonexpandtoc_)}
[283]265
[11132]266_imagecontracttext_ {_docbutton_(_httpcurrentdocument_&amp;gt=0,_textCONTRACT_,_texticoncontracttext_)}
[283]267
[11132]268_imageexpandtext_ {_docbutton_(_httpcurrentdocument_&amp;gt=1,_textEXPANDTEXT_,_texticonexpandtext_)}
[283]269
[11132]270_imagecont_ {_docbutton_(_httpcurrentdocument_&amp;gt=2,_textCONTINUE_,_texticoncont_)}
[283]271
[11132]272
[13427]273#######################################################################
274# print preview script
275#######################################################################
[11132]276
[13427]277
278_pagescriptextra_{
279
280 var style_display_old;
281 var show = true;
[13452]282 var toc_top;
[13427]283
284 function has_toc(){
285 var div_nodes = document.getElementsByTagName("div");
286 for (var i=0;i < div_nodes.length ; i++ )\{
287 var div_node = div_nodes[i];
288 if (div_node.className =="toc" && div_node.childNodes.length > 1)
289 \{
290 return true;
291 \}
292 \}
293
294 return false;
295 \}
296
297 function hide_toc()\{
298 var div_nodes = document.getElementsByTagName("div");
299 for (var i=0;i < div_nodes.length ; i++ )\{
300 var div_node = div_nodes[i];
301 if (div_node.className =="toc")
302 \{
303 style_display_old = div_node.style.display;
[13452]304 toc_top = document.getElementById("toc_top");
305 if (toc_top)
306 div_node.parentNode.insertBefore(toc_top,div_node);
307 div_node.style.display = "none";
[13427]308 \};
309 \}
310
311 \}
312
[13452]313
[13427]314 function show_toc()\{
315
316 var div_nodes = document.getElementsByTagName("div");
317 for (var i=0;i < div_nodes.length ; i++ )\{
318 var div_node = div_nodes[i];
319 if (div_node.className =="toc")
320 \{
321 div_node.style.display = style_display_old;
[13452]322 if (toc_top)
323 div_node.insertBefore(toc_top,div_node.firstChild);
324 \};
[13427]325 \}
326
327 \}
328
329
330 function switch_toc()\{
331 var toc_link = document.getElementById("toc_link");
332 while (toc_link.hasChildNodes()) \{
333 toc_link.removeChild(toc_link.firstChild);
334 \}
335 if (show)\{
[13450]336 toc_link.appendChild(document.createTextNode('_textshowcontents_'));
[13427]337 show = false;
338 hide_toc();
339 \}
340 else\{
[13450]341 toc_link.appendChild(document.createTextNode('_texthidecontents_'));
[13427]342 show = true;
343 show_toc();
344 \}
345
346 \}
347
348 function print_preview() \{
349 // Switch the stylesheet
350 setActiveStyleSheet("Preview Document");
351 add_print_message();
352 \}
353
354 function add_print_message()\{
355 if (document.getElementById)\{
356 var print_message = document.createElement('ul');
357 print_message.id = 'print-message';
358 print_message.className = "printmessage";
359
360 var cancel_print_link = document.createElement('li');
361 cancel_print_link.className = "cancelprint"
362 cancel_print_link.onclick = function()\{ cancel_print(); return false;\};
[13450]363 cancel_print_link.appendChild(document.createTextNode('_textreturnoriginal_'));
[13427]364 print_message.appendChild(cancel_print_link);
365
366
367 var print_link = document.createElement('li');
368 print_link.onclick = function()\{ window.print(); return false;\};
[13450]369 print_link.appendChild(document.createTextNode('_textprintpage_'));
[13427]370 print_message.appendChild(print_link);
371
372 if (has_toc())\{
373 var toc_link = document.createElement('li');
374 toc_link.id = "toc_link";
375 toc_link.onclick = function()\{ switch_toc(); return false;\};
[13450]376 toc_link.appendChild(document.createTextNode('_texthidecontents_'));
[13427]377 print_message.appendChild(toc_link);
378 \}
379
380 //insert the print message node
381 var div_nodes = document.getElementsByTagName("div");
382 for (var i=0;i < div_nodes.length ; i++ )\{
383 var div_node = div_nodes[i];
384 if (div_node.className =="document")\{
385 var parent = div_node.parentNode;
386 parent.insertBefore(print_message,div_node);
387 \}
388 \}
389 \}
390
391 \}
392
393
394 function cancel_print() \{
395 // Destroy the preview message
396 var print_message = document.getElementById('print-message');
397 var parent = print_message.parentNode;
398 parent.removeChild(print_message);
399
400 show_toc();
401 // Switch back stylesheet
402 setActiveStyleSheet("default");
403 \}
404
405 function setActiveStyleSheet(title) \{
406 var i, a, main;
407 for(i=0; (a = document.getElementsByTagName("link")[i]); i++) \{
408 if(a.getAttribute("rel").indexOf("style") != -1
409 && a.getAttribute("title")) \{
410 a.disabled = true;
411 if(a.getAttribute("title") == title) a.disabled = false;
412 \}
413 \ }
414 \}
415
416}
417
418
[283]419#######################################################################
[258]420# headers/footers
421#######################################################################
422
423
424# header overridden for text pages
425_textheader_ {_cgihead_
[454]426_htmlhead_
[10872]427_startspacer_
428
429<!-- document:textheader -->
430<div id="banner">
431<div class="pageinfo"><p class="bannerlinks">_globallinks_</p></div>
432<div class="collectimage">_imagecollection_</div>
433</div>
[11779]434<div class="bannerextra">_pagebannerextra_</div>
[258]435}
[10872]436
[548]437_textheader_ [v=1] {_cgihead_
438_htmlhead_
[10872]439_globallinks_
[548]440}
[258]441
442_footer_ {
[10872]443</div> <!-- document:footer -->
444
[13427]445<div class="navarrowsbottom">
[4868]446_navarrowsbottom_
[13427]447</div>
[258]448_endspacer__htmlfooter_
449}
Note: See TracBrowser for help on using the repository browser.