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

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

some more tidying up of end-user collection building

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