source: trunk/gsdl/macros/collect.dm@ 1433

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

* empty log message *

  • Property svn:keywords set to Author Date Id Revision
File size: 20.8 KB
Line 
1package collector
2
3_imagethispage_ {_iconhcolect_}
4
5# _pagescriptextra_ will be set to the appropriate _***scriptextra_
6# macro from within the server
7_pagescriptextra_ {}
8
9# this is just like the _gsimage_ macro but it calls the check_submit() javascript
10# function instead of linking directly to the page (_1_ argument isn't used)
11_gsjimage_ {<a href="javascript:check\_submit('_4_');" onMouseover="roll('_4_',1);" onMouseOut="roll('_4_',0);"><img
12name="_4_" src="_2_" onLoad="gbutton(this,'_3_');" border=0 alt="_5_"></a>}
13
14_gsjimage_ [v=1] {<a href="#" onClick="check\_submit(_4_);">_5_</a><br>}
15
16
17#######################################################################
18# icons
19
20_iconhcolect_ {<img src="_httpimg_/h_colect.gif" alt="the collector">}
21_icongreyarrow_ {<img src="_httpimg_/grarrow.gif">}
22_icongreyuparrow_ {<img src="_httpimg_/guarrow.gif">}
23_iconstop_ {<img src="_httpimg_/stop.gif" border=0>}
24
25_icongcinfoof_ {<img src="_httpicongcinfoof_" alt="_textinfo_">}
26_icongcinfoon_ {<img src="_httpicongcinfoon_" alt="_textinfo_">}
27_iconycinfoof_ {<img src="_httpiconycinfoof_" alt="_textinfo_">}
28_iconycinfoon_ {<img src="_httpiconycinfoon_" alt="_textinfo_">}
29_iconncinfoof_ {<img src="_httpiconncinfoof_" alt="_textinfo_">}
30_textinfo_ {collection information}
31
32_icongcsrceof_ {<img src="_httpicongcsrceof_" alt="_textsrce_">}
33_icongcsrceon_ {<img src="_httpicongcsrceon_" alt="_textsrce_">}
34_iconycsrceof_ {<img src="_httpiconycsrceof_" alt="_textsrce_">}
35_iconycsrceon_ {<img src="_httpiconycsrceon_" alt="_textsrce_">}
36_iconncsrceof_ {<img src="_httpiconncsrceof_" alt="_textsrce_">}
37_textsrce_ {source data}
38
39_icongcconfof_ {<img src="_httpicongcconfof_" alt="_textconf_">}
40_icongcconfon_ {<img src="_httpicongcconfon_" alt="_textconf_">}
41_iconycconfof_ {<img src="_httpiconycconfof_" alt="_textconf_">}
42_iconycconfon_ {<img src="_httpiconycconfon_" alt="_textconf_">}
43_iconncconfof_ {<img src="_httpiconncconfof_" alt="_textconf_">}
44_textconf_ {configure collection}
45
46_icongcbildof_ {<img src="_httpicongcbildof_" alt="_textbild_">}
47_icongcbildon_ {<img src="_httpicongcbildon_" alt="_textbild_">}
48_iconycbildof_ {<img src="_httpiconycbildof_" alt="_textbild_">}
49_iconycbildon_ {<img src="_httpiconycbildon_" alt="_textbild_">}
50_iconncbildof_ {<img src="_httpiconncbildof_" alt="_textbild_">}
51_textbild_ {build}
52
53_icongcviewof_ {<img src="_httpicongcviewof_" alt="_textview_">}
54_icongcviewon_ {<img src="_httpicongcviewon_" alt="_textview_">}
55_iconycviewof_ {<img src="_httpiconycviewof_" alt="_textview_">}
56_iconycviewon_ {<img src="_httpiconycviewon_" alt="_textview_">}
57_iconncviewof_ {<img src="_httpiconncviewof_" alt="_textview_">}
58_textview_ {view}
59
60_icongcdelof_ {<img src="_httpicongcdelof_" alt="_textdel_">}
61_icongcdelon_ {<img src="_httpicongcdelon_" alt="_textdel_">}
62_textdel_ {delete collection}
63
64#######################################################################
65# http macros
66
67_httpinfo_ {_gwcgi_?e=_compressedoptions_&cp=info}
68_httpsrce_ {_gwcgi_?e=_compressedoptions_&cp=srce}
69_httpconf_ {_gwcgi_?e=_compressedoptions_&cp=conf}
70_httpbild_ {_gwcgi_?e=_compressedoptions_&cp=bild}
71_httpview_ {_gwcgi_?e=_compressedoptions_&cp=view}
72_httpdel_ {javascript:do_delete();}
73
74_httpicongcinfoof_ {_httpimg_/gcinfoof.gif}
75_httpicongcinfoon_ {_httpimg_/gcinfoon.gif}
76_httpiconycinfoof_ {_httpimg_/ycinfoof.gif}
77_httpiconycinfoon_ {_httpimg_/ycinfoon.gif}
78_httpiconncinfoof_ {_httpimg_/ncinfoof.gif}
79
80_httpicongcsrceof_ {_httpimg_/gcsrceof.gif}
81_httpicongcsrceon_ {_httpimg_/gcsrceon.gif}
82_httpiconycsrceof_ {_httpimg_/ycsrceof.gif}
83_httpiconycsrceon_ {_httpimg_/ycsrceon.gif}
84_httpiconncsrceof_ {_httpimg_/ncsrceof.gif}
85
86_httpicongcconfof_ {_httpimg_/gcconfof.gif}
87_httpicongcconfon_ {_httpimg_/gcconfon.gif}
88_httpiconycconfof_ {_httpimg_/ycconfof.gif}
89_httpiconycconfon_ {_httpimg_/ycconfon.gif}
90_httpiconncconfof_ {_httpimg_/ncconfof.gif}
91
92_httpicongcbildof_ {_httpimg_/gcbildof.gif}
93_httpicongcbildon_ {_httpimg_/gcbildon.gif}
94_httpiconycbildof_ {_httpimg_/ycbildof.gif}
95_httpiconycbildon_ {_httpimg_/ycbildon.gif}
96_httpiconncbildof_ {_httpimg_/ncbildof.gif}
97
98_httpicongcviewof_ {_httpimg_/gcviewof.gif}
99_httpicongcviewon_ {_httpimg_/gcviewon.gif}
100_httpiconycviewof_ {_httpimg_/ycviewof.gif}
101_httpiconycviewon_ {_httpimg_/ycviewon.gif}
102_httpiconncviewof_ {_httpimg_/ncviewof.gif}
103
104_httpicongcdelof_ {_httpimg_/gcdelof.gif}
105_httpicongcdelon_ {_httpimg_/gcdelon.gif}
106
107#######################################################################
108# intro page
109
110_introscriptextra_ {}
111
112_introcontent_ {
113<form name="collectorform" method=post action="_gwcgi_">
114<input type=hidden name="e" value="_decodedcompressedoptions_">
115
116<center>
117<table width=_pagewidth_>
118<tr><td>
119_iconblankbar_
120<center>
121<h2>The Collector</h2>
122<p><i>The pen is mightier than the sword!
123<br>Building and distributing information collections carries responsibilities
124that you may want to reflect on before you begin.
125There are legal issues of copyright: being able to access documents doesn't
126mean you can necessarily give them to others.
127There are social issues: collections should respect the customs of the
128community out of which the documents arise.
129And there are ethical issues.
130Be sensitive to the power of information and use it wisely.
131</i>
132</center>
133<p>_iconblankbar_
134
135<p>The Collector helps you to create new collections, modify or add to
136existing ones, or delete collections. To do this you will be guided through a
137sequence of Web pages which request the information that is needed.
138
139<p>First, you must decide whether to
140<ul>
141<input type=radio name=cp value=new checked>
142create an entirely new collection
143<br>
144<input type=radio name=cp value=existing>
145work with an existing one, adding data to it or deleting it.
146</ul>
147<p>_iconblankbar_
148
149<p>In order to build or modify digital library collections you must sign in.
150This is to protect you from others logging in to your computer and altering the
151information on it. Note: for security reasons you will be automatically logged
152out once a 30 minute period has elapsed since you logged in. If this happens,
153don't worry! -- you will be invited to log in again and can continue from where
154you left off.
155
156<p>Please enter your username and password, and click the button to sign in.
157
158<table><tr><td width=80>Name:</td>
159<td><input type="text" name="un" value="" size=10></td>
160<td></td></tr>
161<tr><td>Password:</td>
162<td><input type="password" name="pw" size=10></td>
163<td><input type="submit" value="sign in"></td>
164</tr>
165</table>
166<p>_iconblankbar_
167</td></tr>
168</table></center>
169
170</form>
171}
172
173
174#######################################################################
175# Changing an existing collection page
176
177_existingscriptextra_ {
178function check\_submit (gotopage) \{
179 var form = document.collectorform;
180 if (gotopage == "srce") \{
181 form.bc1esrce.value = "1";
182 \}
183 if (gotopage == "conf") \{
184 form.bc1econf.value = "1";
185 \}
186 form.cp.value = gotopage;
187 form.submit();
188\}
189
190function do_delete () \{
191 var form = document.collectorform;
192 var i = form.bc1dirname.selectedIndex;
193 var del = confirm ("Confirm deletion of " + form.bc1dirname.options[i].value + " collection?");
194 if (del) \{
195 form.bc1dodelete.value = "1";
196 form.submit();
197 \}
198\}
199}
200
201_changeexisting_ {
202<p>First select the collection that you want to work with (write protected
203collections won't appear in this list).
204<br>_fullnamemenu_<br>
205<p>With the collection you have selected, you can
206
207<table cellspacing=6>
208<tr><td width=20 align=right valign=bottom>1.</td>
209<td valign=bottom>_gsjimage_( ,_collector:httpicongcsrceof_,_collector:httpicongcsrceon_,srce,_collector:textsrce_)</td>
210<td valign=bottom>Add more data and rebuild the collection</td></tr>
211<tr><td align=right valign=bottom>2.</td>
212<td valign=bottom>_gsjimage_(_,_collector:httpicongcconfof_,_collector:httpicongcconfon_,conf,_collector:textconf_)</td>
213<td valign=bottom>Edit the collection configuration file</td></tr>
214<tr><td align=right valign=bottom>3.</td>
215<td valign=bottom>_gsimage_(_collector:httpdel_,_collector:httpicongcdelof_,_collector:httpicongcdelon_,del,_collector:textdel_)</td>
216<td valign=bottom>Delete the collection entirely</td></tr>
217</table>
218}
219
220_existingcontent_ {
221<form name="collectorform" method=post action="_gwcgi_">
222<input type=hidden name="e" value="_decodedcompressedoptions_">
223<input type=hidden name="cp" value="_cgiargcp_">
224<input type=hidden name="bc1dodelete" value="0">
225<input type=hidden name="bc1esrce" value="0">
226<input type=hidden name="bc1econf" value="0">
227<center>
228<table width=_pagewidth_>
229<tr><td>
230_iconblankbar_
231<center><h2>Changing an existing collection</h2></center>
232_iconblankbar_
233_If_("_fullnamemenu_" eq "",<p>No write-enabled collections are available for modifying,_changeexisting_)
234<p>_iconblankbar_
235</td></tr>
236</table></center>
237</form>
238}
239
240#######################################################################
241# Creating a new collection page
242
243_newscriptextra_ {}
244
245_newcontent_ {
246<center>
247<table width=_pagewidth_>
248<tr><td>
249_iconblankbar_
250<center><h2>Creating a new collection</h2></center>
251_iconblankbar_
252
253<p>The sequence of steps needed to create a new digital library collection is:
254<table cellspacing=6>
255<tr><td width=20 align=right valign=bottom>1.</td>
256 <td valign=bottom>_iconncinfoof_</td>
257 <td valign=bottom>Specify its name (and associated information)</td></tr>
258<tr><td align=right valign=bottom>2.</td>
259 <td valign=bottom>_iconncsrceof_</td>
260 <td valign=bottom>Specify where the source data comes from</td></tr>
261<tr><td align=right valign=bottom>3.</td>
262 <td valign=bottom>_iconncconfof_</td>
263 <td valign=bottom>Adjust the configuration options (advanced users only)</td></tr>
264<tr><td align=right valign=bottom>4.</td>
265 <td valign=bottom>_iconncbildof_</td>
266 <td valign=bottom>"Build" the collection (see below)</td></tr>
267<tr><td align=right valign=bottom>5.</td>
268 <td valign=bottom>_iconncviewof_</td>
269 <td valign=bottom>Proudly view your handiwork.</td></tr>
270</table>
271
272<p>The fourth step is where the computer does all the work. In the "building"
273process the computer makes all the indexes and gathers together any other
274information that is required to make things work. But first you have to
275specify the information.
276
277<p>_iconblankbar_
278
279<p>A diagram appears below that will help you keep track of where you are. The
280green button is the one that you click to carry on in the sequence. As you go
281through the sequence, the buttons will change to yellow. You can return to a
282previous page by clicking on the corresponding yellow button in the diagram.
283
284<p>When you are ready, click the green "collection information" button to
285begin creating your new digital library collection!
286
287<p><center>
288_collectorbar_
289</center>
290
291</td></tr>
292</table></center>
293}
294
295
296#######################################################################
297# Collection information page
298
299_infoscriptextra_ {
300function check\_submit (gotopage) \{
301 var form = document.collectorform;
302 if (form.bc1fullname.value.match(/^\\s*$/))
303 \{
304 alert("Collection name must be specified");
305 form.bc1fullname.focus();
306 return;
307 \}
308 else if (form.bc1contactemail.value.match(/^\\s*$/))
309 \{
310 alert("Email address must be specified");
311 form.bc1contactemail.focus();
312 return;
313 \}
314 else if (!form.bc1contactemail.value.match(/^([^@]+)@(.+)$/))
315 \{
316 alert("Please specify email address in the form: usename@domain");
317 form.bc1contactemail.focus();
318 return;
319 \}
320 else if (form.bc1aboutdesc.value.match(/^\\s*$/))
321 \{
322 alert("Description of collection must be specified");
323 form.bc1aboutdesc.focus();
324 return;
325 \}
326 form.cp.value = gotopage;
327 form.submit();
328\}
329}
330
331_infocontent_ {
332<form name="collectorform" method=post action="_gwcgi_">
333<input type=hidden name="e" value="_decodedcompressedoptions_">
334<input type=hidden name="cp" value="_cgiargcp_">
335<input type=hidden name="bc1infochanged" value="0">
336
337<center>
338<table width=_pagewidth_>
339<tr><td>
340_iconblankbar_
341<center>
342<h2>Collection information</h2>
343</center>
344<p>_iconblankbar_
345
346<p>When creating a new collection you need to enter some preliminary
347information about the source data. This process is structured as a series
348of Web pages, overseen by The Collector. The bar at the bottom of the page
349shows you the sequence of pages to be completed.
350
351<h4>Title for collection:</h4>
352<input type="text" name="bc1fullname" value="_cgiargbc1fullname_"
353onChange="document.collectorform.bc1infochanged.value=1;") size=72>
354<br>
355<font color="#909090">
356The collection title is a short phrase used throughout the digital library to
357identify the content of the collection. Example titles
358include &quot;Computer Science Technical Reports&quot; and &quot;Humanity
359Development Library.&quot;
360</font>
361
362<h4>Contact email address:</h4>
363<input type="text" name="bc1contactemail" value="_cgiargbc1contactemail_"
364onChange="document.collectorform.bc1infochanged.value=1;" size=72>
365<br>
366<font color="#909090">
367This email address specifies the first point of contact for the collection.
368If the Greenstone software detects a problem, a diagnostic report is
369sent to this address. Enter an email address in its full form:
370<tt>name@domain</tt>.
371</font>
372
373<h4>About this collection:</h4>
374<textarea name="bc1aboutdesc" cols=72 rows=6 wrap=physical
375onChange="document.collectorform.bc1infochanged.value=1;">
376_cgiargbc1aboutdesc_
377</textarea>
378<br>
379<font color="#909090">
380This is statement describing the principles governing what is included in the
381collection. It appears on the first page when the collection is presented.
382</font>
383
384<p>_iconblankbar_
385
386<p>Your position in the sequence is indicated by an arrow underneath--in this
387case, the "collection information" stage. To proceed, click the green "source
388data" button.
389
390<p><center>
391_collectorbar_
392</center>
393
394</td></tr>
395</table></center>
396
397</form>
398}
399
400
401#######################################################################
402# Source data page
403
404# _fullnamemenu is set from within the server. If it's empty there are
405# no valid collections
406_fullnamemenu_ {}
407
408_srcescriptextra_ {
409var cloneval = _cgiargbc1clone_;
410
411function check\_submit (gotopage) \{
412 var form = document.collectorform;
413 if (form.bc1inputdir1.value.match(/^\\s*$/) &&
414 form.bc1inputdir2.value.match(/^\\s*$/) &&
415 form.bc1inputdir3.value.match(/^\\s*$/) &&
416 form.bc1inputdir4.value.match(/^\\s*$/))
417 \{
418 alert("At least one input source must be specified");
419 form.bc1inputdir1.focus();
420 return;
421 \}
422
423 form.cp.value = gotopage;
424 form.submit();
425\}
426
427function clone\_changed (changedto) \{
428 var form = document.collectorform;
429 if (changedto != cloneval) \{
430 form.bc1clonechanged.value = 1;
431 \} else \{
432 form.bc1clonechanged.value = 0;
433 \}
434\}
435}
436
437_srcenew_ {
438<center>
439<h2>Source data</h2>
440</center>
441<p>_iconblankbar_
442
443<p>You can either create a completely new collection, or "clone" an existing one
444-- that is, base the structure of your new collection on one that exists already.
445<ul>
446<input type=radio onClick="clone_changed(0);" name=bc1clone value=0
447_If_("_cgiargbc1clone_" eq "0",checked)><b>Create new collection</b>
448<br><font color="#909090">
449Create a completely new collection. The collection may contain html documents (.htm, .html), plain text
450documents (.txt, .text), or email documents (.email).
451</font>
452</ul>
453<ul>_If_("_fullnamemenu_" eq "",
454No collections available for cloning.,_srcemenu_)
455</ul>
456}
457
458_srceappend_ {
459<center>
460<h2>Add new data</h2>
461</center>
462<p>_iconblankbar_
463<h4>Adding data:</h4>
464The files that you specify below will be added to the collection. Make sure
465that you do not re-specify files that are already in the collection:
466otherwise two copies will be included. Files are identified by their full
467pathname, Web pages by their absolute Web address.
468}
469
470_srcecontent_ {
471<form name="collectorform" method=post action="_gwcgi_">
472<input type=hidden name="e" value="_decodedcompressedoptions_">
473<input type=hidden name="cp" value="_cgiargcp_">
474<input type=hidden name="bc1clonechanged" value="0">
475
476<center>
477<table width=_pagewidth_>
478<tr><td>
479_iconblankbar_
480_If_("_cgiargbc1esrce_" eq "1",_srceappend_,_srcenew_)
481
482<h4>Input source:</h4>
483<input type=text name="bc1inputdir1" value="_cgiargbc1inputdir1_" size=72>
484<br>
485<input type=text name="bc1inputdir2" value="_cgiargbc1inputdir2_" size=72>
486<br>
487<input type=text name="bc1inputdir3" value="_cgiargbc1inputdir3_" size=72>
488<br>
489<input type=text name="bc1inputdir4" value="_cgiargbc1inputdir4_" size=72>
490<br>
491<font color="#909090">
492These specify where the source data is located. There are three kinds of
493location:
494<ul>
495<li> a directory name on your computer system (beginning with "file://"),
496<li> an address beginning with "http://" for files to be downloaded from the
497Web,
498<li> an address beginning with "ftp://" for files to be downloaded using FTP
499(file transfer protocol).
500</ul>
501In each case, the collection will include all files of the appropriate type in
502the specified directory, in any directories it contains, in any directories
503they contain, and so on.
504<p>You can specify up to four different input sources. If you specify a
505filename, just that file will be included.
506</font>
507
508<p>_iconblankbar_
509<p>Remember, you can always revisit a previous stage by clicking its yellow
510button.
511
512<p><center>
513_collectorbar_
514</center>
515
516</td></tr>
517</table></center>
518
519</form>
520}
521
522_srcemenu_ {<input type=radio name=bc1clone onClick="clone_changed(1);" value=1
523_If_("_cgiargbc1clone_" eq "1",checked)><b>Clone existing collection</b>
524<br>_fullnamemenu_<br>
525<font color=#909090>
526This pull-down menu specifies which collection you want to clone. The files in
527your new collection must be exactly the same type as those used to build
528the existing one.
529</font>
530}
531
532
533#######################################################################
534# Configure collection page
535
536_confscriptextra_ {
537var changed = 0;
538
539function check\_submit (gotopage) \{
540 var form = document.collectorform;
541 form.bc1cfgchanged.value = changed;
542 form.cp.value = gotopage;
543 form.submit();
544\}
545
546function reset\_button () \{
547 document.collectorform.reset();
548 changed = 0;
549\}
550}
551
552_confcontent_ {
553<form name="collectorform" method=post action="_gwcgi_">
554<input type=hidden name="e" value="_decodedcompressedoptions_">
555<input type=hidden name="cp" value="_cgiargcp_">
556<input type=hidden name="bc1cfgchanged" value="_cgiargbc1cfgchanged_">
557
558<center>
559<table width=_pagewidth_>
560<tr><td>
561_iconblankbar_
562<center>
563<h2>Configure collection</h2>
564</center>
565<p>_iconblankbar_
566
567<p>The building and presentation of your collection are controlled by
568specifications in a special "configuration file". Advanced users may want
569to alter the configuration settings.
570
571<center><p><b>If you are not an advanced user, just go to the bottom of the
572page.</b></center>
573
574<p>To alter the configuration settings, edit the data that appears below.
575If you make a mistake, click on &quot;Reset&quot; to reinstate the
576original configuration settings.
577
578<p><textarea name="bc1cfgfile" cols=72 rows=18 wrap=off onChange="changed=1;">
579_cfgfile_
580</textarea>
581<table><tr valign=top>
582<td><a href="javascript:reset\_button();">_iconstop_</a></td>
583<td><a href="javascript:reset\_button();">Reset</a></td>
584</tr></table>
585
586<p><center>
587_collectorbar_
588</center>
589
590</td></tr>
591</table></center>
592
593</form>
594}
595
596
597#######################################################################
598# Build page
599
600_bildscriptextra_ {
601var changed = 0;
602
603function check\_submit (gotopage) \{
604 var form = document.collectorform;
605 form.bc1cfgchanged.value = changed;
606 form.cp.value = gotopage;
607 form.submit();
608\}
609}
610
611_bildcontent_ {
612<form name="collectorform" method=post action="_gwcgi_">
613<input type=hidden name="e" value="_decodedcompressedoptions_">
614<input type=hidden name="cp" value="_cgiargcp_">
615
616<center>
617<table width=_pagewidth_>
618<tr><td>
619_iconblankbar_
620<center>
621<h2>Build</h2>
622</center>
623<p>_iconblankbar_
624
625<p><center>
626_collectorbar_
627</center>
628
629</td></tr>
630</table></center>
631
632</form>
633}
634
635
636
637
638#######################################################################
639# Error and message pages
640#######################################################################
641
642_messagehead_ {
643<form name="collectorform" method=post action="_gwcgi_">
644<input type=hidden name="e" value="_decodedcompressedoptions_">
645_iconblankbar_
646}
647
648_messagefoot_ {
649<p>
650<a href="javascript:document.collectorform.submit();">Return to the collector</a>
651</form>
652_iconblankbar_
653}
654
655_mkcolfailcontent_ {
656_messagehead_
657<p>
658Greenstone failed to create the directory structure required to create your
659new collection. Possible causes are:
660<ul>
661<li> Greenstone does not have permission to write to the gsdl/collect
662 directory.
663</ul>
664_messagefoot_
665}
666
667_delpermissioncontent_ {
668_messagehead_
669<p>
670Some or all of the _cgiargbc1dirname_ collection could not be
671deleted. Possible causes are:
672<ul>
673<li> Greenstone does not have permission to delete the gsdl/collect/_cgibc1dirname_
674directory.
675</ul>
676_messagefoot_
677}
678
679_delinvalidcontent_ {
680_messagehead_
681<p>
682The _cgiargbc1dirname_ collection is protected or invalid. Deletion was cancelled.
683_messagefoot_
684}
685
686_delsuccesscontent_ {
687_messagehead_
688<p>
689The _cgiargbc1dirname_ collection was successfully deleted.
690_messagefoot_
691}
692
693_clonefailcontent_ {
694_messagehead_
695<input type=hidden name="bc1clone" value="0">
696<p>
697The _cgiargclonecol_ collection cound not be cloned.
698_messagefoot_
699}
Note: See TracBrowser for help on using the repository browser.