source: main/trunk/greenstone2/macros/base.dm@ 22600

Last change on this file since 22600 was 22055, checked in by davidb, 14 years ago

Macro support for sql-query page added

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 13.1 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
[11117]17# now defined in nav_css/nav_ns4 macro files
[2898]18#_starthighlight_ {<b><u>}
19#_endhighlight_ {</u></b>}
[590]20
[148]21#######################################################################
22# page content
23#
24# these should always be overridden for each page/collection
25#######################################################################
[128]26
[645]27_content_ {<p><h2>oops</h2>
[876]28_textdefaultcontent_}
29_pagetitle_ {_textdefaulttitle_}
[148]30_imagethispage_ {}
[548]31_iconcollection_ {}
[1272]32_collectionname_ {}
[128]33
[3878]34
35package Global
36
37
[1272]38_imagecollection_ {_If_("_iconcollection_" ne "",
[10872]39<a href="_httppageabout_"><img class="icon" src="_iconcollection_" alt="_collectionname_" title="_collectionname_"></a>,
[7394]40_imagecollectionv_)}
[1272]41_imagecollection_ [v=1] {_imagecollectionv_}
[11820]42_imagecollectionv_ {_If_(_collectionname_,<p class="collectiontitle"><a class="collectiontitle" href="_httppageabout_">_collectionname_</a></p>)}
[1272]43
[258]44#######################################################################
45# these width macros are read in by the server when calculating
46# width of navigation bar etc. There should be one for each
47# classification that this receptionist supports, one for the
48# search button, and the _pagewidth_ macro which is the total width
49# of the page
50#######################################################################
51
[651]52# width of tabs when displaying tables of contents
53_tabwidth_ {25}
54
[218]55_pagewidth_ {537}
[645]56# defaultwidth is the width buttons default to if not included in this list
57_defaultwidth_ {87}
58_searchwidth_ {_widthtsrchx_}
[8106]59
[148]60#######################################################################
61# Macros whose values are set from within the server at runtime. These
62# are here only for reference and to set default values if required.
63#######################################################################
[128]64
[1305]65# _win32_ will be set to 1 if we're on windows
66_win32_ {}
67
[283]68# all cgi args are set as _cgiargX_ macros - those I've put here
69# are those that need to default to something
[276]70_cgiargd_ {}
[283]71_cgiargcl_ {}
[276]72
73# set from within the query action
74_hselection_ {}
75_jselection_ {}
76_nselection_ {}
[4781]77#level (granularity) selection for mgpp
[1120]78_gselection_ {}
[4781]79#level selection for form searching - dont have paragraph
80_gformselection_ {_gselection_}
[4758]81_fqfselection_ {}
[12778]82# sort field for lucene
83_sfselection_ {}
[22055]84# sort field for sql
85_sqlsfselection_ {}
[1419]86
87#######################################################################
[12175]88# navigation bar
[128]89#
[148]90#######################################################################
[12175]91# Most of the stuff to do with navigation bars is now defined in nav_css.dm
92# and nav_ns4.dm
[128]93
[15846]94_dynamicclassifiernavbarentries_ {}
[12175]95_navigationbar_ {}
96_widthtspace_ {2}
[10872]97
[12175]98_navlinktitle_ {_If_("_label_1__" eq "\_label_1_\_",_1_,_label_1__)}
99_navlinkalt_ {_If_("_textdescr_1__" ne "\_textdescr_1_\_", _textdescr_1__, _If_("_text_1__" eq "\_text_1_\_",_textdescrdefault_(_1_),_textdescrdefault_(_text_1__)) }
[218]100
[148]101#######################################################################
[10872]102# global navigation links
[148]103#######################################################################
[128]104
[11117]105# _globallinks_ is now defined in nav_css and nav_ns4 macro files
[128]106
[148]107#######################################################################
108# general web macros
109#######################################################################
110
[876]111_gsdltop_ {_top}
[128]112
[148]113#######################################################################
114# http macros
115#
[128]116# These contain the url without any quotes
[148]117#######################################################################
[128]118
[19110]119# _httpprefix_ and _httpweb_ defined by the server
120_httpimages_ {_httpweb_/images}
[19112]121_httpscript_ {_httpweb_/script}
122_httpstyle_ {_httpweb_/style}
[19110]123_httpflash_ {_httpweb_/flash}
124_httpjava_ {_httpweb_/java}
125
126# old macros, for backwards compatibility
127_httpimg_ {_httpimages_}
128
129# collection versions of the same directories
[8910]130_httpcimages_ {_httpcollection_/images}
[19112]131_httpcscript_ {_httpcollection_/script}
132_httpcstyle_ {_httpcollection_/style}
[19110]133_httpcflash_ {_httpcollection_/flash}
134_httpcjava_ {_httpcollection_/java}
135
[18692]136_httpassocdir_ {_httpcollection_/index/assoc}
[19110]137_httpdocimg_ {_httpassocdir_/_thisOID_}
138# old macros, for backwards compatibility
[18692]139_httpcollimg_ {_httpcollection_/index/assoc}
[876]140
[1416]141_httpcollection_ {_httpprefix_/collect/_cgiargc_}
[128]142
[10872]143_httppagex_ {_gwcgi_?e=_compressedoptions_&amp;a=p&amp;p=_1_}
144_httppagestatus_ {_gwcgi_?e=_compressedoptions_&amp;a=status&amp;p=frameset}
145_httppagetranslator_ {_gwcgi_?e=_compressedoptions_&amp;a=gti&amp;p=home}
146_httppagecollector_ {_gwcgi_?e=_compressedoptions_&amp;a=collector&amp;p=intro}
[11999]147_httppagedepositor_ {_gwcgi_?e=_compressedoptions_&amp;a=depositor&amp;p=select}
[6723]148_httppagegli_ {_httppagex_(gli)}
[148]149_httppageabout_ {_httppagex_(about)}
[548]150#_httppagehome_ {_httppagex_(home)}
[10872]151###_httppagehome_ {http://www.nzdl.org/cgi-bin/dblibrary?a=p&amp;p=home}
152_httppagehome_ {_gwcgi_?a=p&amp;p=home&amp;l=_cgiargl_&amp;w=_cgiargw_}
[128]153_httppagehelp_ {_httppagex_(help)}
154_httppagepref_ {_httppagex_(preferences)}
[2562]155_httppagedocs_ {_httppagex_(docs)}
[10872]156_httpclearhistory_ {_gwcgi_?e=_compressedoptions_&amp;a=dh}
[148]157
[128]158_httpgreenstone_ {_httppagex_(gsdl)}
[1107]159_httpdownload_ {http://www.nzdl.org/download}
[1111]160_httppublications_ {_httpdownload_/greenstone/publications}
[128]161
[10872]162_httpcurrentdocument_ {_gwcgi_?e=_compressedoptions_&amp;cl=_cgiargcl_&amp;d=_cgiargd_}
[22055]163_httpquery_ {_gwcgi_?e=_compressedoptions_&amp;a=_If_("_cgiargqt_" eq "2",sqlq,q)}
[10872]164_httpBrowse_ {_gwcgi_?e=_compressedoptions_&amp;a=br}
[876]165
166# _httpdoc_ is the same as _httpdocument_ - _httpdocument_
167# may occasionally be altered by the server however
[10872]168_httpdocument_ {_gwcgi_?e=_compressedoptions_&amp;a=d}
169_httpdoc_ {_gwcgi_?e=_compressedoptions_&amp;a=d}
[876]170
[11999]171_httpdocumenthandle_ {_httpprefix_handle/_1_/_2_}
172
[10872]173_httpextlink_ {_gwcgi_?e=_compressedoptions_&amp;a=extlink}
174_httpbuild_ {_gwcgi_?e=_compressedoptions_&amp;a=bc}
[128]175
[10872]176# this is obsolete now (still used by collector). done by stylesheet instead
[129]177_httpiconchalk_ {_httpimg_/chalk.gif}
178_widthchalk_ {2000}
179_heightchalk_ {10}
180
181_httpicondivb_ {_httpimg_/divb.gif}
[10872]182# these sizes are obsolete, now done in style sheet
[218]183_widthdivb_ {_pagewidth_}
[129]184_heightdivb_ {17}
185
186_httpicongsdl_ {_httpimg_/gsdl.gif}
187_widthgsdl_ {140}
188_heightgsdl_ {77}
189
190_httpiconitext_ {_httpimg_/itext.gif}
191_widthitext_ {16}
192_heightitext_ {21}
193
[9332]194_httpiconiworld_ {_httpimg_/iworld.gif}
195_widthiworld_ {16}
196_heightiworld_ {21}
197
[7502]198_httpiconiunknown_ {_httpimg_/iunknown.gif}
199_widthiunknown_ {16}
200_heightiunknown_ {21}
201
[548]202_httpiconibtext_ {_httpimg_/ibtext.gif}
203_widthibtext_ {16}
204_heightibtext_ {21}
205
[2042]206_httpiconimpegvideo_ {_httpimg_/impegvid.gif}
[964]207_widthimpegvideo_ {29}
208_heightimpegvideo_ {32}
209
210_httpiconiqtvideo_ {_httpimg_/iqtvideo.gif}
211_widthiqtvideo_ {29}
212_heightiqtvideo_ {32}
213
214_httpiconirmvideo_ {_httpimg_/irmvideo.gif}
215_widthirmvideo_ {29}
216_heightirmvideo_ {32}
217
[129]218_httpiconless_ {_httpimg_/less.gif}
219_widthless_ {30}
220_heightless_ {16}
221
222_httpiconmore_ {_httpimg_/more.gif}
223_widthmore_ {30}
224_heightmore_ {16}
225
226_httpiconspacer_ {_httpimg_/spacer.gif}
227_widthspacer_ {42}
228_heightspacer_ {4}
229
230_httpicontabspace_ {_httpimg_/tabspace.gif}
231_widthtabspace_ {23}
[454]232_heighttabspace_ {1}
[129]233
[10872]234_httpicontspace_ {_httpimg_/bg_green.png}
[148]235_heighttspace_ {17}
236
[129]237_httpiconwarning_ {_httpimg_/warning.gif}
238_widthwarning_ {30}
239_heightwarning_ {29}
240
241_widthhhome_ {200}
242_heighthhome_ {57}
243
[148]244_httpiconarrrght_ {_httpimg_/arrrght.gif}
245_widtharrrght_ {23}
246_heightarrrght_ {15}
[129]247
[454]248_httpiconopenbook_ {_httpimg_/openbook.gif}
249_widthopenbook_ {28}
250_heightopenbook_ {23}
251
252_httpiconaopenbk_ {_httpimg_/aopenbk.gif}
253_widthaopenbk_ {28}
254_heightaopenbk_ {23}
255
256_httpiconopenfldr_ {_httpimg_/openfldr.gif}
257_widthopenfldr_ {23}
258_heightopenfldr_ {15}
259
260_httpiconaopenfdr_ {_httpimg_/aopenfdr.gif}
261_widthaopenfdr_ {23}
262_heightaopenfdr_ {15}
263
[148]264_httpiconbook_ {_httpimg_/book.gif}
265_widthbook_ {18}
266_heightbook_ {11}
[129]267
[454]268_httpiconabook_ {_httpimg_/abook.gif}
269_widthabook_ {18}
270_heightabook_ {11}
271
[148]272_httpiconbshelf_ {_httpimg_/bshelf.gif}
273_widthbshelf_ {20}
274_heightbshelf_ {16}
[129]275
[454]276_httpiconabshelf_ {_httpimg_/abshelf.gif}
277_widthabshelf_ {20}
278_heightabshelf_ {16}
[129]279
[454]280_httpiconsmtext_ {_httpimg_/smtext.gif}
281_widthsmtext_ {23}
282_heightsmtext_ {15}
283
284_httpiconasmtext_ {_httpimg_/asmtext.gif}
285_widthasmtext_ {23}
286_heightasmtext_ {15}
287
288_httpiconclsdfldr_ {_httpimg_/clsdfldr.gif}
289_widthclsdfldr_ {23}
290_heightclsdfldr_ {15}
291
292_httpiconaclsdfdr_ {_httpimg_/aclsdfdr.gif}
293_widthaclsdfdr_ {23}
294_heightaclsdfdr_ {15}
295
[2992]296_httpiconimidi_ {_httpimg_/imidi.gif}
297_widthimidi_ {16}
298_heightimidi_ {21}
299
300_httpiconimsword_ {_httpimg_/imsword.gif}
301_widthimsword_ {26}
302_heightimsword_ {26}
303
[11143]304_httpiconimp3_ {_httpimg_/imp3.gif}
[8917]305_widthimp3_ {25}
306_heightimp3_ {20}
307
[21747]308_httpiconiogg_ {_httpimg_/iogg.gif}
309_widthiogg_ {32}
310_heightiogg_ {30}
311
[1414]312_httpiconipdf_ {_httpimg_/ipdf.gif}
313_widthipdf_ {26}
314_heightipdf_ {26}
[454]315
[2014]316_httpiconips_ {_httpimg_/ips.gif}
317_widthips_ {25}
318_heightips_ {32}
319
[2982]320_httpiconippt_ {_httpimg_/ippt.gif}
321_widthippt_ {32}
322_heightippt_ {30}
323
[2569]324_httpiconirtf_ {_httpimg_/irtf.gif}
325_widthirtf_ {29}
326_heightirtf_ {32}
327
[2992]328_httpiconixls_ {_httpimg_/iexcel.gif}
329_widthixls_ {32}
330_heightixls_ {30}
[1414]331
[17860]332_httpiconspace_ {_httpimg_/space.gif}
333
[148]334#######################################################################
335# Icons
336#
[128]337# Must not include links (so they can be used as links). If you want to
338# include links use _image
[148]339#######################################################################
[128]340
[10597]341_iconnext_{<img src="_httpiconmore_" align="absbottom"
342width="_widthmore_" height="_heightmore_" border="0" alt="_texticonnext_" title="_texticonnext_">}
[548]343_iconnext_[v=1] {_texticonnext_}
[128]344
[10597]345_iconprev_{<img src="_httpiconless_" align="absbottom"
346width="_widthless_" height="_heightless_" border="0" alt="_texticonprev_" title="_texticonprev_">}
[548]347_iconprev_[v=1] {_texticonprev_}
[128]348
[10872]349_icontext_ {<img class="icon" src="_httpiconitext_" width="_widthitext_" height="_heightitext_" alt="_texticontext_" title="_texticontext_">}
[548]350_icontext_[v=1] {_texticontext_}
[128]351
[10872]352_iconworld_ {<img class="icon" src="_httpiconiworld_" width="_widthiworld_" height="_heightiworld_" alt="_texticonworld_" title="_texticonworld_">}
[9332]353_iconworld_[v=1] {_texticonworld_}
354
[10872]355_iconunknown_ {<img class="icon" src="_httpiconiunknown_" width="_widthiunknown_" height="_heightiunknown_" alt="_texticonunknown_" title="_texticonunknown_">}
[7502]356_iconunknown_[v=1] {_texticonunknown_}
357
[10872]358_iconblanktext_ {<img class="icon" src="_httpiconibtext_" width="_widthibtext_" height="_heightibtext_">}
[548]359_iconblanktext_[v=1] {}
[128]360
[10872]361_iconclosedbook_ {<img class="icon" src="_httpiconbook_" width="_widthbook_" height="_heightbook_" alt="_texticonclosedbook_" title="_texticonclosedbook_">}
[548]362_iconclosedbook_ [v=1] {<small><b>_texticonclosedbook_: </b></small>}
[876]363_iconclosedbook_ [v=1,l=zh]{<small><_font_><b>_texticonclosedbook_: </b></font></small>}
[128]364
[10872]365_icondoc_ {<img class="icon" src="_httpiconimsword_" width="_widthimsword_" height="_heightimsword_" alt="_texticonmsword_" title="_texticonmsword_">}
[10383]366_icondoc_[v=1] {_texticonmsword_}
[548]367
[10872]368_iconmp3_ {<img class="icon" src="_httpiconimp3_" width="_widthimp3_" height="_heightimp3_" alt="_texticonmp3_" title="_texticonmp3_">}
[8917]369_iconmp3_[v=1] {_texticonmp3_}
370
[10872]371_iconmidi_ {<img class="icon" src="_httpiconimidi_" width="_widthimidi_" height="_heightimidi_" alt="_texticonmidi_" title="_texticonmidi_">}
[2992]372_iconmidi_[v=1] {_texticonmidi_}
373
[21747]374_iconogg_ {<img class="icon" src="_httpiconiogg_" width="_widthiogg_" height="_heightiogg_" alt="_texticonogg_" title="_texticonogg_">}
375_iconogg_[v=1] {_texticonogg_}
376
[10872]377_iconpdf_ {<img class="icon" src="_httpiconipdf_" width="_widthipdf_" height="_heightipdf_" alt="_texticonpdf_" title="_texticonpdf_">}
[1414]378_iconpdf_[v=1] {_texticonpdf_}
379
[10872]380_iconps_ {<img class="icon" src="_httpiconips_" width="_widthips_" height="_heightips_" alt="_texticonps_" title="_texticonps_">}
[2014]381_iconps_[v=1] {_texticonps_}
382
[10872]383_iconppt_ {<img class="icon" src="_httpiconippt_" width="_widthippt_" height="_heightippt_" alt="_texticonppt_" title="_texticonppt_">}
[2982]384_iconppt_[v=1] {_texticonppt_}
385
[21747]386_iconrmvideo_ {<img class="icon" src="_httpiconirmvideo_" width="_widthirmvideo_" height="_heightirmvideo_" alt="_texticonrmvideo_" title="_texticonrmvideo_">}
387_iconrmvideo_[v=1] {_texticonrmvideo_}
388
[10872]389_iconrtf_ {<img class="icon" src="_httpiconirtf_" width="_widthirtf_" height="_heightirtf_" alt="_texticonrtf_" title="_texticonrtf_">}
[2569]390_iconrtf_[v=1] {_texticonrtf_}
391
[10872]392_iconxls_ {<img class="icon" src="_httpiconixls_" width="_widthixls_" height="_heightixls_" alt="_texticonxls_" title="_texticonxls_">}
[2992]393_iconxls_[v=1] {_texticonxls_}
[1444]394
[148]395#######################################################################
396# Image links
397#
[128]398# These might include a link (not like an _icon_
[148]399#######################################################################
[128]400
401
[10872]402_imagegreenstone_ {<img class="icon" src="_httpicongsdl_" width="_widthgsdl_" height="_heightgsdl_" alt="_textdescrgreenstone_" title="_textdescrgreenstone_">}
[128]403
[10872]404_imagegreenstone_[v=1] {_textdescrgreenstone_}
[129]405
[12569]406###########################################################################
407# Metadata formatting stuff
408#
409#
410###########################################################################
411package format
412
413# _1_ is Year, _2_ is month, _3_ is day
414_date_ {_If_("_3_" ne "",_3_ )_If_("_2_" ne "",_textmonth_2__ )_If_("_1_" ne "",_1_)}
415
Note: See TracBrowser for help on using the repository browser.