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
Line 
1# this file must be UTF-8 encoded
2#######################################################################
3# GLOBAL MACROS
4#######################################################################
5
6package Global
7
8##########
9
10_optsite_ {}
11
12
13##########
14
15_htmlextra_ {}
16
17#_starthighlight_ {<b><u>}
18#_endhighlight_ {</u></b>}
19
20_starthighlight_ {<span style="background: #FFFF77">}
21_endhighlight_ {</span>}
22
23#######################################################################
24# page content
25#
26# these should always be overridden for each page/collection
27#######################################################################
28
29_content_ {<p><h2>oops</h2>
30_textdefaultcontent_}
31_pagetitle_ {_textdefaulttitle_}
32_imagethispage_ {}
33_iconcollection_ {}
34_collectionname_ {}
35
36
37package Global
38
39
40_imagecollection_ {_If_("_iconcollection_" ne "",
41<a href="_httppageabout_"><img class="icon" src="_iconcollection_" alt="_collectionname_" title="_collectionname_"></a>,
42_imagecollectionv_)}
43_imagecollection_ [v=1] {_imagecollectionv_}
44_imagecollectionv_ {_If_(_collectionname_,<br><br><h2><a href="_httppageabout_">_collectionname_</a></h2>)}
45
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
54# width of tabs when displaying tables of contents
55_tabwidth_ {25}
56
57_pagewidth_ {537}
58# defaultwidth is the width buttons default to if not included in this list
59_defaultwidth_ {87}
60_searchwidth_ {_widthtsrchx_}
61
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#######################################################################
66
67# _win32_ will be set to 1 if we're on windows
68_win32_ {}
69
70_navigationbar_ {}
71_widthtspace_ {2}
72
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
79# all cgi args are set as _cgiargX_ macros - those I've put here
80# are those that need to default to something
81_cgiargd_ {}
82_cgiargcl_ {}
83
84# set from within the query action
85_hselection_ {}
86_jselection_ {}
87_nselection_ {}
88#level (granularity) selection for mgpp
89_gselection_ {}
90#level selection for form searching - dont have paragraph
91_gformselection_ {_gselection_}
92_fqfselection_ {}
93
94#######################################################################
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
131_gsimage_ {<a href="_1_" ><img name="_4_" class="link" src="_2_" alt="_5_" title="_5_"></a>}
132
133_gsimage_ [v=1] {<a href="_1_">_5_</a><br>}
134
135
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
145#######################################################################
146# navigation bar images
147#
148#######################################################################
149
150# the spacer image - the width of this is calculated and set from server
151_navbarspacer_ {<span style="margin-left: _widthtspace_px;"></span>}
152
153_navbarspacer_[v=1] {<br>
154}
155
156# image macros for all the classifications currently supported by
157# this receptionist.
158
159## used to make the tabs in the navigation bar
160
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
165# Dublin Core Metadata Element Set, Version 1.1
166
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_)}
182
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
200#######################################################################
201# global navigation links
202#######################################################################
203
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_)}
208
209#######################################################################
210# general web macros
211#######################################################################
212
213_mailaddr_ {[email protected]}
214
215_gsdltop_ {_top}
216
217#######################################################################
218# http macros
219#
220# These contain the url without any quotes
221#######################################################################
222
223_httpcimages_ {_httpcollection_/images}
224_httpcollimg_ {_httpcollection_/index/assoc}
225_httpdocimg_ {_httpcollimg_/_thisOID_}
226
227_httpcollection_ {_httpprefix_/collect/_cgiargc_}
228
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}
233_httppagegli_ {_httppagex_(gli)}
234_httppageabout_ {_httppagex_(about)}
235#_httppagehome_ {_httppagex_(home)}
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_}
238_httppagehelp_ {_httppagex_(help)}
239_httppagepref_ {_httppagex_(preferences)}
240_httppagedocs_ {_httppagex_(docs)}
241_httpclearhistory_ {_gwcgi_?e=_compressedoptions_&amp;a=dh}
242
243_httpgreenstone_ {_httppagex_(gsdl)}
244_httpdownload_ {http://www.nzdl.org/download}
245_httppublications_ {_httpdownload_/greenstone/publications}
246
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}
250
251# _httpdoc_ is the same as _httpdocument_ - _httpdocument_
252# may occasionally be altered by the server however
253_httpdocument_ {_gwcgi_?e=_compressedoptions_&amp;a=d}
254_httpdoc_ {_gwcgi_?e=_compressedoptions_&amp;a=d}
255
256_httpextlink_ {_gwcgi_?e=_compressedoptions_&amp;a=extlink}
257_httpbuild_ {_gwcgi_?e=_compressedoptions_&amp;a=bc}
258
259# this is obsolete now (still used by collector). done by stylesheet instead
260_httpiconchalk_ {_httpimg_/chalk.gif}
261_widthchalk_ {2000}
262_heightchalk_ {10}
263
264_httpicondivb_ {_httpimg_/divb.gif}
265# these sizes are obsolete, now done in style sheet
266_widthdivb_ {_pagewidth_}
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
277_httpiconiworld_ {_httpimg_/iworld.gif}
278_widthiworld_ {16}
279_heightiworld_ {21}
280
281_httpiconiunknown_ {_httpimg_/iunknown.gif}
282_widthiunknown_ {16}
283_heightiunknown_ {21}
284
285_httpiconibtext_ {_httpimg_/ibtext.gif}
286_widthibtext_ {16}
287_heightibtext_ {21}
288
289_httpiconimpegvideo_ {_httpimg_/impegvid.gif}
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
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}
315_heighttabspace_ {1}
316
317_httpicontspace_ {_httpimg_/bg_green.png}
318_heighttspace_ {17}
319
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
328_httpiconarrrght_ {_httpimg_/arrrght.gif}
329_widtharrrght_ {23}
330_heightarrrght_ {15}
331
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
348_httpiconbook_ {_httpimg_/book.gif}
349_widthbook_ {18}
350_heightbook_ {11}
351
352_httpiconabook_ {_httpimg_/abook.gif}
353_widthabook_ {18}
354_heightabook_ {11}
355
356_httpiconbshelf_ {_httpimg_/bshelf.gif}
357_widthbshelf_ {20}
358_heightbshelf_ {16}
359
360_httpiconabshelf_ {_httpimg_/abshelf.gif}
361_widthabshelf_ {20}
362_heightabshelf_ {16}
363
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
380_httpiconimidi_ {_httpimg_/imidi.gif}
381_widthimidi_ {16}
382_heightimidi_ {21}
383
384_httpiconimsword_ {_httpimg_/imsword.gif}
385_widthimsword_ {26}
386_heightimsword_ {26}
387
388_httpiconimp3_ {_httpimg_/mp3icon.gif}
389_widthimp3_ {25}
390_heightimp3_ {20}
391
392_httpiconipdf_ {_httpimg_/ipdf.gif}
393_widthipdf_ {26}
394_heightipdf_ {26}
395
396_httpiconips_ {_httpimg_/ips.gif}
397_widthips_ {25}
398_heightips_ {32}
399
400_httpiconippt_ {_httpimg_/ippt.gif}
401_widthippt_ {32}
402_heightippt_ {30}
403
404_httpiconirtf_ {_httpimg_/irtf.gif}
405_widthirtf_ {29}
406_heightirtf_ {32}
407
408_httpiconixls_ {_httpimg_/iexcel.gif}
409_widthixls_ {32}
410_heightixls_ {30}
411
412#######################################################################
413# Icons
414#
415# Must not include links (so they can be used as links). If you want to
416# include links use _image
417#######################################################################
418
419_iconnext_{<img src="_httpiconmore_" align="absbottom"
420width="_widthmore_" height="_heightmore_" border="0" alt="_texticonnext_" title="_texticonnext_">}
421_iconnext_[v=1] {_texticonnext_}
422
423_iconprev_{<img src="_httpiconless_" align="absbottom"
424width="_widthless_" height="_heightless_" border="0" alt="_texticonprev_" title="_texticonprev_">}
425_iconprev_[v=1] {_texticonprev_}
426
427_icontext_ {<img class="icon" src="_httpiconitext_" width="_widthitext_" height="_heightitext_" alt="_texticontext_" title="_texticontext_">}
428_icontext_[v=1] {_texticontext_}
429
430_iconworld_ {<img class="icon" src="_httpiconiworld_" width="_widthiworld_" height="_heightiworld_" alt="_texticonworld_" title="_texticonworld_">}
431_iconworld_[v=1] {_texticonworld_}
432
433_iconunknown_ {<img class="icon" src="_httpiconiunknown_" width="_widthiunknown_" height="_heightiunknown_" alt="_texticonunknown_" title="_texticonunknown_">}
434_iconunknown_[v=1] {_texticonunknown_}
435
436_iconblanktext_ {<img class="icon" src="_httpiconibtext_" width="_widthibtext_" height="_heightibtext_">}
437_iconblanktext_[v=1] {}
438
439_iconclosedbook_ {<img class="icon" src="_httpiconbook_" width="_widthbook_" height="_heightbook_" alt="_texticonclosedbook_" title="_texticonclosedbook_">}
440_iconclosedbook_ [v=1] {<small><b>_texticonclosedbook_: </b></small>}
441_iconclosedbook_ [v=1,l=zh]{<small><_font_><b>_texticonclosedbook_: </b></font></small>}
442
443_icondoc_ {<img class="icon" src="_httpiconimsword_" width="_widthimsword_" height="_heightimsword_" alt="_texticonmsword_" title="_texticonmsword_">}
444_icondoc_[v=1] {_texticonmsword_}
445
446_iconmp3_ {<img class="icon" src="_httpiconimp3_" width="_widthimp3_" height="_heightimp3_" alt="_texticonmp3_" title="_texticonmp3_">}
447_iconmp3_[v=1] {_texticonmp3_}
448
449_iconmidi_ {<img class="icon" src="_httpiconimidi_" width="_widthimidi_" height="_heightimidi_" alt="_texticonmidi_" title="_texticonmidi_">}
450_iconmidi_[v=1] {_texticonmidi_}
451
452_iconpdf_ {<img class="icon" src="_httpiconipdf_" width="_widthipdf_" height="_heightipdf_" alt="_texticonpdf_" title="_texticonpdf_">}
453_iconpdf_[v=1] {_texticonpdf_}
454
455_iconps_ {<img class="icon" src="_httpiconips_" width="_widthips_" height="_heightips_" alt="_texticonps_" title="_texticonps_">}
456_iconps_[v=1] {_texticonps_}
457
458_iconppt_ {<img class="icon" src="_httpiconippt_" width="_widthippt_" height="_heightippt_" alt="_texticonppt_" title="_texticonppt_">}
459_iconppt_[v=1] {_texticonppt_}
460
461_iconrtf_ {<img class="icon" src="_httpiconirtf_" width="_widthirtf_" height="_heightirtf_" alt="_texticonrtf_" title="_texticonrtf_">}
462_iconrtf_[v=1] {_texticonrtf_}
463
464_iconxls_ {<img class="icon" src="_httpiconixls_" width="_widthixls_" height="_heightixls_" alt="_texticonxls_" title="_texticonxls_">}
465_iconxls_[v=1] {_texticonxls_}
466
467_iconnosearch_ {<img class="icon" src="_httpimg_/nosearch.gif">}
468
469#######################################################################
470# Image links
471#
472# These might include a link (not like an _icon_
473#######################################################################
474
475
476_imagegreenstone_ {<img class="icon" src="_httpicongsdl_" width="_widthgsdl_" height="_heightgsdl_" alt="_textdescrgreenstone_" title="_textdescrgreenstone_">}
477
478_imagegreenstone_[v=1] {_textdescrgreenstone_}
479
Note: See TracBrowser for help on using the repository browser.