source: trunk/gsdl/macros/base.dm@ 10919

Last change on this file since 10919 was 10898, checked in by jrm21, 19 years ago

oops, fixed amount of space left for spacer in navbar (was using margin:
instead of margin-left:, which added too much space)

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 16.2 KB
RevLine 
[7343]1# this file must be UTF-8 encoded
[148]2#######################################################################
3# GLOBAL MACROS
4#######################################################################
[128]5
[148]6package Global
[128]7
[644]8##########
[590]9
[1969]10_optsite_ {}
11
12
13##########
14
[876]15_htmlextra_ {}
[590]16
[2898]17#_starthighlight_ {<b><u>}
18#_endhighlight_ {</u></b>}
[590]19
[2898]20_starthighlight_ {<span style="background: #FFFF77">}
21_endhighlight_ {</span>}
22
[148]23#######################################################################
24# page content
25#
26# these should always be overridden for each page/collection
27#######################################################################
[128]28
[645]29_content_ {<p><h2>oops</h2>
[876]30_textdefaultcontent_}
31_pagetitle_ {_textdefaulttitle_}
[148]32_imagethispage_ {}
[548]33_iconcollection_ {}
[1272]34_collectionname_ {}
[128]35
[3878]36
37package Global
38
39
[1272]40_imagecollection_ {_If_("_iconcollection_" ne "",
[10872]41<a href="_httppageabout_"><img class="icon" src="_iconcollection_" alt="_collectionname_" title="_collectionname_"></a>,
[7394]42_imagecollectionv_)}
[1272]43_imagecollection_ [v=1] {_imagecollectionv_}
44_imagecollectionv_ {_If_(_collectionname_,<br><br><h2><a href="_httppageabout_">_collectionname_</a></h2>)}
45
[258]46#######################################################################
47# these width macros are read in by the server when calculating
48# width of navigation bar etc. There should be one for each
49# classification that this receptionist supports, one for the
50# search button, and the _pagewidth_ macro which is the total width
51# of the page
52#######################################################################
53
[651]54# width of tabs when displaying tables of contents
55_tabwidth_ {25}
56
[218]57_pagewidth_ {537}
[645]58# defaultwidth is the width buttons default to if not included in this list
59_defaultwidth_ {87}
60_searchwidth_ {_widthtsrchx_}
[8106]61
[148]62#######################################################################
63# Macros whose values are set from within the server at runtime. These
64# are here only for reference and to set default values if required.
65#######################################################################
[128]66
[1305]67# _win32_ will be set to 1 if we're on windows
68_win32_ {}
69
[218]70_navigationbar_ {}
[258]71_widthtspace_ {2}
[128]72
[7502]73# The following is useful if collection specific macro. Override
74# _optnavigationbar_ to be empty if you don't want the navigation bar to
75# appear in the standard place, and then specify _navigationbar_ elsewhere
76# in a collection specific macro file(s) to be where you do want it.
77_optnavigationbar_{_navigationbar_}
78
[283]79# all cgi args are set as _cgiargX_ macros - those I've put here
80# are those that need to default to something
[276]81_cgiargd_ {}
[283]82_cgiargcl_ {}
[276]83
84# set from within the query action
85_hselection_ {}
86_jselection_ {}
87_nselection_ {}
[4781]88#level (granularity) selection for mgpp
[1120]89_gselection_ {}
[4781]90#level selection for form searching - dont have paragraph
91_gformselection_ {_gselection_}
[4758]92_fqfselection_ {}
[1419]93
[148]94#######################################################################
[1419]95# flashy rollover image macro
96#
97#######################################################################
98
99# imagescript should always be included in html header if there are
100# flashy images on the page
101_imagescript_ {
102var loaded = new Array();
103function gbutton (image, onimage) \{
104 if (image && image.src && (image.out == null || typeof(image.out) == typeof(void(0)))) \{
105 s = image.src;
106 image.out = new Image();
107 image.out.src = s;
108 image.over = new Image();
109 image.over.src = onimage;
110 loaded[image.name] = image;
111 \}
112\}
113
114function roll (imagename, over) \{
115 if (document.images) \{
116 if (over) i = "over";
117 else i = "out";
118 image = loaded[imagename];
119 if (image) image.src = eval("image."+i+".src");
120 \}
121\}
122}
123
124# gsimage should be used to define an instance of a flashy image
125# parameters are:
126# 1. the url to go to when the button is clicked
127# 2. the url of the "off" image
128# 3. the url of the "on" image
129# 4. the name of the image (must be unique)
130# 5. image alt text
[10872]131_gsimage_ {<a href="_1_" ><img name="_4_" class="link" src="_2_" alt="_5_" title="_5_"></a>}
[1419]132
133_gsimage_ [v=1] {<a href="_1_">_5_</a><br>}
134
[3878]135
[10872]136# parameters are:
137# 1. the url to go to when clicked
138# 2. the name of the tab
139# 3. alt/title explanatory text
140# 4. optional "selected" or not if it is the current tab
141_navtab_ {<span _If_("_4_" eq "selected",class="navlink_sel">_2_,class="navlink"><a href="_1_" title="_3_">_2_</a>)</span>}
142
143
144
[1419]145#######################################################################
[258]146# navigation bar images
[128]147#
[148]148#######################################################################
[128]149
[10872]150# the spacer image - the width of this is calculated and set from server
[10898]151_navbarspacer_ {<span style="margin-left: _widthtspace_px;"></span>}
[10872]152
153_navbarspacer_[v=1] {<br>
[128]154}
155
[218]156# image macros for all the classifications currently supported by
[1263]157# this receptionist.
[218]158
[10872]159## used to make the tabs in the navigation bar
[8106]160
[10872]161# cgiargu means "static page", so no search link should be shown
162_navtabsearch_ {_If_("_cgiargu_" ne "1",_navtabsearchlink_(_1_),_iconnosearch_)}
163_navtabsearchlink_ {_navtab_(_httpquery_,_tabtextSearch_,_textdescrsearch_,_1_)}
164
[8106]165# Dublin Core Metadata Element Set, Version 1.1
166
[10872]167_navtabTitle_ {_navtab_(_httpbrowseTitle_,titles,_textdescrTitle_,_1_)}
168_navtabCreator_ {_navtab_(_httpbrowseCreator_,creators,_textdescrCreator_,_1_)}
169_navtabSubject_ {_navtab_(_httpbrowseSubject_,_tabtextSubject_,_textdescrSubject_,_1_)}
170_navtabDescription_ {_navtab_(_httpbrowseDescription_,,_1_)}
171_navtabPublisher_ {_navtab_(_httpbrowsePublisher_,tabtepublishers,_textdescrPublisher_,_1_)}
172_navtabContributor_ {_navtab_(_httpbrowseContributor_,_tabtextContributor_,_textdescrContributor_,_1_)}
173_navtabDate_ {_navtab_(_httpbrowseDate_,_tabtextDate_,_textdescrDate_,_1_)}
174_navtabType_ {_navtab_(_httpbrowseType_,types,_textdescrType_,_1_)}
175_navtabFormat_ {_navtab_(_httpbrowseFormat_,formats,_textdescrFormat_,_1_)}
176_navtabIdentifier_ {_navtab_(_httpbrowseIdentifier_,identifiers,_textdescrIdentifier_,_1_)}
177_navtabSource_ {_navtab_(_httpbrowseSource_,source,_textdescrSource_,_1_)}
178_navtabLanguage_ {_navtab_(_httpbrowseLanguage_,language,_textdescrLanguage_,_1_)}
179_navtabRelation_ {_navtab_(_httpbrowseRelation_,,_1_)}
180_navtabCoverage_ {_navtab_(_httpbrowseCoverage_,coverage,_textdescrCoverage_,_1_)}
181_navtabRights_ {_navtab_(_httpbrowseRights_,rights,_textdescrRights_,_1_)}
[128]182
[10872]183_navtabSeries_ {_navtab_(_httpbrowseSeries_,series,_textdescrSeries_,_1_)}
184_navtabTo_ {_navtab_(_httpbrowseTo_,to,_textdescrTo_,_1_)}
185_navtabFrom_ {_navtab_(_httpbrowseFrom_,from,_textdescrFrom_,_1_)}
186_navtabOrganization_ {_navtab_(_httpbrowseOrganization_,,_1_)}
187_navtabHowto_ {_navtab_(_httpbrowseHowto_,how,_textdescrHowto_,_1_)}
188_navtabTopic_ {_navtab_(_httpbrowseTopic_,topic,_textdescrTopic_,_1_)}
189_navtabBrowse_ {_navtab_(_httpbrowseBrowse_,browse,_textdescrBrowse_}
190_navtabPeople_ {_navtab_(_httpbrowsePeople_,people,_textdescrPeople_,_1_)}
191_navtabAcronym_ {_navtab_(_httpbrowseAcronym_,acronym,_textdescrAcronym_,_1_)}
192_navtabCollage_ {_navtab_(_httpbrowseCollage_,collage,_textdescrCollage_,_1_)}
193_navtabPhrase_ {_navtab_(_httpbrowsePhrase_,phrase,_textdescrPhrase_,_1_)}
194_navtabArtist_ {_navtab_(_httpbrowseArtist_,artist,_textdescrArtist_,_1_)}
195_navtabKeyword_ {_navtab_(_httpbrowseKeyword_,kw,_textdescrKeyword_,_1_)}
196_navtabVolume_ {_navtab_(_httpbrowseVolume_,volume,_textdescrVolume_,_1_)}
197_navtabCaptions_ {_navtab_(_httpbrowseCaptions_,captions,_textdescrCaptions_,_1_)}
198_navtabCountries_ {_navtab_(_httpbrowseCountries_,countries,_textdescrCountries_,_1_)}
199
[148]200#######################################################################
[10872]201# global navigation links
[148]202#######################################################################
[128]203
[10872]204_globallinks_ {_If_("_cgiargu_" ne "1",_homelink_) _helplink_ _preflink_}
205_homelink_ {_navtab_(_httppagehome_,_linktextHOME_,_textdescrhome_)}
206_helplink_ {_navtab_(_httppagehelp_,_linktextHELP_,_textdescrhelp_)}
207_preflink_ {_navtab_(_httppagepref_,_linktextPREFERENCES_,_textdescrpref_)}
[128]208
[148]209#######################################################################
210# general web macros
211#######################################################################
212
[1275]213_mailaddr_ {[email protected]}
[128]214
[876]215_gsdltop_ {_top}
[128]216
[148]217#######################################################################
218# http macros
219#
[128]220# These contain the url without any quotes
[148]221#######################################################################
[128]222
[8910]223_httpcimages_ {_httpcollection_/images}
[876]224_httpcollimg_ {_httpcollection_/index/assoc}
[1019]225_httpdocimg_ {_httpcollimg_/_thisOID_}
[876]226
[1416]227_httpcollection_ {_httpprefix_/collect/_cgiargc_}
[128]228
[10872]229_httppagex_ {_gwcgi_?e=_compressedoptions_&amp;a=p&amp;p=_1_}
230_httppagestatus_ {_gwcgi_?e=_compressedoptions_&amp;a=status&amp;p=frameset}
231_httppagetranslator_ {_gwcgi_?e=_compressedoptions_&amp;a=gti&amp;p=home}
232_httppagecollector_ {_gwcgi_?e=_compressedoptions_&amp;a=collector&amp;p=intro}
[6723]233_httppagegli_ {_httppagex_(gli)}
[148]234_httppageabout_ {_httppagex_(about)}
[548]235#_httppagehome_ {_httppagex_(home)}
[10872]236###_httppagehome_ {http://www.nzdl.org/cgi-bin/dblibrary?a=p&amp;p=home}
237_httppagehome_ {_gwcgi_?a=p&amp;p=home&amp;l=_cgiargl_&amp;w=_cgiargw_}
[128]238_httppagehelp_ {_httppagex_(help)}
239_httppagepref_ {_httppagex_(preferences)}
[2562]240_httppagedocs_ {_httppagex_(docs)}
[10872]241_httpclearhistory_ {_gwcgi_?e=_compressedoptions_&amp;a=dh}
[148]242
[128]243_httpgreenstone_ {_httppagex_(gsdl)}
[1107]244_httpdownload_ {http://www.nzdl.org/download}
[1111]245_httppublications_ {_httpdownload_/greenstone/publications}
[128]246
[10872]247_httpcurrentdocument_ {_gwcgi_?e=_compressedoptions_&amp;cl=_cgiargcl_&amp;d=_cgiargd_}
248_httpquery_ {_gwcgi_?e=_compressedoptions_&amp;a=q}
249_httpBrowse_ {_gwcgi_?e=_compressedoptions_&amp;a=br}
[876]250
251# _httpdoc_ is the same as _httpdocument_ - _httpdocument_
252# may occasionally be altered by the server however
[10872]253_httpdocument_ {_gwcgi_?e=_compressedoptions_&amp;a=d}
254_httpdoc_ {_gwcgi_?e=_compressedoptions_&amp;a=d}
[876]255
[10872]256_httpextlink_ {_gwcgi_?e=_compressedoptions_&amp;a=extlink}
257_httpbuild_ {_gwcgi_?e=_compressedoptions_&amp;a=bc}
[128]258
[10872]259# this is obsolete now (still used by collector). done by stylesheet instead
[129]260_httpiconchalk_ {_httpimg_/chalk.gif}
261_widthchalk_ {2000}
262_heightchalk_ {10}
263
264_httpicondivb_ {_httpimg_/divb.gif}
[10872]265# these sizes are obsolete, now done in style sheet
[218]266_widthdivb_ {_pagewidth_}
[129]267_heightdivb_ {17}
268
269_httpicongsdl_ {_httpimg_/gsdl.gif}
270_widthgsdl_ {140}
271_heightgsdl_ {77}
272
273_httpiconitext_ {_httpimg_/itext.gif}
274_widthitext_ {16}
275_heightitext_ {21}
276
[9332]277_httpiconiworld_ {_httpimg_/iworld.gif}
278_widthiworld_ {16}
279_heightiworld_ {21}
280
[7502]281_httpiconiunknown_ {_httpimg_/iunknown.gif}
282_widthiunknown_ {16}
283_heightiunknown_ {21}
284
[548]285_httpiconibtext_ {_httpimg_/ibtext.gif}
286_widthibtext_ {16}
287_heightibtext_ {21}
288
[2042]289_httpiconimpegvideo_ {_httpimg_/impegvid.gif}
[964]290_widthimpegvideo_ {29}
291_heightimpegvideo_ {32}
292
293_httpiconiqtvideo_ {_httpimg_/iqtvideo.gif}
294_widthiqtvideo_ {29}
295_heightiqtvideo_ {32}
296
297_httpiconirmvideo_ {_httpimg_/irmvideo.gif}
298_widthirmvideo_ {29}
299_heightirmvideo_ {32}
300
[129]301_httpiconless_ {_httpimg_/less.gif}
302_widthless_ {30}
303_heightless_ {16}
304
305_httpiconmore_ {_httpimg_/more.gif}
306_widthmore_ {30}
307_heightmore_ {16}
308
309_httpiconspacer_ {_httpimg_/spacer.gif}
310_widthspacer_ {42}
311_heightspacer_ {4}
312
313_httpicontabspace_ {_httpimg_/tabspace.gif}
314_widthtabspace_ {23}
[454]315_heighttabspace_ {1}
[129]316
[10872]317_httpicontspace_ {_httpimg_/bg_green.png}
[148]318_heighttspace_ {17}
319
[129]320_httpiconwarning_ {_httpimg_/warning.gif}
321_widthwarning_ {30}
322_heightwarning_ {29}
323
324_httpiconhhome_ {_httpimg_/h\_home.gif}
325_widthhhome_ {200}
326_heighthhome_ {57}
327
[148]328_httpiconarrrght_ {_httpimg_/arrrght.gif}
329_widtharrrght_ {23}
330_heightarrrght_ {15}
[129]331
[454]332_httpiconopenbook_ {_httpimg_/openbook.gif}
333_widthopenbook_ {28}
334_heightopenbook_ {23}
335
336_httpiconaopenbk_ {_httpimg_/aopenbk.gif}
337_widthaopenbk_ {28}
338_heightaopenbk_ {23}
339
340_httpiconopenfldr_ {_httpimg_/openfldr.gif}
341_widthopenfldr_ {23}
342_heightopenfldr_ {15}
343
344_httpiconaopenfdr_ {_httpimg_/aopenfdr.gif}
345_widthaopenfdr_ {23}
346_heightaopenfdr_ {15}
347
[148]348_httpiconbook_ {_httpimg_/book.gif}
349_widthbook_ {18}
350_heightbook_ {11}
[129]351
[454]352_httpiconabook_ {_httpimg_/abook.gif}
353_widthabook_ {18}
354_heightabook_ {11}
355
[148]356_httpiconbshelf_ {_httpimg_/bshelf.gif}
357_widthbshelf_ {20}
358_heightbshelf_ {16}
[129]359
[454]360_httpiconabshelf_ {_httpimg_/abshelf.gif}
361_widthabshelf_ {20}
362_heightabshelf_ {16}
[129]363
[454]364_httpiconsmtext_ {_httpimg_/smtext.gif}
365_widthsmtext_ {23}
366_heightsmtext_ {15}
367
368_httpiconasmtext_ {_httpimg_/asmtext.gif}
369_widthasmtext_ {23}
370_heightasmtext_ {15}
371
372_httpiconclsdfldr_ {_httpimg_/clsdfldr.gif}
373_widthclsdfldr_ {23}
374_heightclsdfldr_ {15}
375
376_httpiconaclsdfdr_ {_httpimg_/aclsdfdr.gif}
377_widthaclsdfdr_ {23}
378_heightaclsdfdr_ {15}
379
[2992]380_httpiconimidi_ {_httpimg_/imidi.gif}
381_widthimidi_ {16}
382_heightimidi_ {21}
383
384_httpiconimsword_ {_httpimg_/imsword.gif}
385_widthimsword_ {26}
386_heightimsword_ {26}
387
[8917]388_httpiconimp3_ {_httpimg_/mp3icon.gif}
389_widthimp3_ {25}
390_heightimp3_ {20}
391
[1414]392_httpiconipdf_ {_httpimg_/ipdf.gif}
393_widthipdf_ {26}
394_heightipdf_ {26}
[454]395
[2014]396_httpiconips_ {_httpimg_/ips.gif}
397_widthips_ {25}
398_heightips_ {32}
399
[2982]400_httpiconippt_ {_httpimg_/ippt.gif}
401_widthippt_ {32}
402_heightippt_ {30}
403
[2569]404_httpiconirtf_ {_httpimg_/irtf.gif}
405_widthirtf_ {29}
406_heightirtf_ {32}
407
[2992]408_httpiconixls_ {_httpimg_/iexcel.gif}
409_widthixls_ {32}
410_heightixls_ {30}
[1414]411
[148]412#######################################################################
413# Icons
414#
[128]415# Must not include links (so they can be used as links). If you want to
416# include links use _image
[148]417#######################################################################
[128]418
[10597]419_iconnext_{<img src="_httpiconmore_" align="absbottom"
420width="_widthmore_" height="_heightmore_" border="0" alt="_texticonnext_" title="_texticonnext_">}
[548]421_iconnext_[v=1] {_texticonnext_}
[128]422
[10597]423_iconprev_{<img src="_httpiconless_" align="absbottom"
424width="_widthless_" height="_heightless_" border="0" alt="_texticonprev_" title="_texticonprev_">}
[548]425_iconprev_[v=1] {_texticonprev_}
[128]426
[10872]427_icontext_ {<img class="icon" src="_httpiconitext_" width="_widthitext_" height="_heightitext_" alt="_texticontext_" title="_texticontext_">}
[548]428_icontext_[v=1] {_texticontext_}
[128]429
[10872]430_iconworld_ {<img class="icon" src="_httpiconiworld_" width="_widthiworld_" height="_heightiworld_" alt="_texticonworld_" title="_texticonworld_">}
[9332]431_iconworld_[v=1] {_texticonworld_}
432
[10872]433_iconunknown_ {<img class="icon" src="_httpiconiunknown_" width="_widthiunknown_" height="_heightiunknown_" alt="_texticonunknown_" title="_texticonunknown_">}
[7502]434_iconunknown_[v=1] {_texticonunknown_}
435
[10872]436_iconblanktext_ {<img class="icon" src="_httpiconibtext_" width="_widthibtext_" height="_heightibtext_">}
[548]437_iconblanktext_[v=1] {}
[128]438
[10872]439_iconclosedbook_ {<img class="icon" src="_httpiconbook_" width="_widthbook_" height="_heightbook_" alt="_texticonclosedbook_" title="_texticonclosedbook_">}
[548]440_iconclosedbook_ [v=1] {<small><b>_texticonclosedbook_: </b></small>}
[876]441_iconclosedbook_ [v=1,l=zh]{<small><_font_><b>_texticonclosedbook_: </b></font></small>}
[128]442
[10872]443_icondoc_ {<img class="icon" src="_httpiconimsword_" width="_widthimsword_" height="_heightimsword_" alt="_texticonmsword_" title="_texticonmsword_">}
[10383]444_icondoc_[v=1] {_texticonmsword_}
[548]445
[10872]446_iconmp3_ {<img class="icon" src="_httpiconimp3_" width="_widthimp3_" height="_heightimp3_" alt="_texticonmp3_" title="_texticonmp3_">}
[8917]447_iconmp3_[v=1] {_texticonmp3_}
448
[10872]449_iconmidi_ {<img class="icon" src="_httpiconimidi_" width="_widthimidi_" height="_heightimidi_" alt="_texticonmidi_" title="_texticonmidi_">}
[2992]450_iconmidi_[v=1] {_texticonmidi_}
451
[10872]452_iconpdf_ {<img class="icon" src="_httpiconipdf_" width="_widthipdf_" height="_heightipdf_" alt="_texticonpdf_" title="_texticonpdf_">}
[1414]453_iconpdf_[v=1] {_texticonpdf_}
454
[10872]455_iconps_ {<img class="icon" src="_httpiconips_" width="_widthips_" height="_heightips_" alt="_texticonps_" title="_texticonps_">}
[2014]456_iconps_[v=1] {_texticonps_}
457
[10872]458_iconppt_ {<img class="icon" src="_httpiconippt_" width="_widthippt_" height="_heightippt_" alt="_texticonppt_" title="_texticonppt_">}
[2982]459_iconppt_[v=1] {_texticonppt_}
460
[10872]461_iconrtf_ {<img class="icon" src="_httpiconirtf_" width="_widthirtf_" height="_heightirtf_" alt="_texticonrtf_" title="_texticonrtf_">}
[2569]462_iconrtf_[v=1] {_texticonrtf_}
463
[10872]464_iconxls_ {<img class="icon" src="_httpiconixls_" width="_widthixls_" height="_heightixls_" alt="_texticonxls_" title="_texticonxls_">}
[2992]465_iconxls_[v=1] {_texticonxls_}
[1444]466
[10872]467_iconnosearch_ {<img class="icon" src="_httpimg_/nosearch.gif">}
[2664]468
[148]469#######################################################################
470# Image links
471#
[128]472# These might include a link (not like an _icon_
[148]473#######################################################################
[128]474
475
[10872]476_imagegreenstone_ {<img class="icon" src="_httpicongsdl_" width="_widthgsdl_" height="_heightgsdl_" alt="_textdescrgreenstone_" title="_textdescrgreenstone_">}
[128]477
[10872]478_imagegreenstone_[v=1] {_textdescrgreenstone_}
[129]479
Note: See TracBrowser for help on using the repository browser.