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

Last change on this file since 29385 was 29385, checked in by kjdon, 10 years ago

added an http link macro for local (colleciton specific) depositor

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