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

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

* empty log message *

  • Property svn:keywords set to Author Date Id Revision
File size: 16.6 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_gsimage_ [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#######################################################################
61# http macros
62
63_httpinfo_ {_gwcgi_?e=_compressedoptions_&cp=info}
64_httpsrce_ {_gwcgi_?e=_compressedoptions_&cp=srce}
65_httpconf_ {_gwcgi_?e=_compressedoptions_&cp=conf}
66_httpbild_ {_gwcgi_?e=_compressedoptions_&cp=bild}
67_httpview_ {_gwcgi_?e=_compressedoptions_&cp=view}
68
69_httpicongcinfoof_ {_httpimg_/gcinfoof.gif}
70_httpicongcinfoon_ {_httpimg_/gcinfoon.gif}
71_httpiconycinfoof_ {_httpimg_/ycinfoof.gif}
72_httpiconycinfoon_ {_httpimg_/ycinfoon.gif}
73_httpiconncinfoof_ {_httpimg_/ncinfoof.gif}
74
75_httpicongcsrceof_ {_httpimg_/gcsrceof.gif}
76_httpicongcsrceon_ {_httpimg_/gcsrceon.gif}
77_httpiconycsrceof_ {_httpimg_/ycsrceof.gif}
78_httpiconycsrceon_ {_httpimg_/ycsrceon.gif}
79_httpiconncsrceof_ {_httpimg_/ncsrceof.gif}
80
81_httpicongcconfof_ {_httpimg_/gcconfof.gif}
82_httpicongcconfon_ {_httpimg_/gcconfon.gif}
83_httpiconycconfof_ {_httpimg_/ycconfof.gif}
84_httpiconycconfon_ {_httpimg_/ycconfon.gif}
85_httpiconncconfof_ {_httpimg_/ncconfof.gif}
86
87_httpicongcbildof_ {_httpimg_/gcbildof.gif}
88_httpicongcbildon_ {_httpimg_/gcbildon.gif}
89_httpiconycbildof_ {_httpimg_/ycbildof.gif}
90_httpiconycbildon_ {_httpimg_/ycbildon.gif}
91_httpiconncbildof_ {_httpimg_/ncbildof.gif}
92
93_httpicongcviewof_ {_httpimg_/gcviewof.gif}
94_httpicongcviewon_ {_httpimg_/gcviewon.gif}
95_httpiconycviewof_ {_httpimg_/ycviewof.gif}
96_httpiconycviewon_ {_httpimg_/ycviewon.gif}
97_httpiconncviewof_ {_httpimg_/ncviewof.gif}
98
99
100#######################################################################
101# intro page
102
103_introscriptextra_ {}
104
105_introcontent_ {
106<form name="collectorform" method=post action="_gwcgi_">
107<input type=hidden name="e" value="_decodedcompressedoptions_">
108
109<center>
110<table width=_pagewidth_>
111<tr><td>
112_iconblankbar_
113<center>
114<h2>The Collector</h2>
115<p><i>The pen is mightier than the sword!
116<br>Building and distributing information collections carries responsibilities
117that you may want to reflect on before you begin.
118There are legal issues of copyright: being able to access documents doesn't
119mean you can necessarily give them to others.
120There are social issues: collections should respect the customs of the
121community out of which the documents arise.
122And there are ethical issues.
123Be sensitive to the power of information and use it wisely.
124</i>
125</center>
126<p>_iconblankbar_
127
128<p>The Collector helps you to create new collections, modify or add to
129existing ones, or delete collections. To do this you will be guided through a
130sequence of Web pages which request the information that is needed.
131
132<p>First, you must decide whether to
133<ul>
134<input type=radio name=cp value=new checked>
135create an entirely new collection
136<br>
137<input type=radio name=cp value=existing>
138work with an existing one, adding data to it or deleting it.
139</ul>
140<p>_iconblankbar_
141
142<p>In order to build or modify digital library collections you must sign in.
143This is to protect you from others logging in to your computer and altering the
144information on it. Note: for security reasons you will be automatically logged
145out once a 30 minute period has elapsed since you logged in. If this happens,
146don't worry! -- you will be invited to log in again and can continue from where
147you left off.
148
149<p>Please enter your username and password, and click the button to sign in.
150
151<table><tr><td width=80>Name:</td>
152<td><input type="text" name="un" value="" size=10></td>
153<td></td></tr>
154<tr><td>Password:</td>
155<td><input type="password" name="pw" size=10></td>
156<td><input type="submit" value="sign in"></td>
157</tr>
158</table>
159<p>_iconblankbar_
160</td></tr>
161</table></center>
162
163</form>
164}
165
166
167#######################################################################
168# Creating a new collection page
169
170_newscriptextra_ {}
171
172_newcontent_ {
173<center>
174<table width=_pagewidth_>
175<tr><td>
176_iconblankbar_
177<center><h2>Creating a new collection</h2></center>
178_iconblankbar_
179
180<p>The sequence of steps needed to create a new digital library collection is:
181<table cellspacing=6>
182<tr><td width=20 align=right valign=bottom>1.</td>
183 <td valign=bottom>_iconncinfoof_</td>
184 <td valign=bottom>Specify its name (and associated information)</td></tr>
185<tr><td align=right valign=bottom>2.</td>
186 <td valign=bottom>_iconncsrceof_</td>
187 <td valign=bottom>Specify where the source data comes from</td></tr>
188<tr><td align=right valign=bottom>3.</td>
189 <td valign=bottom>_iconncconfof_</td>
190 <td valign=bottom>Adjust the configuration options (advanced users only)</td></tr>
191<tr><td align=right valign=bottom>4.</td>
192 <td valign=bottom>_iconncbildof_</td>
193 <td valign=bottom>"Build" the collection (see below)</td></tr>
194<tr><td align=right valign=bottom>5.</td>
195 <td valign=bottom>_iconncviewof_</td>
196 <td valign=bottom>Proudly view your handiwork.</td></tr>
197</table>
198
199<p>The fourth step is where the computer does all the work. In the "building"
200process the computer makes all the indexes and gathers together any other
201information that is required to make things work. But first you have to
202specify the information.
203
204<p>_iconblankbar_
205
206<p>A diagram appears below that will help you keep track of where you are. The
207green button is the one that you click to carry on in the sequence. As you go
208through the sequence, the buttons will change to yellow. You can return to a
209previous page by clicking on the corresponding yellow button in the diagram.
210
211<p>When you are ready, click the green "collection information" button to
212begin creating your new digital library collection!
213
214<p><center>
215_collectorbar_
216</center>
217
218</td></tr>
219</table></center>
220}
221
222
223#######################################################################
224# Collection information page
225
226_infoscriptextra_ {
227function check\_submit (gotopage) \{
228 var form = document.collectorform;
229 if (form.bc1fullname.value.match(/^\\s*$/))
230 \{
231 alert("Collection name must be specified");
232 form.bc1fullname.focus();
233 return;
234 \}
235 else if (form.bc1contactemail.value.match(/^\\s*$/))
236 \{
237 alert("Email address must be specified");
238 form.bc1contactemail.focus();
239 return;
240 \}
241 else if (!form.bc1contactemail.value.match(/^([^@]+)@(.+)$/))
242 \{
243 alert("Please specify email address in the form: usename@domain");
244 form.bc1contactemail.focus();
245 return;
246 \}
247 else if (form.bc1aboutdesc.value.match(/^\\s*$/))
248 \{
249 alert("Description of collection must be specified");
250 form.bc1aboutdesc.focus();
251 return;
252 \}
253 form.cp.value = gotopage;
254 form.submit();
255\}
256}
257
258_infocontent_ {
259<form name="collectorform" method=post action="_gwcgi_">
260<input type=hidden name="e" value="_decodedcompressedoptions_">
261<input type=hidden name="cp" value="_cgiargcp_">
262<input type=hidden name="bc1infochanged" value="0">
263
264<center>
265<table width=_pagewidth_>
266<tr><td>
267_iconblankbar_
268<center>
269<h2>Collection information</h2>
270</center>
271<p>_iconblankbar_
272
273<p>When creating a new collection you need to enter some preliminary
274information about the source data. This process is structured as a series
275of Web pages, overseen by The Collector. The bar at the bottom of the page
276shows you the sequence of pages to be completed.
277
278<h4>Title for collection:</h4>
279<input type="text" name="bc1fullname" value="_cgiargbc1fullname_"
280onChange="document.collectorform.bc1infochanged.value=1;") size=72>
281<br>
282<font color="#909090">
283The collection title is a short phrase used throughout the digital library to
284identify the content of the collection. Example titles
285include &quot;Computer Science Technical Reports&quot; and &quot;Humanity
286Development Library.&quot;
287</font>
288
289<h4>Contact email address:</h4>
290<input type="text" name="bc1contactemail" value="_cgiargbc1contactemail_"
291onChange="document.collectorform.bc1infochanged.value=1;" size=72>
292<br>
293<font color="#909090">
294This email address specifies the first point of contact for the collection.
295If the Greenstone software detects a problem, a diagnostic report is
296sent to this address. Enter an email address in its full form:
297<tt>name@domain</tt>.
298</font>
299
300<h4>About this collection:</h4>
301<textarea name="bc1aboutdesc" cols=72 rows=6 wrap=physical
302onChange="document.collectorform.bc1infochanged.value=1;">
303_cgiargbc1aboutdesc_
304</textarea>
305<br>
306<font color="#909090">
307This is statement describing the principles governing what is included in the
308collection. It appears on the first page when the collection is presented.
309</font>
310
311<p>_iconblankbar_
312
313<p>Your position in the sequence is indicated by an arrow underneath--in this
314case, the "collection information" stage. To proceed, click the green "source
315data" button.
316
317<p><center>
318_collectorbar_
319</center>
320
321</td></tr>
322</table></center>
323
324</form>
325}
326
327
328#######################################################################
329# Source data page
330
331# _fullnamemenu is set from within the server. If it's empty there are
332# no valid collections
333_fullnamemenu_ {}
334
335_srcescriptextra_ {
336function check\_submit (gotopage) \{
337 var form = document.collectorform;
338
339 if (form.bc1inputdir1.value.match(/^\\s*$/) &&
340 form.bc1inputdir2.value.match(/^\\s*$/) &&
341 form.bc1inputdir3.value.match(/^\\s*$/) &&
342 form.bc1inputdir4.value.match(/^\\s*$/))
343 \{
344 alert("At least one input source must be specified");
345 form.bc1inputdir1.focus();
346 return;
347 \}
348
349 form.cp.value = gotopage;
350 form.submit();
351\}
352}
353
354_srcecontent_ {
355<form name="collectorform" method=post action="_gwcgi_">
356<input type=hidden name="e" value="_decodedcompressedoptions_">
357<input type=hidden name="cp" value="_cgiargcp_">
358
359<center>
360<table width=_pagewidth_>
361<tr><td>
362_iconblankbar_
363<center>
364<h2>Source data</h2>
365</center>
366<p>_iconblankbar_
367
368<p>You can either create a completely new collection, or "clone" an existing one
369-- that is, base the structure of your new collection on one that exists already.
370<ul>
371<input type=radio name=bc1clone value=0 _If_("_cgiargbc1clone_" eq "0",checked)><b>Create new collection</b>
372<br><font color="#909090">
373Create a completely new collection. The collection may contain html documents (.htm, .html), plain text
374documents (.txt, .text), or email documents (.email).
375</font>
376</ul>
377<ul>_If_("_fullnamemenu_" eq "",
378No collections available for cloning.,_srcemenu_)
379</ul>
380
381<h4>Input source:</h4>
382<input type=text name="bc1inputdir1" value="_cgiargbc1inputdir1_" size=72>
383<br>
384<input type=text name="bc1inputdir2" value="_cgiargbc1inputdir2_" size=72>
385<br>
386<input type=text name="bc1inputdir3" value="_cgiargbc1inputdir3_" size=72>
387<br>
388<input type=text name="bc1inputdir4" value="_cgiargbc1inputdir4_" size=72>
389<br>
390<font color="#909090">
391These specify where the source data is located. There are three kinds of
392location:
393<ul>
394<li> a directory name on your computer system (beginning with "file://"),
395<li> an address beginning with "http://" for files to be downloaded from the
396Web,
397<li> an address beginning with "ftp://" for files to be downloaded using FTP
398(file transfer protocol).
399</ul>
400In each case, the collection will include all files of the appropriate type in
401the specified directory, in any directories it contains, in any directories
402they contain, and so on.
403<p>You can specify up to four different input sources. If you specify a
404filename, just that file will be included.
405</font>
406
407<p>_iconblankbar_
408<p>Remember, you can always revisit a previous stage by clicking its yellow
409button.
410
411<p><center>
412_collectorbar_
413</center>
414
415</td></tr>
416</table></center>
417
418</form>
419}
420
421_srcemenu_ {<input type=radio name=bc1clone value=1 _If_("_cgiargbc1clone_" eq "1",checked)><b>Clone existing collection</b>
422<br>_fullnamemenu_<br>
423<font color=#909090>
424This pull-down menu specifies which collection you want to clone. The files in
425your new collection must be exactly the same type as those used to build
426the existing one.
427</font>
428}
429
430
431#######################################################################
432# Configure collection page
433
434_confscriptextra_ {
435var changed = 0;
436
437function check\_submit (gotopage) \{
438 var form = document.collectorform;
439 form.bc1cfgchanged.value = changed;
440 form.cp.value = gotopage;
441 form.submit();
442\}
443
444function reset\_button () \{
445 document.collectorform.reset();
446 changed = 0;
447\}
448}
449
450_confcontent_ {
451<form name="collectorform" method=post action="_gwcgi_">
452<input type=hidden name="e" value="_decodedcompressedoptions_">
453<input type=hidden name="cp" value="_cgiargcp_">
454<input type=hidden name="bc1cfgchanged" value="_cgiargbc1cfgchanged_">
455
456<center>
457<table width=_pagewidth_>
458<tr><td>
459_iconblankbar_
460<center>
461<h2>Configure collection</h2>
462</center>
463<p>_iconblankbar_
464
465<p>The building and presentation of your collection are controlled by
466specifications in a special "configuration file". Advanced users may want
467to alter the configuration settings.
468
469<center><p><b>If you are not an advanced user, just go to the bottom of the
470page.</b></center>
471
472<p>To alter the configuration settings, edit the data that appears below.
473If you make a mistake, click on &quot;Reset&quot; to reinstate the
474original configuration settings.
475
476<p><textarea name="bc1cfgfile" cols=72 rows=18 wrap=off onChange="changed=1;">
477_cfgfile_
478</textarea>
479<table><tr valign=top>
480<td><a href="javascript:reset\_button();">_iconstop_</a></td>
481<td><a href="javascript:reset\_button();">Reset</a></td>
482</tr></table>
483
484<p><center>
485_collectorbar_
486</center>
487
488</td></tr>
489</table></center>
490
491</form>
492}
493
494
495#######################################################################
496# Build page
497
498_bildscriptextra_ {
499var changed = 0;
500
501function check\_submit (gotopage) \{
502 var form = document.collectorform;
503 form.bc1cfgchanged.value = changed;
504 form.cp.value = gotopage;
505 form.submit();
506\}
507}
508
509_bildcontent_ {
510<form name="collectorform" method=post action="_gwcgi_">
511<input type=hidden name="e" value="_decodedcompressedoptions_">
512<input type=hidden name="cp" value="_cgiargcp_">
513
514<center>
515<table width=_pagewidth_>
516<tr><td>
517_iconblankbar_
518<center>
519<h2>Build</h2>
520</center>
521<p>_iconblankbar_
522
523<p><center>
524_collectorbar_
525</center>
526
527</td></tr>
528</table></center>
529
530</form>
531}
532
533
534
535
536#######################################################################
537# Error pages
538#######################################################################
539
540_mkcolfailcontent_ {
541<p>
542
543Greenstone failed to create the directory structure required to create your
544new collection. Possible causes are:
545<ul>
546<li> Greenstone does not have permission to write to the gsdl/collect
547 directory.
548}
Note: See TracBrowser for help on using the repository browser.