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

Last change on this file since 11094 was 11094, checked in by jrm21, 18 years ago

move the div tags around the navigation bar into the _optnavigationbar_
macro

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