source: trunk/gsdl/macros/build.dm@ 1363

Last change on this file since 1363 was 1363, checked in by sjboddie, 24 years ago

some tidying up of macro files for end-user collection building

  • Property svn:keywords set to Author Date Id Revision
File size: 37.7 KB
Line 
1package build
2
3_header_ {
4<html>
5<head>
6<title>_1_</title>
7</head>
8<body bgcolor="#ffffff" text="#000000" link="#006666"
9 alink="#cc9900" vlink="#666633">
10<table width=100%>
11 <tr>
12 <td><img src="_httpimg_/spacer.gif" width=2 height=77></td>
13 <td>_iconblankbar_
14 <center><h2>_1_</h2></center>
15 _iconblankbar_</td>
16 </tr>
17</table>
18}
19
20
21_footer_ {
22_iconblankbar_
23
24</body>
25</html>
26}
27
28
29_frameheader_ {
30<html>
31<head>
32<title>_1_</title>
33</head>
34}
35
36_framefooter_ {
37</html>
38}
39
40_wizardfooter_ {
41
42</body>
43</html>
44}
45
46_httpiconstop_ {_httpimg_/stop.gif}
47
48_iconwizardnext_{<img src="_httpiconmore_" align=absbottom
49width=_widthmore_ height=_heightmore_ border=0 alt="_texticonwizardnext_">}
50_iconwizardnext_[v=1] {_texticonwizardnext_}
51
52_iconwizardcurr_{<img src="_httpiconmore_" align=absbottom
53width=_widthmore_ height=_heightmore_ border=0 alt="_texticonwizardcurr_">}
54
55_iconwizardprev_{<img src="_httpiconless_" align=absbottom
56width=_widthless_ height=_heightless_ border=0 alt="_texticonwizardprev_">}
57_iconwizardprev_[v=1] {_texticonwizardprev_}
58
59_iconwizardreset_{<img src="_httpiconstop_" align=absbottom
60width=_widthstop_ height=_heightstop_ border=0 alt="_texticonwizardreset_">}
61_iconwizardreset_[v=1] {_texticonwizardreset_}
62
63_texticonwizardnext_ {to next page}
64_texticonwizardcurr_ {this page}
65_texticonwizardprev_ {to previous page}
66_texticonwizardreset_ {reset page}
67
68
69# new collection
70_bcargfullname_ {}
71_bcargcontactemail_ {}
72_bcargaboutdesc_ {}
73_bcargsrcformat_ {TEXT}
74_bcarginputdir_ {}
75_bcargcopydir_ {yes}
76_bcargingsdlarea_ {no}
77_bcargacronyms_ {off}
78_bcargrefine_ {}
79
80# delete collection
81_bcargfullnameindex_ {0}
82_bcargdeletearea_ {archives}
83_bcargdirname_ {}
84
85# build collection
86_bcargcopydata_ {false}
87_bcargdoimport_ {true}
88_bcargdobuild_ {true}
89
90
91_commonjavascript_ {
92 function simulate_get_action(args)
93 \{
94 var form = document.form;
95 args += "&bc1fullname=" + escape(form.bc1fullname.value);
96 args += "&bc1contactemail=" + escape(form.bc1contactemail.value);
97 args += "&bc1aboutdesc=" + escape(form.bc1aboutdesc.value);
98 args += "&bc1srcformat=" + escape(form.bc1srcformat.value);
99 args += "&bc1inputdir=" + escape(form.bc1inputdir.value);
100 args += "&bc1copydir=" + escape(form.bc1copydir.value);
101 args += "&bc1ingsdlarea=" + escape(form.bc1ingsdlarea.value);
102 args += "&bc1acronyms=" + escape(form.bc1acronyms.value);
103 args += "&bc1refine=" + escape(form.bc1refine.value);
104 args += "&wizard=" + escape(form.wizard.value);
105
106 document.location = args;
107 \}
108
109 function prev_page(new_wizard) \{
110 var form = document.form;
111 form.wizard.value = new_wizard;
112
113 simulate_get_action("_httpbuild_&bca=newcol");
114 \}
115}
116
117_wizardlink_ {
118<script language="javascript">
119 <!-- Hide code from non-js browsers
120 var bgcol = "";
121 var fgcol = "";
122 var text = "";
123
124 var wizard = "_wizard_";
125 if (wizard.match(/_1_/)) \{
126
127 if (wizard.match(/_1_$/)) \{
128 // change here to give current page different background
129 // to previous pages
130 bgcol = "bgcolor=\\"#cece00\\"";
131 fgcol = "color=\\"#006666\\"";
132 text = "_2_";
133 \}
134 else \{
135 bgcol = "bgcolor=\\"#ce9c00\\"";
136 fgcol = "color=\\"#006666\\"";
137 var page = "_1_";
138 var break_pt = wizard.indexOf(page) + page.length;
139 var wizard_direct = wizard.substring(0,break_pt);
140 text = "<a href=javascript:prev_page(\\""+wizard_direct+"\\")>_2_</a>";
141 \}
142
143
144 \}
145 else \{
146 fgcol = "color=\\"#006666\\"";
147 text = "_2_";
148 \}
149
150
151 document.writeln("<td "+bgcol+">");
152 document.writeln(" <font "+fgcol+">");
153 document.writeln(" "+text);
154 document.writeln(" </font>");
155 document.writeln("</td>");
156
157 // end hiding -->
158</script>
159}
160
161_wizardbar_ {
162<center>
163<table border=0 cellspacing=1 cellpadding=3>
164<tr bgcolor="#90c098">
165 <td bgcolor="#ffffff">
166 <font color="#000000">
167 Wizard page:
168 </font>
169 </td>
170 <td bgcolor="#ce9c00">
171 <font color="#006666">
172 <a href="_httpbuild_&bca=newcol">Reset</a>
173 </font>
174 </td>
175 _wizardlink_(textinfo,Textual information)
176 _wizardlink_(:source,Source data)
177 _wizardlink_(:archiveopts,Archive options)
178 _wizardlink_(:definished,Save)
179</tr>
180</table>
181</font>
182</center>
183}
184
185#---------------------------------------------------------------------------#
186# Create a new collection
187#---------------------------------------------------------------------------#
188
189_headmesstextinfo_ { New collection wizard: textual information }
190
191
192_contenttextinfo_ {
193
194
195<script language="javascript">
196
197 <!-- Hide code from non-js browsers
198 _commonjavascript_
199
200 function next_page() \{
201 _fullnamelist_
202 var form = document.form;
203
204 // check args
205 if (form.bc1fullname.value.match(/^\\s*$/))
206 \{
207 alert("Collection name needs to be specified");
208 form.bc1fullname.focus();
209 return;
210 \}
211 else if (form.bc1contactemail.value.match(/^\\s*$/))
212 \{
213 var mess = "Email address of the person responsible";
214 mess += " for the collection needs";
215 alert(mess);
216 form.bc1contactemail.focus();
217 return;
218 \}
219 else if (!form.bc1contactemail.value.match(/^([^@]+)@(.+)$/))
220 \{
221 alert("Please specify email address in the form: usename@domain");
222 form.bc1contactemail.focus();
223 return;
224 \}
225 else if (form.bc1aboutdesc.value.match(/^\\s*$/))
226 \{
227 alert("Description for about this collection needs to be specified");
228 form.bc1aboutdesc.focus();
229 return;
230 \}
231 var i;
232 for (i=0; i<fullnamelist.length; i++)
233 \{
234 var j;
235 for (j=0; j<fullnamelist[i].length; j++)
236 \{
237 var fn_re = "/"+fullnamelist[i][j]+"/i";
238 if (form.bc1fullname.value == fullnamelist[i][j])
239 \{
240 alert("Collection title already exists");
241 form.bc1fullname.focus();
242 return;
243 \}
244 \}
245 \}
246
247 // if control reached here then args check out
248 form.wizard.value += ":source";
249
250 simulate_get_action("_httpbuild_&bca=newcol");
251 \}
252 // end hiding -->
253
254
255</script>
256
257<center><table><tr><td>
258<form name="form" method="post" action="_gwcgi_" >
259<input type=hidden name="gsdlhome" value="_gsdlhome_">
260<input type=hidden name="a" value="bc">
261<input type=hidden name="bc" value="newcol">
262_hiddenargs_
263
264<input type=hidden name="bc1srcformat" value="_bcargsrcformat_">
265<input type=hidden name="bc1inputdir" value="_bcarginputdir_">
266<input type=hidden name="bc1copydir" value="_bcargcopydir_">
267<input type=hidden name="bc1ingsdlarea" value="_bcargingsdlarea_">
268<input type=hidden name="bc1acronyms" value="_bcargacronyms_">
269<input type=hidden name="bc1refine" value="_bcargrefine_">
270
271<center><table border=0 width=_pagewidth_><tr><td>
272
273<p>
274To create a new collection you are required to enter some preliminary
275information about the source data. This process is structured as a series
276of Web pages, overseen by the new-collection &quot;wizard.&quot The wizard
277bar at the bottom of the page shows you the sequence of pages to be
278completed. You can return to a previous page by clicking on the
279corresponding item in the wizard bar.
280
281<p>_iconblankbar_<br><br>
282<h4>Title for collection:</h4>
283<input type="text" name="bc1fullname" value="_bcargfullname_") size=72>
284<br>
285<font color="#909090">
286The collection title is a text phrase that encapsulates the content of the
287collection and is used throughout the digital library. Example titles
288include &quot;Computer Science Technical Reports&quot; and &quot;Humanity
289Development Library.&quot;
290</font>
291
292<h4>Contact email address:</h4>
293<input type="text" name="bc1contactemail" value="_bcargcontactemail_" size=72>
294<br>
295<font color="#909090">
296This email address specifies the first point of contact for the collection.
297If the collection software detects a problem, then a diagnostic report is
298sent to this address. Enter an email address in its full form:
299<tt>name@domain</tt>.
300</font>
301
302<h4>About this collection:</h4>
303<textarea name="bc1aboutdesc" cols=72 rows=6
304 wrap=physical>_bcargaboutdesc_</textarea>
305<br>
306<font color="#909090">
307A statement describing the principles governing what is included in the collection.
308</font>
309
310</td></tr>
311<tr><td align=right>
312<br><br><a href="javascript:next_page();">Next page_iconwizardnext_</a>
313</td></tr>
314</table></center>
315</form>
316</td></tr></table></center>
317
318_wizardbar_
319}
320
321
322#---------------------------------------------------------------------------#
323
324_headmesssource_ { New collection wizard: source data }
325
326_contentsource_ {
327
328
329<script language="javascript">
330
331 <!-- Hide code from non-js browsers
332 _commonjavascript_
333
334 function next_page() \{
335 _fullnamelist_
336 var form = document.form;
337 if (form.bc1inputdir.value.match(/^\\s*$/))
338 \{
339 alert("Directory for source files needs to be specified");
340 form.bc1inputdir.focus();
341 return;
342 \}
343
344 // work out the next newcol "wizard" page
345 var prefix_re
346 = new RegExp(form.gsdlhome.value + "/collect/([^/]+)/(import|archive)");
347
348 if (form.bc1inputdir.value.match(prefix_re))
349 \{
350 form.bc1ingsdlarea.value = "yes";
351 if (form.bc1inputdir.value != "_bcarginputdir_")
352 \{
353 // input dir has been changed
354 form.bc1copydir.value = "no";
355 \}
356 \}
357 else
358 \{
359 form.bc1ingsdlarea.value = "no";
360 \}
361 form.wizard.value += ":archiveopts";
362
363 simulate_get_action("_httpbuild_&bca=newcol");
364 \}
365
366
367 function srcformat_changed() \{
368 var form = document.form;
369 var sf_index = form.bc1srcformatmenu.selectedIndex;
370 var sf_choice = form.bc1srcformatmenu.options[sf_index].value;
371 form.bc1srcformat.value = sf_choice;
372 \}
373
374 // end hiding -->
375
376</script>
377
378<center><table><tr><td>
379<form name="form" method="post" action="_gwcgi_">
380<input type=hidden name="gsdlhome" value="_gsdlhome_">
381<input type=hidden name="a" value="bc">
382<input type=hidden name="bc" value="newcol">
383_hiddenargs_
384
385<input type=hidden name="bc1fullname" value="_bcargfullname_")>
386<input type=hidden name="bc1contactemail" value="_bcargcontactemail_")>
387<input type=hidden name="bc1aboutdesc" value="_bcargaboutdesc_")>
388<input type=hidden name="bc1copydir" value="_bcargcopydir_">
389<input type=hidden name="bc1ingsdlarea" value="_bcargingsdlarea_">
390<input type=hidden name="bc1acronyms" value="_bcargacronyms_">
391<input type=hidden name="bc1refine" value="_bcargrefine_">
392
393<center><table border=0 width=_pagewidth_><tr><td>
394
395<h4>Type of data:</h4>
396<input type="hidden" name="bc1srcformat" value="_bcargsrcformat_">
397<select name="bc1srcformatmenu" onChange=srcformat_changed()>
398<option value="TEXT" _If_("_bcargsrcformat_" eq "TEXT",selected)>Plain TEXT&nbsp;&nbsp;(.txt)
399<option value="HTML" _If_("_bcargsrcformat_" eq "HTML",selected)>HTML&nbsp;&nbsp;(.htm, html)
400<option value="EMAIL" _If_("_bcargsrcformat_" eq "EMAIL",selected)>E-mail&nbsp;&nbsp;(.email)
401</select>
402<br>
403<font color="#909090">
404This pull-down menu specifies the type of file format the source data is
405in: TEXT for plain text documents, HTML for Web pages and so for. Also
406listed in the pull-down menu are the permissible file names extensions (for
407instance <tt>.htm</tt> and <tt>.html</tt>) for the source files (Web pages
408in this case).
409</font>
410
411<h4>Input directory:</h4>
412<input type=text name="bc1inputdir" value="_bcarginputdir_" size=72>
413<br>
414<font color="#909090">
415The input directory specifies where on the local disk the source data is
416located.
417</font>
418
419</td></tr>
420<tr><td align=right><br><br>
421<a href="javascript:next_page();">Next page_iconwizardnext_</a>
422</td></tr></table></center>
423</form>
424</td></tr></table></center>
425
426_wizardbar_
427}
428
429
430
431#---------------------------------------------------------------------------#
432
433_headmessarchiveopts_ { New collection wizard: archive options }
434
435_contentarchiveopts_ {
436
437
438<script language="javascript">
439
440 <!-- Hide code from non-js browsers
441 _commonjavascript_
442
443 function next_page() \{
444 _fullnamelist_
445 var form = document.form;
446
447 form.wizard.value += ":definished";
448
449 simulate_get_action("_httpbuild_&bca=newcol");
450 \}
451
452
453 function copydir_changed() \{
454 var form = document.form;
455 var cd_index = form.bc1copydirmenu.selectedIndex;
456 var cd_choice = form.bc1copydirmenu.options[cd_index].value;
457 form.bc1copydir.value = cd_choice;
458 \}
459 // end hiding -->
460
461
462</script>
463
464<center><table><tr><td>
465<form name="form" method="post" action="_gwcgi_">
466<input type=hidden name="gsdlhome" value="_gsdlhome_">
467<input type=hidden name="a" value="bc">
468<input type=hidden name="bc" value="newcol">
469_hiddenargs_
470
471<input type=hidden name="bc1fullname" value="_bcargfullname_")>
472<input type=hidden name="bc1contactemail" value="_bcargcontactemail_")>
473<input type=hidden name="bc1aboutdesc" value="_bcargaboutdesc_")>
474<input type=hidden name="bc1srcformat" value="_bcargsrcformat_">
475<input type=hidden name="bc1inputdir" value="_bcarginputdir_">
476<input type=hidden name="bc1ingsdlarea" value="_bcargingsdlarea_">
477<input type=hidden name="bc1acronyms" value="_bcargacronyms_">
478<input type=hidden name="bc1refine" value="_bcargrefine_">
479
480<center><table border=0 width=_pagewidth_><tr><td>
481
482<h4>Copy data:</h4>
483<input type="hidden" name="bc1copydir" value="_bcargcopydir_">
484<select name="bc1copydirmenu" onChange=copydir_changed()>
485 <option value="yes" _If_("_bcargcopydir_" eq "yes",selected)>Yes, make a local copy for the digital library
486 <option value="no" _If_("_bcargcopydir_" eq "no",selected)>No, form a link in digital library to source data
487</select>
488<br>
489<font color="#909090">
490_If_("_bcargingsdlarea_" eq "yes",
491The input directory <tt>_bcarginputdir_</tt> is internal to the
492Greenstone collection file area. In this situation the default
493behaviour is to build the collection directly from this
494source data. Use the pull-down menu to alter this behaviour.
495,
496The input directory <tt>_bcarginputdir_</tt> is external to the
497Greenstone collection file area. Use this pull-down menu to
498control whether or not a copy of the data is made for collection
499building purposes.
500)
501Note, once a collection has been built it is not necessary for the source
502data to remain in the Greenstone collection area -- the collection can be
503safely accessed, browsed and searched without this. If you wish, however,
504to make changes to the collection and then rebuild, the source data must
505still be available.
506</font>
507
508</td></tr>
509<tr><td align=right><br><br>
510<a href="javascript:next_page();">Next page_iconwizardnext_</a>
511</td></tr>
512</table></center>
513</form>
514</td></tr></table></center>
515
516_wizardbar_
517}
518
519#---------------------------------------------------------------------------#
520
521_headmessdefinished_ { New collection wizard: data entry finished }
522
523_contentdefinished_ {
524
525
526<script language="javascript">
527
528 <!-- Hide code from non-js browsers
529 _commonjavascript_
530
531 function save() \{
532 _fullnamelist_
533 var form = document.form;
534
535 var bc1refine = "";
536 if (form.bc1acronyms == "on") \{
537 bc1refine += "AcronymPlug ";
538 \}
539
540 form.wizard.value += ":definished";
541
542 var cgi_prefix = "webpage_mkcol.pl";
543 cgi_prefix += "?httpbuild=" + escape("_httpbuild_");
544 cgi_prefix += "&bc1refine=" + escape(bc1refine);
545
546 simulate_get_action(cgi_prefix);
547 \}
548 // end hiding -->
549
550
551</script>
552
553<center><table><tr><td>
554<form name="form" method="post" action="_gwcgi_">
555<input type=hidden name="gsdlhome" value="_gsdlhome_">
556<input type=hidden name="a" value="bc">
557<input type=hidden name="bc" value="newcol">
558_hiddenargs_
559
560<input type=hidden name="bc1fullname" value="_bcargfullname_")>
561<input type=hidden name="bc1contactemail" value="_bcargcontactemail_")>
562<input type=hidden name="bc1aboutdesc" value="_bcargaboutdesc_")>
563<input type=hidden name="bc1srcformat" value="_bcargsrcformat_">
564<input type=hidden name="bc1inputdir" value="_bcarginputdir_">
565<input type=hidden name="bc1copydir" value="_bcargcopydir_">
566<input type=hidden name="bc1ingsdlarea" value="_bcargingsdlarea_">
567<input type=hidden name="bc1acronyms" value="_bcargacronyms_">
568<input type=hidden name="bc1refine" value="_bcargrefine_">
569
570<center><table border=0 width=_pagewidth_><tr><td>
571<p>
572This concludes the data entry required to create a new collection.
573<p>
574Select "finish" to save your collection info and create the collection or
575select from the wizard bar to go back and change any of your previous
576selections.
577</td></tr>
578
579<tr><td align=right><br><br>
580<a href="javascript:save();">finish_iconwizardnext_</a>
581</td></tr>
582</table></center>
583</form>
584</td></tr></table></center>
585
586_wizardbar_
587}
588
589#---------------------------------------------------------------------------#
590# Edit a collection
591#---------------------------------------------------------------------------#
592
593_headmesseditcol_ { Edit a collection }
594
595
596_contenteditcol_ {
597
598
599<script language="javascript">
600
601 <!-- Hide code from non-js browsers
602 function simulate_get_action(args)
603 \{
604 var form = document.form;
605
606// args += "&bc1fullnameindex=" + escape(form.bc1fullnameindex.value);
607 args += "&bc1dirname=" + escape(form.bc1dirname.value);
608
609 document.location = args;
610 \}
611
612 function save() \{
613 _dirnamelist_
614 var form = document.form;
615
616 var fn_index = form.bc1fullnameindex.value;
617 var fullname = form.bc1fullnamemenu.options[fn_index].value;
618 form.bc1dirname.value = dirnamelist[fn_index];
619
620 var do_save = true;
621 if (form.bc1cfgfile.value.match(/^\\s*$/))
622 \{
623 var confirm_mess = "Configuration data to \\"" + fullname + "\\"";
624 confirm_mess += " is empty. Are you sure you want to save?";
625
626 do_save = confirm(confirm_mess);
627 \}
628 if (do_save)
629 \{
630// var cgi_prefix = "webpage_editcol.pl";
631// cgi_prefix += "?httpbuild=" + escape("_httpbuild_");
632// cgi_prefix += "&bc1cfgfile=" + escape(form.bc1cfgfile.value);
633
634// simulate_get_action(cgi_prefix);
635
636 // need to do it this way so POST method is used (as IE can't
637 // handle large config files sent in URL)
638 form.action = "webpage_editcol.pl";
639 form.submit();
640
641 \}
642 \}
643
644 function fullnameindex_changed() \{
645 _dirnamelist_
646 var form = document.form;
647
648 var fn_index = form.bc1fullnamemenu.selectedIndex;
649 form.bc1fullnameindex.value = form.bc1fullnamemenu.selectedIndex;
650 form.bc1dirname.value = dirnamelist[fn_index];
651
652 var cgi_prefix = "_httpbuild_&bca=editcol";
653 simulate_get_action(cgi_prefix);
654 \}
655
656 // end hiding -->
657
658</script>
659
660<form name="form" method="post" action="_gwcgi_" >
661<input type=hidden name="gsdlhome" value="_gsdlhome_">
662<input type=hidden name="a" value="bc">
663<input type=hidden name="bc" value="editcol">
664<input type=hidden name="httpbuild" value="_httpbuild_">
665_hiddenargs_
666
667
668<p> To edit the configuration settings for collection, first choose the
669collection to edit through the pulldown menu, then edit the data that
670appears. To commit your changes to disk, click on &quot;Save configuration
671data&quot;.
672
673<br><p>
674<font color="#909090">
675Use the pull-down menu below to specify the collection to edit.
676</font>
677<br>_fullnamemenu_
678<input type="hidden" name="bc1dirname" value="_bcargdirname_">
679
680<br><p>
681<font color="#909090">
682Alter the data below to change the configuration settings for the selected
683collection. Click on &quot;Save configuration data&quot; to commit your
684changes to disk.
685</font>
686<br>
687<center>
688<textarea name="bc1cfgfile" cols=72 rows=18 wrap=off>_cfgfile_</textarea>
689</center>
690
691<br>
692<center>
693<table border=0>
694 <tr>
695 <td>
696 &nbsp;<a href="_httpbuild_&bca=editcol">_iconwizardreset_Reset page</a>
697 </td>
698 <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
699 <td>
700 <a href="javascript:save();">Save configuration data_iconwizardnext_</a>&nbsp;<br>
701 <a href="_httpbuild_&bca=mess&head=_headnosave_&mess=_messnosave_&bc1dirname=_bcargdirname_">Don't
702 Save configuration data_iconwizardnext_</a>&nbsp;
703 </td>
704 </tr>
705</table>
706</form>
707</center>
708}
709
710
711#---------------------------------------------------------------------------#
712# Rebuild a collection
713#---------------------------------------------------------------------------#
714
715_headmessbuildcol_ { Rebuild a collection }
716
717
718_allowcopydatano_ {
719 <td>
720 <input type=radio name="bc1copydataradio" value=false
721 _If_("_bcargcopydata_" eq "false", checked)
722 onClick=document.form.bc1copydata.value=false>No
723 </td>
724}
725
726_copydatatext_ {
727<tr>
728 <td>Copy data:</td>
729 <td>
730 <input type=hidden name="bc1copydata" value="_bcargcopydata_">
731 <input type=radio name="bc1copydataradio" value=true
732 _If_("_bcargcopydata_" eq "true", checked)
733 onClick=document.form.bc1copydata.value=true>Yes
734 </td>
735 _If_("_bcargfirsttime_" eq "false",_allowcopydatano_)
736</tr>
737<tr>
738 <td></td>
739 <td colspan=3>
740 <font color="#909090">
741 <p> Copying the data is necessary the very first time the collection is
742 built. Subsequent builds do not need this option selected, unless new
743 data has been added to the original data, in which case the data should
744 be recopied.
745 </font>
746 </td>
747</tr>
748}
749
750_contentbuildcol_ {
751
752
753<script language="javascript">
754
755 <!-- Hide code from non-js browsers
756 function simulate_get_action(args)
757 \{
758 var form = document.form;
759
760// args += "&bc1fullnameindex=" + escape(form.bc1fullnameindex.value); //****
761 args += "&bc1dirname=" + escape(form.bc1dirname.value);
762 args += "&bc1copydata=" + escape(form.bc1copydata.value);
763 args += "&bc1doimport=" + escape(form.bc1doimport.value);
764 args += "&bc1dobuild=" + escape(form.bc1dobuild.value);
765
766 document.location = args;
767 \}
768
769 function build() \{
770 _dirnamelist_
771 var form = document.form;
772
773 var fn_index = form.bc1fullnameindex.value;
774 var fullname = form.bc1fullnamemenu.options[fn_index].value;
775
776 form.bc1dirname.value = dirnamelist[fn_index];
777
778 var cgi_prefix = "_httpbuild_&bca=buildcol";
779 cgi_prefix += "&httpbuild=" + escape("_httpbuild_");
780 cgi_prefix += "&wizard=buildframe";
781
782 simulate_get_action(cgi_prefix);
783 \}
784
785 function fullnameindex_changed() \{
786 _dirnamelist_
787
788 var form = document.form;
789 var fn_index = form.bc1fullnamemenu.selectedIndex;
790 form.bc1fullnameindex.value = form.bc1fullnamemenu.selectedIndex;
791 form.bc1dirname.value = dirnamelist[fn_index];
792
793 var cgi_prefix = "_httpbuild_&bca=buildcol";
794 cgi_prefix += "&httpbuild=" + escape("_httpbuild_");
795 cgi_prefix += "&wizard=buildcol";
796
797 simulate_get_action(cgi_prefix);
798 \}
799
800 // end hiding -->
801
802</script>
803
804<center><table><tr><td>
805<form name="form" method="post" action="_gwcgi_" >
806<input type=hidden name="gsdlhome" value="_gsdlhome_">
807<input type=hidden name="a" value="bc">
808<input type=hidden name="bc" value="buildcol">
809_hiddenargs_
810
811
812<table border=0>
813<tr>
814 <td colspan=4>
815 Building a collection is a multi-staged process. After selecting the
816 collection you wish to be built, you must specify which stages of
817 the building process you want executed.
818 _If_(_win32_,
819 <p><font color="#B00000">
820 <blockquote>It is recommended that you close all other windows and applications
821 while building a collection as they may interfere with the building
822 process.
823 </blockquote></font>)
824 <br>
825 </td>
826</tr>
827
828
829<tr>
830 <td>Collection to rebuild:</td>
831 <td colspan=3>
832 _fullnamemenu_
833 <input type="hidden" name="bc1dirname" value="_bcargdirname_">
834 </td>
835<tr>
836 <td></td>
837 <td colspan=3>
838 <font color="#909090">
839 Select from the pull-down menu the collection you wish to rebuild.
840 </font>
841 </td>
842</tr>
843
844
845_If_("_bcargcopydir_" eq "yes",
846 _copydatatext_
847 ,
848 <input type=hidden name="bc1copydata" value="false">
849)
850
851
852<tr>
853 <td>Cache intermediate data:</td>
854 <td>
855 <input type=hidden name="bc1doimport" value="_bcargdoimport_">
856 <input type=radio name="bc1doimportradio" value=true
857 _If_("_bcargdoimport_" eq "true", checked)
858 onClick=document.form.bc1doimport.value=true>Yes
859 </td>
860 <td>
861 <input type=radio name="bc1doimportradio" value=false
862 _If_("_bcargdoimport_" eq "false", checked)
863 onClick=document.form.bc1doimport.value=false>No
864 </td>
865</tr>
866<tr>
867 <td></td>
868 <td colspan=3>
869 <font color="#909090">
870 <p> To speed up the collection building process, intermediate data can be
871 cached to file. Set this option to &quot;yes&quot; (the default) unless
872 the collection is prohibitively large or the amount of available disk space
873 is small.
874 </font>
875 </td>
876</tr>
877
878<tr>
879 <td>Create indexes:</td>
880 <td>
881 <input type=hidden name="bc1dobuild" value="_bcargdobuild_">
882 <input type=radio name="bc1dobuildradio" value=true
883 _If_("_bcargdobuild_" eq "true", checked)
884 onClick=document.form.bc1dobuild.value=true>Yes
885 </td>
886 <td>
887 <input type=radio name="bc1dobuildradio" value=false
888 _If_("_bcargdobuild_" eq "false", checked)
889 onClick=document.form.bc1dobuild.value=false>No
890 </td>
891</tr>
892<tr>
893 <td></td>
894 <td colspan=3>
895 <font color="#909090">
896 <p> The final stage of building a collection is the creation of the indexes.
897 Except in very unusual circumstances this option should be
898 set to &quot;yes&quot; (the default).
899 </font>
900 </td>
901</tr>
902
903
904
905<tr><td><p>&nbsp;</td></tr>
906<tr><td colspan=4 align=middle>
907 &nbsp;<a href="_httpbuild_&bca=buildcol">_iconwizardreset_Reset page</a>&nbsp;&nbsp;&nbsp;&nbsp;
908 <a href="javascript:build();">Rebuild collection_iconwizardnext_</a>&nbsp;
909</table>
910</form>
911</td></tr></table></center>
912
913}
914
915
916#---------------------------------------------------------------------------#
917
918_headmessbuildframe_ { Executing build commands }
919
920_contentbuildframe_ {
921
922<frameset rows="200,150,*" border=0>
923 <noframes><body bgcolor="#ffffff">
924 <p>You must have a frame enabled browser to view this.</p>
925 </body>
926 </noframes>
927 <frame src="_httpbuild_&bca=buildcol&wizard=buildexec&bc1dirname=_bcargdirname_&bc1tmpname=_bcargtmpname_" name=infoframe>
928 <frame src="_httpbuild_&bca=buildstatus&bc1tmpname=_bcargtmpname_" name=execframe>
929 <frame src="_httpbuild_&bca=blankpage" name=blankframe>
930</frameset>
931}
932
933#---------------------------------------------------------------------------#
934
935_headmessbuildexec_ { Executing build commands }
936
937
938_contentbuildexec_ {
939
940
941<script language="javascript">
942
943 <!-- Hide code from non-js browsers
944 var timer = 10;
945 function restart_count_down() \{
946 timer=10;
947 setTimeout("count_down()",1000);
948 \}
949
950 function count_down() \{
951 if (timer==0)
952 \{
953 update_status_page();
954 \}
955 else
956 \{
957 window.status = "Building status update in "+timer+" seconds";
958 timer--;
959 setTimeout("count_down()",1000);
960 \}
961 \}
962
963 function update_status_page() \{
964 var cgi_cmd = "webpage_buildstatus.pl";
965 cgi_cmd += "?httpbuild=" + escape("_httpbuild_");
966 cgi_cmd += "&bc1dirname=" + escape("_bcargdirname_");
967 cgi_cmd += "&bc1tmpname=" + escape("_bcargtmpname_");
968 parent.execframe.document.location = cgi_cmd;
969
970 var finished = document.form.bc1finished.value;
971 if (finished==0)
972 \{
973// setTimeout("update_status_page()",5000); //****
974// setTimeout("count_down()",1000);
975 restart_count_down();
976 \}
977 else
978 \{
979 var cgi_cmd = "_httpbuild_&bca=mess";
980 if (finished>0)
981 \{
982 cgi_cmd += "&head=_headdone_&mess=_messdonebuildcol_";
983 \}
984 else
985 \{
986 cgi_cmd += "&head=_headerror_&mess=_messerrorbuildcol_";
987 \}
988
989 cgi_cmd += "&httpbuild=" + escape("_httpbuild_");
990 cgi_cmd += "&bc1dirname=" + escape("_bcargdirname_");
991 parent.document.location = cgi_cmd;
992 \}
993 \}
994
995 // end hiding -->
996
997</script>
998
999<center><table><tr><td>
1000<form name="form" method="post" action="_gwcgi_" >
1001<!-- <input type=hidden name="gsdlhome" value="_gsdlhome_">
1002<input type=hidden name="httpbuild" value="_httpbuild_"> ********* and others !!! -->
1003<input type=hidden name="a" value="bc">
1004<input type=hidden name="bc" value="buildcol">
1005_hiddenargs_
1006
1007<input type=hidden name="bc1finished" value=0>
1008
1009
1010
1011<table border=0>
1012<tr>
1013 <td colspan=4>
1014 The collection is now being built. See the building status line
1015 below for feedback on how the operation is progressing.
1016 </td>
1017</tr>
1018
1019</table>
1020</form>
1021</td></tr></table></center>
1022
1023<script language="javascript">
1024 <!-- Hide code from non-js browsers
1025 update_status_page();
1026 // end hiding -->
1027</script>
1028
1029}
1030
1031package buildstatus
1032
1033_header_ {
1034<html>
1035<head>
1036<title>Building status</title>
1037</head>
1038<body bgcolor="#ffffff" text="#000000" link="#006666"
1039 alink="#cc9900" vlink="#666633">
1040<h3>Building status:</h3>
1041}
1042
1043_footer_ {
1044</body>
1045</html>
1046}
1047
1048_content_ {
1049
1050<script language="javascript">
1051 <!-- Hide code from non-js browsers
1052 if (parent.infoframe.document.form) // form loaded
1053 \{
1054 parent.infoframe.document.form.bc1finished.value = "_build:bcargfinished_";
1055 \}
1056 // end hiding -->
1057</script>
1058
1059 _contentpara_
1060}
1061
1062
1063#---------------------------------------------------------------------------#
1064# Delete a collection
1065#---------------------------------------------------------------------------#
1066
1067package build
1068
1069_headmessdelcol_ { Delete a collection }
1070
1071
1072_contentdelcol_ {
1073
1074
1075<script language="javascript">
1076
1077 <!-- Hide code from non-js browsers
1078 function simulate_get_action(args)
1079 \{
1080 var form = document.form;
1081
1082// args += "&bc1fullnameindex=" + escape(form.bc1fullnameindex.value);
1083 args += "&bc1dirname=" + escape(form.bc1dirname.value);
1084 args += "&bc1deletearea=" + escape(form.bc1deletearea.value);
1085
1086 document.location = args;
1087 \}
1088
1089 function delete_area() \{
1090 _dirnamelist_
1091 var form = document.form;
1092
1093 var fn_index = form.bc1fullnameindex.value;
1094 var fullname = form.bc1fullnamemenu.options[fn_index].value;
1095 var deletearea = form.bc1deletearea.value;
1096
1097 form.bc1dirname.value = dirnamelist[fn_index];
1098
1099 var da_mess = "";
1100 if (deletearea == "archives") \{ da_mess = "cached building data"; \}
1101 else if (deletearea == "import") \{ da_mess = "source data"; \}
1102 else \{ da_mess = "all data"; \}
1103
1104 var confirm_mess = "Confirm deletion of \\"" + da_mess + "\\"";
1105 confirm_mess += " from \\"the " + fullname + " collection\\"";
1106
1107 var do_delete = confirm(confirm_mess);
1108 if (do_delete)
1109 \{
1110 var cgi_prefix = "webpage_delcol.pl";
1111 cgi_prefix += "?httpbuild=" + escape("_httpbuild_");
1112
1113 simulate_get_action(cgi_prefix);
1114 \}
1115 \}
1116
1117 function fullnameindex_changed() \{
1118 var form = document.form;
1119 var fn_index = form.bc1fullnamemenu.selectedIndex;
1120 form.bc1fullnameindex.value = form.bc1fullnamemenu.selectedIndex;
1121 \}
1122
1123 // end hiding -->
1124
1125</script>
1126
1127<center><table><tr><td>
1128<form name="form" method="post" action="_gwcgi_" >
1129<input type=hidden name="gsdlhome" value="_gsdlhome_">
1130<input type=hidden name="a" value="bc">
1131<input type=hidden name="bc" value="delcol">
1132_hiddenargs_
1133
1134
1135<table border=0>
1136<tr>
1137 <td colspan=4>
1138 Deletion of data from a collection can be selective or all
1139 encompassing. Use the options below to specify the required
1140 deletion operation.
1141 </td>
1142</tr>
1143
1144
1145<tr>
1146 <td>Collection to delete:</td>
1147 <td colspan=3>
1148 _fullnamemenu_
1149 <input type="hidden" name="bc1dirname" value="_bcargdirname_">
1150 </td>
1151<tr>
1152 <td></td>
1153 <td colspan=3>
1154 <font color="#909090">
1155 Use this pull-down menu to target the collection that has files deleted.
1156 </font>
1157 </td>
1158</tr>
1159
1160<tr>
1161 <td>Type of data to delete:</td>
1162 <td>
1163 <input type=hidden name="bc1deletearea" value="_bcargdeletearea_">
1164 <input type=radio name="bc1deletearearadio" value="archives"
1165 onClick=document.form.bc1deletearea.value="archives"
1166 _If_("_bcargdeletearea_" eq "archives", checked)
1167 _If_("_bcargdeletearea_" eq "", checked)> cached data
1168 </td>
1169 <td>
1170 <input type=radio name="bc1deletearearadio" value="import"
1171 onClick=document.form.bc1deletearea.value="import"
1172 _If_('"_bcargdeletearea_" eq "import"', checked)> cached and source data
1173 </td>
1174 <td>
1175 <input type=radio name="bc1deletearearadio" value="all"
1176 onClick=document.form.bc1deletearea.value="all"
1177 _If_('"_bcargdeletearea_" eq "all"', checked)> all data
1178 </td>
1179</tr>
1180<tr>
1181 <td></td>
1182 <td colspan=3>
1183 <font color="#909090">
1184 There are three levels to deletion: cached data; cached and
1185 source data; and all data.
1186
1187 <p> Cached data is generated during
1188 a building operation, and is superfluous to a collection that
1189 is &quot;live&quot;. Keeping this data, however, can save
1190 time if the only required step in a rebuild is index creation.
1191
1192 <p> Source data, like cached data, is superflous to a collection
1193 that is &quot;live&quot;. However, you must keep this data if
1194 you intend to rebuild the collection in the future.
1195
1196 <p> The final level to collection deletion is delete &quot;all data&quot;
1197 Selecting this option removes all traces of the collection
1198 from the digital library.
1199
1200 </font>
1201 </td>
1202</tr>
1203
1204
1205<tr><td><p>&nbsp;</td></tr>
1206<tr><td colspan=4 align=middle>
1207 &nbsp;<a href="_httpbuild_&bca=delcol">_iconwizardreset_Reset page</a>&nbsp;&nbsp;&nbsp;&nbsp;
1208 <a href="javascript:delete_area();">Delete specified data_iconwizardnext_</a>&nbsp;
1209</table>
1210</form>
1211</td></tr></table></center>
1212
1213}
1214
1215
1216
1217_headmesscollog_ { Collection Build Log }
1218
1219
1220_contentcollog_ {
1221<pre>
1222_bldfile_
1223</pre>
1224}
1225
1226
1227package buildmess
1228
1229_headmess_ {}
1230_headdone_ {Successful Operation}
1231_headnosave_ {Configuration Unchanged}
1232_headerror_ {Error Encountered}
1233
1234_messdonenewcol_ {
1235 <p> Configuration of the new collection was successfully saved.
1236 Would you like to:
1237 <ul>
1238 <li><a href="_httpbuild_&bca=newcol">Create a new
1239 collection_build:iconwizardnext_</a>
1240 <li><a href="_httpbuild_&bca=editcol&bc1dirname=_build:bcargdirname_">Edit
1241 this collection's configuration file_build:iconwizardnext_</a>
1242 <li><a href="_httpbuild_&bca=buildcol&bc1dirname=_build:bcargdirname_">Build
1243 this collection_build:iconwizardnext_</a>
1244 <li><a href="_httpbuild_&bca=delcol">Delete data from a
1245 collection_build:iconwizardnext_</a>
1246 <li><a href="_httppagehome_" target="_top">Return to the Greenstone home
1247 page_build:iconwizardnext_</a>
1248 </ul>
1249}
1250
1251_messdoneeditcol_ {
1252 <p> Configuration of collection successfully updated.
1253 Would you like to:
1254 <ul>
1255 <li><a href="_httppageabout_&c=_build:bcargdirname_" target="_top">Access
1256 this collection_build:iconwizardnext_</a>
1257 <li><a href="_httpbuild_&bca=newcol">Create a new
1258 collection_build:iconwizardnext_</a>
1259 <li><a href="_httpbuild_&bca=editcol&bc1dirname=_build:bcargdirname_">Edit
1260 this collection's configuration file_build:iconwizardnext_</a>
1261 <li><a href="_httpbuild_&bca=buildcol&bc1dirname=_build:bcargdirname_">Build
1262 this collection_build:iconwizardnext_</a>
1263 <li><a href="_httpbuild_&bca=delcol">Delete data from a
1264 collection_build:iconwizardnext_</a>
1265 <li><a href="_httppagehome_" target="_top">Return to the Greenstone home
1266 page_build:iconwizardnext_</a>
1267 </ul>
1268}
1269
1270_messnosave_ {
1271 <p> Configuration unchanged.
1272 Would you like to:
1273 <ul>
1274 <li><a href="_httppageabout_&c=_build:bcargdirname_" target="_top">Access
1275 this collection_build:iconwizardnext_</a>
1276 <li><a href="_httpbuild_&bca=newcol">Create a new
1277 collection_build:iconwizardnext_</a>
1278 <li><a href="_httpbuild_&bca=editcol&bc1dirname=_build:bcargdirname_">Edit
1279 this collection's configuration file_build:iconwizardnext_</a>
1280 <li><a href="_httpbuild_&bca=buildcol&bc1dirname=_build:bcargdirname_">Build
1281 this collection_build:iconwizardnext_</a>
1282 <li><a href="_httpbuild_&bca=delcol">Delete data from a
1283 collection_build:iconwizardnext_</a>
1284 <li><a href="_httppagehome_" target="_top">Return to the Greenstone home
1285 page_build:iconwizardnext_</a>
1286 </ul>
1287}
1288
1289_messdonebuildcol_ {
1290 <p> The collection has been successfully built.
1291 Would you like to:
1292 <ul>
1293 <li><a href="_httppageabout_&c=_build:bcargdirname_" target="_top">Access
1294 the newly built collection_build:iconwizardnext_</a>
1295 <li><a href="_httpbuild_&bca=collog&bc1dirname=_build:bcargdirname_">View
1296 the build log for this collection_build:iconwizardnext_</a>
1297 <li><a href="_httpbuild_&bca=newcol">Create a new
1298 collection_build:iconwizardnext_</a>
1299 <li><a href="_httpbuild_&bca=editcol&bc1dirname=_build:bcargdirname_">Edit
1300 this collection's configuration file_build:iconwizardnext_</a>
1301 <li><a href="_httpbuild_&bca=buildcol&bc1dirname=_build:bcargdirname_">Rebuild
1302 this collection_build:iconwizardnext_</a>
1303 <li><a href="_httpbuild_&bca=delcol">Delete data from a
1304 collection_build:iconwizardnext_</a>
1305 <li><a href="_httppagehome_" target="_top">Return to the Greenstone home
1306 page_build:iconwizardnext_</a>
1307 </ul>
1308}
1309
1310_messdonedelcol_ {
1311 <p> Files successfully deleted. Would you like to:
1312 <ul>
1313 <li><a href="_httpbuild_&bca=newcol">Create a new
1314 collection_build:iconwizardnext_</a>
1315 <li><a href="_httpbuild_&bca=editcol">Edit
1316 a collection's configuration file_build:iconwizardnext_</a>
1317 <li><a href="_httpbuild_&bca=buildcol">Build
1318 a collection_build:iconwizardnext_</a>
1319 <li><a href="_httpbuild_&bca=delcol">Delete data from another
1320 collection_build:iconwizardnext_</a>
1321 <li><a href="_httppagehome_" target="_top">Return to the Greenstone home
1322 page_build:iconwizardnext_</a>
1323 </ul>
1324}
1325
1326_messnofn_ {
1327 <p> <center>Empty collection title</center> }
1328
1329_messconfigexists_ {
1330 <p> <center>A configuration file already exists for this collection.</center> }
1331
1332_messerrorbuildcol_ {
1333 <p> An error was encountered during the building operation, and
1334 consequently the generated files have not been
1335 transfered to the &quot;live&quot; collection. Would you like to:
1336
1337 <ul>
1338 <li><a href="_httppageabout_&c=_build:bcargdirname_" target="_top">Access
1339 the existing collection_build:iconwizardnext_</a>
1340 <li><a href="_httpbuild_&bca=newcol">Create a new
1341 collection_build:iconwizardnext_</a>
1342 <li><a href="_httpbuild_&bca=editcol&bc1dirname=_build:bcargdirname_">Edit
1343 this collection's configuration file_build:iconwizardnext_</a>
1344 <li><a href="_httpbuild_&bca=buildcol&bc1dirname=_build:bcargdirname_">Rebuild
1345 this collection_build:iconwizardnext_</a>
1346 <li><a href="_httpbuild_&bca=delcol">Delete data from a
1347 collection_build:iconwizardnext_</a>
1348 <li><a href="_httppagehome_" target="_top">Return to the Greenstone home
1349 page_build:iconwizardnext_</a>
1350 </ul>
1351
1352}
1353
1354_messerror_ {<center>An error was encountered.</center> }
1355
1356
1357_content_ {
1358 _contentpara_
1359}
1360
1361_colexists_ {
1362 <p> The collection title you have specified already exists. Please choose another.
1363
1364}
Note: See TracBrowser for help on using the repository browser.