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

Last change on this file since 27307 was 27150, checked in by ak19, 11 years ago

Shifting position of RSS link in GS2 to header area. Smaller icon. Changes to demo collection's extra.dm macro file, as the RSS link will appear on all pages in the header now the user specifies that it should appear. Moved the actual rsslink macro and javascript into nav_css which defines the header, rather than in base and style.dm where the rsslink macro and associated javacsript function were before'

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