source: main/trunk/model-cols-dev/peijones/etc/collectionConfig.xml@ 25108

Last change on this file since 25108 was 25108, checked in by papitha, 12 years ago

updated jquery upload links

  • Property svn:executable set to *
File size: 47.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3<metadataList><metadata lang="en" name="creator"></metadata><metadata lang="en" name="maintainer"></metadata><metadata lang="en" name="public">true</metadata></metadataList><displayItemList><displayItem assigned="true" lang="en" name="name">Pei-Jones-Flat</displayItem></displayItemList><search type="mgpp"><level name="document"><displayItem lang="en" name="name">document</displayItem></level><level name="section"><displayItem lang="en" name="name">section</displayItem></level><defaultLevel name="document"/><index name="text"><displayItem lang="en" name="name">text</displayItem></index><index name="Title"><displayItem lang="en" name="name">titles</displayItem></index><index name="Source"><displayItem lang="en" name="name">filenames</displayItem></index><index name="Plugin"/><index name="gsimg.photoNote"><displayItem lang="en" name="name">photo annotations</displayItem></index><index name="gstext.tags"><displayItem lang="en" name="name">text annotations (tags)</displayItem></index><index name="gstext.text"><displayItem lang="en" name="name">text annotations (text)</displayItem></index><index name="gstext.user"><displayItem lang="en" name="name">text annotations (user)</displayItem></index><defaultIndex name="text"/><indexOption><option name="accentfold"/><option name="casefold"/><option name="stem"/></indexOption><searchType name="plain"/><searchType name="simpleform"/><searchType name="advancedform"/><format>
4 <gsf:template match="documentNode">
5 <td valign="top">
6 <gsf:link type="document">
7 <gsf:icon type="document"/>
8 </gsf:link>
9 </td>
10 <td>
11 <gsf:switch>
12 <gsf:metadata name="Title" select="ancestors" separator=": "/>
13 <gsf:when test="exists"><gsf:metadata name="Title" select="ancestors" separator=": "/>:</gsf:when>
14 </gsf:switch>
15 <gsf:link type="document">
16 <gsf:metadata name="Title"/>
17 </gsf:link>
18 </td>
19 </gsf:template>
20 </format></search><infodb type="gdbm"/><import><pluginList><plugin name="ZIPPlugin"/><plugin name="GreenstoneXMLPlugin"/><plugin name="TextPlugin"/><plugin name="HTMLPlugin"><option name="-process_exp" value="(timeglider.*)(?i)(\.html?)$"/><option name="-block_exp" value="(timeglider.*)(?i)(\.jpe?g|\.png|\.gif)$"/><option name="-keep_head"/></plugin><plugin name="EmailPlugin"/><plugin name="PDFPlugin"/><plugin name="RTFPlugin"/><plugin name="WordPlugin"/><plugin name="PostScriptPlugin"/><plugin name="PowerPointPlugin"/><plugin name="ExcelPlugin"/><plugin name="PagedImagePlugin"/><plugin name="ImagePlugin"/><plugin name="ISISPlugin"/><plugin name="NulPlugin"/><plugin name="OAIPlugin"/><plugin name="HTMLImagePlugin"/><plugin name="MetadataXMLPlugin"/><plugin name="ArchivesInfPlugin"/><plugin name="DirectoryPlugin"/></pluginList></import><browse><classifier name="List"><option name="-metadata" value="dc.Title;Title"/><option name="-partition_type_within_level" value="approximate_size"/><option name="-bookshelf_type" value="never"/></classifier><classifier name="AZCompactList"><option name="-metadata" value="Source"/><option name="-removesuffix" value="(?i)\\..*"/><option name="-buttonname" value="Source"/></classifier><format>
21 <gsf:template match="documentNode">
22 <td valign="top">
23 <gsf:link type="document">
24 <gsf:icon type="document"/>
25 </gsf:link>
26 </td>
27 <td valign="top">
28 <gsf:link type="source">
29 <gsf:choose-metadata>
30 <gsf:metadata name="thumbicon"/>
31 <gsf:metadata name="srcicon"/>
32 </gsf:choose-metadata>
33 </gsf:link>
34 </td>
35 <td valign="top">
36 <gsf:link type="document">
37 <gsf:choose-metadata>
38 <gsf:metadata name="dc.Title"/>
39 <gsf:metadata name="exp.Title"/>
40 <gsf:metadata name="Title"/>
41 <gsf:default>Untitled</gsf:default>
42 </gsf:choose-metadata>
43 </gsf:link>
44 <gsf:switch>
45 <gsf:metadata name="Source"/>
46 <gsf:when test="exists">
47 <br/>
48 <i>(<gsf:metadata name="Source"/>)</i>
49 </gsf:when>
50 </gsf:switch>
51 </td>
52 </gsf:template>
53 <gsf:template match="classifierNode">
54 <td valign="top">
55 <gsf:link type="classifier">
56 <gsf:icon type="classifier"/>
57 </gsf:link>
58 </td>
59 <td valign="top">
60 <gsf:metadata name="srclink"/>
61 <gsf:choose-metadata>
62 <gsf:metadata name="thumbicon"/>
63 <gsf:metadata name="srcicon"/>
64 </gsf:choose-metadata>
65 <gsf:metadata name="/srclink"/>
66 </td>
67 <td valign="top">
68 <gsf:choose-metadata>
69 <gsf:metadata name="dc.Title"/>
70 <gsf:metadata name="exp.Title"/>
71 <gsf:metadata name="Title"/>
72 <gsf:default>Untitled</gsf:default>
73 </gsf:choose-metadata>
74 <gsf:switch>
75 <gsf:metadata name="Source"/>
76 <gsf:when test="exists">
77 <br/>
78 <i>(<gsf:metadata name="Source"/>)</i>
79 </gsf:when>
80 </gsf:switch>
81 </td>
82 </gsf:template>
83 <gsf:template match="classifierNode" mode="horizontal">
84 <gsf:link type="horizontal">
85 <gsf:metadata name="Title"/>
86 </gsf:link>
87 </gsf:template>
88 </format></browse><display><format>
89 <gsf:option name="sideBar" value="false"/>
90 <xsl:template name="additionalHeaderContent">
91
92 <!--
93 <link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css"/>
94 <link rel="stylesheet" href="http://blueimp.github.com/Bootstrap-Image-Gallery/bootstrap-image-gallery.min.css"/> -->
95 <!--[if lt IE 7]><link rel="stylesheet" href="http://blueimp.github.com/Bootstrap-Image-Gallery/bootstrap-ie6.min.css"><![endif]-->
96 <!--
97 <link rel="stylesheet" href="sites/localsite/collect/peijones/js/jQuery-File-Upload/jquery.fileupload-ui.css"/>
98
99 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/jquery.fileupload.js">
100 <xsl:text> </xsl:text>
101 </script>
102 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/jquery.fileupload-ui.js">
103 <xsl:text> </xsl:text>
104 </script>
105 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/jquery.iframe-transport.js">
106 <xsl:text> </xsl:text>
107 </script>
108 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/application.js">
109 <xsl:text> </xsl:text>
110 </script>
111
112 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/tmpl.min.js"><xsl:text> </xsl:text></script>
113 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/load-image.min.js"><xsl:text> </xsl:text></script>
114 -->
115 <!--<script id="template-upload" type="text/html">
116 {% for (var i=0, files=o.files, l=files.length, file=files[0]; i&lt;l; file=files[++i]) { %}
117 <tr class="template-upload fade">
118 <td class="preview"><span class="fade"></span></td>
119 <td class="name">{%=file.name%}</td>
120 <td class="size">{%=o.formatFileSize(file.size)%}</td>
121 {% if (file.error) { %}
122 <td class="error" colspan="2"><span class="label important">Error</span> {%=fileUploadErrors[file.error] || file.error%}</td>
123 {% } else if (o.files.valid &amp;&amp; !i) { %}
124 <td class="progress"><div class="progressbar"><div style="width:0%;"></div></div></td>
125 <td class="start">{% if (!o.options.autoUpload) { %}<button class="btn primary">Start</button>{% } %}</td>
126 {% } else { %}
127 <td colspan="2"></td>
128 {% } %}
129 <td class="cancel">{% if (!i) { %}<button class="btn info">Cancel</button>{% } %}</td>
130 </tr>
131 {% } %}
132 </script>
133 <script id="template-download" type="text/html">
134 {% for (var i=0, files=o.files, l=files.length, file=files[0]; i&lt;l; file=files[++i]) { %}
135 <tr class="template-download fade">
136 {% if (file.error) { %}
137 <td></td>
138 <td class="name">{%=file.name%}</td>
139 <td class="size">{%=o.formatFileSize(file.size)%}</td>
140 <td class="error" colspan="2"><span class="label important">Error</span> {%=fileUploadErrors[file.error] || file.error%}</td>
141 {% } else { %}
142 <td class="preview">{% if (file.thumbnail_url) { %}
143 <a href="{%=file.url%}" title="{%=file.name%}" rel="gallery"><img src="{%=file.thumbnail_url%}"/></a>
144 {% } %}</td>
145 <td class="name">
146 <a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&amp;&amp;'gallery'%}">{%=file.name%}</a>
147 </td>
148 <td class="size">{%=o.formatFileSize(file.size)%}</td>
149 <td colspan="2"></td>
150 {% } %}
151 <td class="delete">
152 <button class="btn danger" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}">Delete</button>
153 <input type="checkbox" name="delete" value="1"/>
154 </td>
155 </tr>
156 {% } %}
157 </script>-->
158
159 <!-- jQuery must be included before Annotator -->
160 <!-- <script src="sites/localsite/collect/peijones/js/annotator/lib/vendor/jquery.js">-->
161 <!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"><xsl:text> </xsl:text></script>-->
162 <!-- If you're sure your users will only be using browsers modern
163 enough to have their own JSON.parse and JSON.stringify
164 implementations you can skip this -->
165 <script src="sites/localsite/collect/peijones/js/annotator/lib/vendor/json2.js">
166 <xsl:text> </xsl:text>
167 </script>
168 <script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator-full.min.js">
169 <xsl:text> </xsl:text>
170 </script>
171 <!-- The main Annotator script -->
172 <!--<script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.min.js"><xsl:text> </xsl:text></script> -->
173 <!-- Annotator's styling and images -->
174 <link href="sites/localsite/collect/peijones/js/annotator/pkg/annotator.min.css" rel="stylesheet" type="text/css"/>
175 <!-- The following plugins are entirely optional -->
176 <!-- The Store plugin. Saves annotations to a remote backend -->
177 <!-- <script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.store.min.js"><xsl:text> </xsl:text></script> -->
178 <!-- The Auth plugin. Allows users of Annotator to authenticate themselves
179 to the remote backend -->
180 <!--<script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.auth.min.js"><xsl:text> </xsl:text></script> -->
181 <!-- The Permissions plugin. See who created which annotation and create
182 annotations as a specified user -->
183 <!--<script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.permissions.min.js"><xsl:text> </xsl:text></script> -->
184 <!-- The Tags plugin. Edit and display tag keywords on annotations -->
185 <!--<script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.tags.min.js"><xsl:text> </xsl:text></script> -->
186 <!-- The Markdown plugin. Treat annotation text as Markdown -->
187 <!-- <script src="sites/localsite/collect/peijones/js/annotator/lib/vendor/showdown.js"><xsl:text> </xsl:text></script> -->
188 <!-- <script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.markdown.min.js"><xsl:text> </xsl:text></script> -->
189 <!-- Photo note scripts -->
190 <script src="sites/localsite/collect/peijones/js/documentmaker/BrowserDetect.js" type="text/javascript">
191 <xsl:text> </xsl:text>
192 </script>
193 <script src="sites/localsite/collect/peijones/js/documentmaker/PhotoNotes-1.5.js" type="text/javascript">
194 <xsl:text> </xsl:text>
195 </script>
196 <link href="sites/localsite/collect/peijones/style/PhotoNotes-1.5.css" rel="stylesheet" type="text/css"/>
197 <!-- Zoom scripts -->
198 <!--<script src="interfaces/{$interface_name}/js/jquery-1.4.2.js" type="text/javascript"><xsl:text> </xsl:text></script>-->
199 <script src="sites/localsite/collect/peijones/js/documentmaker/zoomer.jquery.js" type="text/javascript">
200 <xsl:text> </xsl:text>
201 </script>
202 <link href="sites/localsite/collect/peijones/style/style.css" rel="stylesheet" type="text/css"/>
203 <script type="text/javascript">
204 <xsl:text disable-output-escaping="yes">
205 _zoomEnabled = true;
206
207 function readyImagesForZoom()
208 {
209 var noZoom = document.getElementById("noZoomImage");
210 var wrap = document.getElementById("wrap");
211 if(!noZoom || !wrap)
212 {
213 return;
214 }
215
216 var smallImageDiv = document.getElementById("small");
217 var smallImage = smallImageDiv.getElementsByTagName("img")[0];
218 smallImageDiv.style.width = smallImageWidth + "px";
219 smallImageDiv.style.height = smallImageHeight + "px";
220 var multiplier = largeImageHeight / smallImageHeight;
221
222 $("#wrap").anythingZoomer({
223 expansionSize:50,
224 speedMultiplier:multiplier
225 });
226
227 noZoom.onclick = addZoom;
228 document.getElementById("overlay").onclick = removeZoom;
229
230 removeZoom();
231 }
232 function addZoom()
233 {
234 if(!_zoomEnabled)
235 {
236 return;
237 }
238
239 var wrapper = document.getElementById("wrap");
240 var noZoom = document.getElementById("noZoom");
241
242 if(!noZoom || !wrapper)
243 {
244 return;
245 }
246
247 noZoom.style.display = "none";
248 wrapper.style.display = "block";
249 var option = document.getElementById("zoomOption");
250 if(option)
251 {
252 option.setAttribute("onclick", "removeZoom();");
253 }
254 }
255 function removeZoom()
256 {
257 if(!_zoomEnabled)
258 {
259 return;
260 }
261
262 var wrapper = document.getElementById("wrap");
263 var noZoom = document.getElementById("noZoom");
264
265 if(!noZoom || !wrapper)
266 {
267 return;
268 }
269
270 wrapper.style.display = "none";
271 noZoom.style.display = "block";
272 var option = document.getElementById("zoomOption");
273 if(option)
274 {
275 option.setAttribute("onclick", "addZoom();");
276 }
277 }
278 </xsl:text>
279 </script>
280 <script text="text/javascript">
281 <xsl:text disable-output-escaping="yes">
282
283 var _posCount = 0;
284 var _notes;
285 function initNotes()
286 {
287 /* create the Photo Note Container */
288 _notes = new PhotoNoteContainer(document.getElementById("noZoom"));
289 getNotes();
290 }
291
292 function deleteFunction(note)
293 {
294 var status = true;
295
296 if (note &amp;&amp; note.id &amp;&amp; note.id &gt; 0) {
297 var metaposStr = note.id - 1;
298
299 var jsonVal = '{"caption":"' + note.text + '", "area":{"x":' + note.rect.left + ', "y":' + note.rect.top + ', "width":' + note.rect.width + ', "height":' + note.rect.height + '}}';
300
301 var removeFromIndexURL = "cgi-bin/metadata-server.pl?a=remove-metadata&amp;site=localsite&amp;c=" + gs.cgiParams.c + "&amp;d=" + gs.cgiParams.d + "&amp;metaname=gsimg.photoNote&amp;metapos=" + metaposStr;
302 var removeFromArchivesURL = "cgi-bin/metadata-server.pl?a=remove-archives-metadata&amp;site=localsite&amp;c=" + gs.cgiParams.c + "&amp;d=" + gs.cgiParams.d + "&amp;metaname=gsimg.photoNote&amp;metapos=" + metaposStr;
303 var removeFromImportURL = "cgi-bin/metadata-server.pl?a=remove-import-metadata&amp;site=localsite&amp;c=" + gs.cgiParams.c + "&amp;d=" + gs.cgiParams.d + "&amp;metaname=gsimg.photoNote&amp;metavalue=" + jsonVal;
304
305 var indexCallback =
306 {
307 success: function(response)
308 {
309 for(var i = 0; i &lt; _notes.length; i++)
310 {
311 var currentNote = _notes[i];
312 if(currentNote.id &gt; note.id)
313 {
314 currentNote.id--;
315 }
316 }
317 _posCount--;
318 },
319 failed: function(){alert("Failed to delete index metadata of note with id: " + note.id);},
320 };
321
322 var archiveCallback =
323 {
324 success: function(){buildFunction(gs.cgiParams.c);},
325 failed: function(){alert("Failed to delete archive metadata of note with id: " + note.id);}
326 }
327
328 var importCallback =
329 {
330 success: function(){},
331 failed: function(){alert("Failed to delete import metadata of note with id: " + note.id);}
332 }
333
334 YAHOO.util.Connect.asyncRequest("GET", removeFromIndexURL, indexCallback);
335 YAHOO.util.Connect.asyncRequest("GET", removeFromArchivesURL, archiveCallback);
336 YAHOO.util.Connect.asyncRequest("GET", removeFromImportURL, importCallback);
337 }
338 else {
339 alert("Failed to find valid note data to delete");
340 status = false;
341 }
342
343 return status;
344 }
345
346 function saveFunction(note)
347 {
348 var saveIndexCallback =
349 {
350 success: function(response){},
351 failed: function(reponse){ alert("Failed to save index metadata of note with id: " + note.id)},
352 };
353
354 var saveArchivesCallback =
355 {
356 success: function(response){buildFunction(gs.cgiParams.c);},
357 failed: function(response){ alert("Failed in save import metadata of note with id: " + note.id) }
358 };
359
360 var saveImportCallback =
361 {
362 success: function(response){},
363 failed: function(response){ alert("Failed in save import metadata of note with id: " + note.id) }
364 };
365
366 var jsonVal = '{"caption":"' + note.text + '", "area":{"x":' + note.rect.left + ', "y":' + note.rect.top + ', "width":' + note.rect.width + ', "height":' + note.rect.height + '}}';
367 var metaposStr = (note &amp;&amp; note.id &amp;&amp; note.id &gt; 0) ? note.id - 1 : _posCount;
368
369 var saveIndexURL = "cgi-bin/metadata-server.pl?a=set-metadata&amp;site=localsite&amp;c=" + gs.cgiParams.c + "&amp;d=" + gs.cgiParams.d + "&amp;metaname=gsimg.photoNote&amp;metavalue=" + jsonVal + "&amp;metapos=" + metaposStr;
370 var saveArchivesURL = "cgi-bin/metadata-server.pl?a=set-archives-metadata&amp;site=localsite&amp;c=" + gs.cgiParams.c + "&amp;d=" + gs.cgiParams.d + "&amp;metaname=gsimg.photoNote&amp;metavalue=" + jsonVal + "&amp;metapos=" + metaposStr;
371 var saveImportURL = "cgi-bin/metadata-server.pl?a=set-import-metadata&amp;site=localsite&amp;c=" + gs.cgiParams.c + "&amp;d=" + gs.cgiParams.d + "&amp;metaname=gsimg.photoNote&amp;metavalue=" + jsonVal + "&amp;metapos=" + metaposStr;
372 YAHOO.util.Connect.asyncRequest("GET", saveIndexURL, saveIndexCallback);
373 YAHOO.util.Connect.asyncRequest("GET", saveArchivesURL, saveArchivesCallback);
374 YAHOO.util.Connect.asyncRequest("GET", saveImportURL, saveImportCallback);
375
376 return 1;
377 }
378
379 function getNotes()
380 {
381 if(gs.variables.photoNotes == null || gs.variables.photoNotes == undefined)
382 {
383 console.log("No photo notes");
384 return;
385 }
386
387 for(var i = 0; i &lt; gs.variables.photoNotes.length; i++)
388 {
389 var note = gs.variables.photoNotes[i];
390 if(!note)
391 {
392 continue;
393 }
394 var newNote = new PhotoNote(note.caption, i+1, new PhotoNoteRect(note.area.x,note.area.y,note.area.width,note.area.height));
395 newNote.onsave = saveFunction;
396 newNote.ondelete = deleteFunction;
397 _notes.AddNote(newNote);
398 _posCount++;
399 }
400
401 addNoteOverAndOutHandlers();
402 }
403
404 function AddNote()
405 {
406 var photoPos = $("#noZoom").offset();
407 var newNote = new PhotoNote('Add note text here...',_posCount+1,new PhotoNoteRect(20,20,50,50));
408 newNote.onsave = saveFunction;
409 newNote.ondelete = deleteFunction;
410 _notes.AddNote(newNote);
411 _posCount++;
412
413 addNoteOverAndOutHandlers();
414 newNote.Select();
415 }
416
417 function addNoteOverAndOutHandlers()
418 {
419 var divs = document.getElementsByTagName("DIV");
420 for(var i = 0; i &lt; divs.length; i++)
421 {
422 if(divs[i].getAttribute("class") &amp;&amp; divs[i].getAttribute("class").search("fn-area") != -1)
423 {
424 divs[i].onmouseover = function(){_zoomEnabled = false;}
425 divs[i].onmouseout = function(){_zoomEnabled = true;}
426 }
427 }
428 }
429
430 function addStatusBar()
431 {
432 var textDiv = document.getElementById("gs-document");
433 var buildStatusBar = document.createElement("div");
434 buildStatusBar.setAttribute("id", "buildStatusBar");
435 buildStatusBar.setAttribute("class", "ui-state-default ui-corner-all");
436 buildStatusBar.setAttribute("style", "visibility:hidden; width:100%");
437 var buildingMessage = document.createElement("div");
438 buildingMessage.setAttribute("id", "buildMessage");
439 buildingMessage.setAttribute("style", "width:50%; padding:3px; margin:5px auto; text-align:center;");
440 buildStatusBar.appendChild(buildingMessage);
441
442 textDiv.insertBefore(buildStatusBar, textDiv.firstChild);
443 }
444
445 $(window).load(function(){readyImagesForZoom(); initAnnotator(); addStatusBar(); initNotes();});
446 </xsl:text>
447 </script>
448 <script text="text/javascript">
449 <xsl:text disable-output-escaping="yes">
450
451 function checkLoop(pid, serverFunction, callback)
452 {
453 var startLoop = function()
454 {
455 var loopCallback =
456 {
457 success:function(response)
458 {
459 var checkText = response.responseText;
460 if(checkText == null || checkText == "")
461 {
462 console.log("There was an error getting the XML to check the status of " + serverFunction);
463 }
464 else
465 {
466 var checkCodeStart = checkText.indexOf("code=\"") + 6;
467 var checkCodeEnd = checkText.indexOf("\"", checkCodeStart);
468 var code = checkText.substring(checkCodeStart, checkCodeEnd);
469
470 if(code == 11 || code == 1) //11 is COMPLETED, 1 is success
471 {
472 callback();
473 }
474 else if(code == 12 || code == 3) //12 is HALTED, 3 is ERROR
475 {
476 console.log("There was an error on the server, could not check status of " + serverFunction);
477 }
478 else
479 {
480 setTimeout(startLoop, 1000);
481 }
482 }
483 },
484 failed:function()
485 {
486 console.log("There was a problem checking the status of " + serverFunction)
487 }
488 }
489 YAHOO.util.Connect.asyncRequest("GET", gs.xsltParams.library_name + "?a=g&amp;rt=s&amp;ro=1&amp;s=" + serverFunction + "&amp;s1.pid=" + pid, loopCallback);
490 }
491 startLoop();
492 }
493
494 function buildFunction(collection)
495 {
496 var buildCallback =
497 {
498 success:function(response)
499 {
500 var buildText = response.responseText;
501 if(buildText == null || buildText == "")
502 {
503 console.log("There was an error getting the xml response from the building request");
504 }
505 else
506 {
507 var buildPIDStart = buildText.indexOf("pid=\"") + 5;
508 var buildPIDEnd = buildText.indexOf("\"", buildPIDStart);
509 var buildPID = buildText.substring(buildPIDStart, buildPIDEnd);
510
511 checkLoop(buildPID, "BuildCollection", function()
512 {
513 var activateCallback =
514 {
515 success: function(response)
516 {
517 var activateText = response.responseText;
518 if(activateText == null || activateText == "")
519 {
520 console.log("There was an error getting the xml response from the activating request");
521 }
522 else
523 {
524 var activatePIDStart = activateText.indexOf("pid=\"") + 5;
525 var activatePIDEnd = activateText.indexOf("\"", activatePIDStart);
526 var activatePID = activateText.substring(activatePIDStart, activatePIDEnd);
527
528 checkLoop(activatePID, "ActivateCollection", function()
529 {
530 var updateCallback =
531 {
532 success: function(response){document.getElementById("buildStatusBar").style.visibility = "hidden";},
533 failed: function(reponse){ alert("Failed in saveFunction() to re-read config files"); document.getElementById("buildStatusBar").style.visibility = "hidden";}
534 };
535 YAHOO.util.Connect.asyncRequest("GET", gs.xsltParams.library_name + "?a=s&amp;sa=c", updateCallback);
536 });
537 }
538 },
539 failed: function(response)
540 {
541 document.getElementById("buildStatusBar").style.visibility = "hidden";
542 console.log("Failed to get response from activate collection request");
543 }
544 }
545 YAHOO.util.Connect.asyncRequest("GET", gs.xsltParams.library_name + "?a=g&amp;rt=r&amp;ro=1&amp;s=ActivateCollection&amp;s1.collection=" + collection, activateCallback);
546 });
547 }
548 },
549 failed: function(){console.log("Failed to get build collection response"); document.getElementById("buildStatusBar").style.visibility = "hidden";}
550 }
551
552 YAHOO.util.Connect.asyncRequest("GET", gs.xsltParams.library_name + "?a=g&amp;rt=r&amp;ro=1&amp;s=BuildCollection&amp;s1.collection=" + collection, buildCallback);
553 showBuildingMessage();
554 }
555
556 function saveAndBuildCollection(col)
557 {
558 for(var j = 0; j &lt; gs.toDeleteArray.keys.length; j++)
559 {
560 var current = gs.toDeleteArray[gs.toDeleteArray.keys[j]];
561 if(current == null){continue;}
562 var metaToDelete = ["user", "text", "tags"];
563 for(var l = 0; l &lt; metaToDelete.length; l++)
564 {
565 var deleteArchivesURL = "cgi-bin/metadata-server.pl?\
566 a=remove-archives-metadata&amp;\
567 c=" + gs.cgiParams.c + "&amp;\
568 site=localsite&amp;\
569 d=" + gs.cgiParams.d + "&amp;\
570 metaname=gstext." + metaToDelete[l] + "&amp;\
571 metavalue=" + ((l == 0) ? (current.user.name) : (current[metaToDelete[l]]));
572
573 var deleteIndexURL = "cgi-bin/metadata-server.pl?\
574 a=remove-metadata&amp;\
575 c=" + gs.cgiParams.c + "&amp;\
576 site=localsite&amp;\
577 d=" + gs.cgiParams.d + "&amp;\
578 metaname=gstext." + metaToDelete[l] + "&amp;\
579 metavalue=" + ((l == 0) ? (current.user.name) : (current[metaToDelete[l]]));
580
581 var deleteImportURL = "cgi-bin/metadata-server.pl?\
582 a=remove-import-metadata&amp;\
583 c=" + gs.cgiParams.c + "&amp;\
584 site=localsite&amp;\
585 d=" + gs.cgiParams.d + "&amp;\
586 metaname=gstext." + metaToDelete[l] + "&amp;\
587 metavalue=" + ((l == 0) ? (current.user.name) : (current[metaToDelete[l]]));
588 var deleteArchivesCallback =
589 {
590 success:function(){},
591 failed: function(){alert("Failed to save text annotations archives metadata");}
592 }
593 YAHOO.util.Connect.asyncRequest("GET", deleteArchivesURL, deleteArchivesCallback);
594
595 var deleteIndexCallback =
596 {
597 success:function(){},
598 failed: function(){alert("Failed to save text annotations index metadata");}
599 }
600 YAHOO.util.Connect.asyncRequest("GET", deleteIndexURL, deleteIndexCallback);
601
602 var deleteImportCallback =
603 {
604 success:function(){},
605 failed: function(){alert("Failed to save text annotations import metadata");}
606 }
607 YAHOO.util.Connect.asyncRequest("GET", deleteImportURL, deleteImportCallback);
608 }
609 }
610 gs.toDeleteArray = new Array();
611 gs.toDeleteArray.keys = new Array();
612
613 if(gs.annotationArray.keys.length &gt; 0)
614 {
615 var json = "[";
616 for(var i = 0; i &lt; gs.annotationArray.keys.length; i++)
617 {
618 var current = gs.annotationArray[gs.annotationArray.keys[i]];
619 if(current == null){continue;}
620 var metaToAdd = ["user", "text", "tags"];
621
622 for(var j = 0; j &lt; metaToAdd.length; j++)
623 {
624 if(metaToAdd[j] == "user")
625 {
626 json += '{"docid":"' + gs.cgiParams.d + '", "metaname":"gstext.' + metaToAdd[j] + '", "metavalue":"' + current.user.name + '"}';
627 }
628 else
629 {
630 json += '{"docid":"' + gs.cgiParams.d + '", "metaname":"gstext.' + metaToAdd[j] + '", "metavalue":"' + current[metaToAdd[j]] + '"}';
631 }
632
633 if(j != (metaToAdd.length - 1) || i != (gs.annotationArray.keys.length - 1))
634 {
635 json += ',';
636 }
637 }
638 }
639 json += "]";
640
641 var saveArchivesURL = "cgi-bin/metadata-server.pl?a=set-archives-metadata-array&amp;c=" + gs.cgiParams.c + "&amp;site=localsite&amp;collect=" + gs.cgiParams.c + "&amp;json=" + json;
642 var saveIndexURL = "cgi-bin/metadata-server.pl?a=set-metadata-array&amp;c=" + gs.cgiParams.c + "&amp;site=localsite&amp;collect=" + gs.cgiParams.c + "&amp;json=" + json;
643 var saveImportURL = "cgi-bin/metadata-server.pl?a=set-import-metadata-array&amp;c=" + gs.cgiParams.c + "&amp;site=localsite&amp;collect=" + gs.cgiParams.c + "&amp;json=" + json;
644
645 var saveArchivesCallback =
646 {
647 success:function(){console.log("Away to build"); buildFunction(gs.cgiParams.c);},
648 failed: function(){alert("Failed to save text annotations index metadata");}
649 }
650 YAHOO.util.Connect.asyncRequest("GET", saveArchivesURL, saveArchivesCallback);
651
652 var saveIndexCallback =
653 {
654 success:function(){},
655 failed: function(){alert("Failed to save text annotations import metadata");}
656 }
657 YAHOO.util.Connect.asyncRequest("GET", saveIndexURL, saveIndexCallback);
658
659 var saveImportCallback =
660 {
661 success:function(){},
662 failed: function(){alert("Failed to save text annotations import metadata");}
663 }
664 YAHOO.util.Connect.asyncRequest("GET", saveImportURL, saveImportCallback);
665 }
666
667 gs.annotationArray = new Array();
668 gs.annotationArray.keys = new Array();
669 }
670
671 function showRebuildOption()
672 {
673 var buildStatusBar = document.getElementById("buildStatusBar");
674 buildStatusBar.style.visibility = "visible";
675
676 var buildMessage = document.getElementById("buildMessage");
677 buildMessage.innerHTML = 'Please rebuild to index annotations (make annotations searchable): &lt;span id="rebuildButton" style="cursor:pointer; padding:2px;" class="ui-state-default ui-corner-all"&gt;Rebuild&lt;/span&gt;';
678
679 var rebuildButton = document.getElementById("rebuildButton");
680 rebuildButton.onclick = function(){saveAndBuildCollection("peijones");}
681 }
682
683 function showBuildingMessage()
684 {
685 var buildStatusBar = document.getElementById("buildStatusBar");
686 buildStatusBar.style.visibility = "visible";
687
688 var buildMessage = document.getElementById("buildMessage");
689 buildMessage.innerHTML = '&lt;img src="' + gs.imageURLs.loading + '"/&gt; Building...';
690 }
691
692 function initAnnotator()
693 {
694 gs.annotationArray = new Array();
695 gs.annotationArray.keys = new Array();
696
697 gs.toDeleteArray = new Array();
698 gs.toDeleteArray.keys = new Array();
699
700 var elem = document.getElementById("gs-document-text");
701 elem.innerHTML = '&lt;div&gt;&lt;span style="visibility:hidden; padding: 3px;" class="ui-state-default ui-corner-all" id="saveButton"&gt;Reindex annotations&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;' + elem.innerHTML;
702
703 if (typeof $.fn.annotator !== 'function')
704 {
705 alert("Ooops! it looks like you haven't built the Annotator concatenation file. " + "Either download a tagged release from GitHub, or modify the Cakefile to point " + "at your copy of the YUI compressor and run `cake package`.");
706 }
707 else
708 {
709 // Include AnnotateIt credentials to load the store plugin.
710 // $('#gs-document-text').annotator().annotator('setupPlugins', {
711 // userId: 'papitha',
712 // userName: 'Papitha',
713 // accountId: '39fc339cf058bd22176771b3e33c5dac',
714 // authToken: '852b7fc25396d2aedf9aeb44dd58518faa679dbf027892164bfb81900bd09741',
715 $('#gs-document-text').annotator().annotator('setupPlugins', {
716 userId: 'david',
717 userName: 'David',
718 accountId: 'eb096fae65f6377160ffc0eb6c000951',
719 authToken: '92b3279a6b6edbaa2ed7bc4d895ef55c8f1368877bb69987985aa47195d517e7',
720 }, {
721 Store:
722 {
723 prefix: 'http://localhost:5000',
724 annotationData: {'uri':gs.cgiParams.c + "-" + gs.cgiParams.d},
725 loadFromSearch: {'uri':gs.cgiParams.c + "-" + gs.cgiParams.d}
726 }
727 });
728 }
729 }
730 </xsl:text>
731 </script>
732 </xsl:template>
733 <xsl:template name="documentImage">
734 <!-- Get the photo notes for this document node -->
735 <gsf:variable-struct name="photoNotes">
736 <gsf:metadata multiple="true" name="gsimg.photoNote" separator=", "/>
737 </gsf:variable-struct>
738 <!-- Get details about the image for zooming -->
739 <h3>
740 <gsf:choose-metadata>
741 <gsf:metadata name="dc.Title"/>
742 <gsf:metadata name="ex.Title"/>
743 </gsf:choose-metadata>
744 </h3>
745 <xsl:variable name="imageWidth">
746 <gsf:choose-metadata>
747 <gsf:metadata name="ImageWidth"/>
748 <gsf:default>-1</gsf:default>
749 </gsf:choose-metadata>
750 </xsl:variable>
751 <xsl:variable name="imageHeight">
752 <gsf:choose-metadata>
753 <gsf:metadata name="ImageHeight"/>
754 <gsf:default>-1</gsf:default>
755 </gsf:choose-metadata>
756 </xsl:variable>
757 <xsl:variable name="screenImageWidth">
758 <gsf:choose-metadata>
759 <gsf:metadata name="ScreenWidth"/>
760 <gsf:default>-1</gsf:default>
761 </gsf:choose-metadata>
762 </xsl:variable>
763 <xsl:variable name="screenImageHeight">
764 <gsf:choose-metadata>
765 <gsf:metadata name="ScreenHeight"/>
766 <gsf:default>-1</gsf:default>
767 </gsf:choose-metadata>
768 </xsl:variable>
769 <script type="text/javascript">
770 <xsl:text>largeImageHeight =</xsl:text>
771 <xsl:value-of select="$imageHeight"/>
772 <xsl:text>;</xsl:text>
773 <xsl:text>largeImageWidth =</xsl:text>
774 <xsl:value-of select="$imageWidth"/>
775 <xsl:text>;</xsl:text>
776 <xsl:text>smallImageHeight =</xsl:text>
777 <xsl:value-of select="$screenImageHeight"/>
778 <xsl:text>;</xsl:text>
779 <xsl:text>smallImageWidth =</xsl:text>
780 <xsl:value-of select="$screenImageWidth"/>
781 <xsl:text>;</xsl:text>
782 </script>
783 <span class="ui-state-default ui-corner-top" onclick="AddNote();" style="font-size:90%; padding: 3px; cursor:pointer;">New photo annotation</span>
784 <div id="noZoom" style="display:block;">
785 <img id="noZoomImage" style="width: {$screenImageWidth}px; height: {$screenImageHeight}px;">
786 <xsl:attribute name="src"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/<gsf:metadata name="Screen"/></xsl:attribute>
787 </img>
788 <!--
789 <gsf:metadata name="screenicon"/>
790 -->
791 </div>
792 <!--<xsl:if test="$imageHeight != -1">-->
793 <div id="wrap" style="display:none; width: {$screenImageWidth}px; height: {$screenImageHeight}px;">
794 <div id="small" style="width: {$screenImageWidth}px; height: {$screenImageHeight}px;">
795 <!--
796 <gsf:metadata name="screenicon"/>
797 -->
798 <img id="smallImage" style="width: {$screenImageWidth}px; height: {$screenImageHeight}px;">
799 <xsl:attribute name="src"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/<gsf:metadata name="Screen"/></xsl:attribute>
800 </img>
801 </div>
802 <div id="mover">
803 <div id="overlay">
804 <xsl:text> </xsl:text>
805 </div>
806 <div id="large" style="width: {$imageWidth}px; height: {$imageHeight}px;">
807 <img id="largeImage" style="width: {$imageWidth}px; height: {$imageHeight}px;">
808 <xsl:attribute name="src"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/<gsf:metadata name="srclinkFile"/></xsl:attribute>
809 </img>
810 </div>
811 </div>
812 </div>
813
814 <div class="btn btn-primary start" style="margin-bottom:5px;">
815 <a style="color:white;">
816 <xsl:attribute name="href">
817 <xsl:value-of select="$library_name"/>
818 <xsl:text>?downloadFile=</xsl:text>
819 <xsl:text>sites/localsite/collect/</xsl:text>
820 <xsl:value-of select="/page/pageResponse/collection/@name"/>
821 <xsl:text>/index/assoc/</xsl:text>
822 <gsf:metadata name="assocfilepath"/>
823 <xsl:text>/</xsl:text>
824 <gsf:metadata name="SourceFile"/>
825 </xsl:attribute>
826 <xsl:text>Download Image</xsl:text>
827 </a>
828 </div>
829
830 <xsl:choose>
831 <xsl:when test="/page/pageRequest/paramList/param[@name = 'p.oldUpload']/@value = 'true'">
832 <form action="dev?a=d&amp;c={/page/pageResponse/collection/@name}&amp;d={/page/pageResponse/document/documentNode/@nodeID}&amp;dt=simple&amp;ed=1" enctype="multipart/form-data" method="post">
833 <input name="fl" type="hidden">
834 <xsl:attribute name="value">
835 <xsl:text>/sites/localsite/collect/</xsl:text>
836 <xsl:value-of select="/page/pageResponse/collection/@name"/>
837 <xsl:text>/index/assoc/</xsl:text>
838 <gsf:metadata name="assocfilepath"/>
839 <xsl:text>/</xsl:text>
840 <gsf:metadata name="SourceFile"/>
841 <xsl:text>:</xsl:text>
842 <xsl:text>/sites/localsite/collect/</xsl:text>
843 <xsl:value-of select="/page/pageResponse/collection/@name"/>
844 <xsl:text>/index/assoc/</xsl:text>
845 <gsf:metadata name="assocfilepath"/>
846 <xsl:text>/</xsl:text>
847 <gsf:metadata name="Screen"/>
848 <xsl:text>:</xsl:text>
849 <xsl:text>/sites/localsite/collect/</xsl:text>
850 <xsl:value-of select="/page/pageResponse/collection/@name"/>
851 <xsl:text>/index/assoc/</xsl:text>
852 <gsf:metadata name="assocfilepath"/>
853 <xsl:text>/</xsl:text>
854 <gsf:metadata name="Thumb"/>
855 </xsl:attribute>
856 </input>
857
858 <div>
859 Upload replacement file:<br/>
860 <input name="datafile" size="40" type="file"/><br/>
861 <input type="submit" value="Send"/>
862 </div>
863 </form>
864 </xsl:when>
865 <xsl:otherwise>
866 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/tmpl.min.js"><xsl:text> </xsl:text></script>
867 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/load-image.min.js"><xsl:text> </xsl:text></script>
868
869 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/jquery.iframe-transport.js"><xsl:text> </xsl:text></script>
870 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/jquery.fileupload.js"><xsl:text> </xsl:text></script>
871 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/jquery.fileupload-ui.js"><xsl:text> </xsl:text></script>
872 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/application.js"><xsl:text> </xsl:text></script>
873
874 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/bootstrap.min.js"><xsl:text> </xsl:text></script>
875 <script src="sites/localsite/collect/peijones/js/jQuery-File-Upload/bootstrap-image-gallery.min.js"><xsl:text> </xsl:text></script>
876
877 <link href="sites/localsite/collect/peijones/js/jQuery-File-Upload/jquery.fileupload-ui.css" rel="stylesheet"/>
878 <link href="sites/localsite/collect/peijones/js/jQuery-File-Upload/bootstrap.min.css" rel="stylesheet"/>
879 <link href="sites/localsite/collect/peijones/js/jQuery-File-Upload/bootstrap-responsive.min.css" rel="stylesheet"/>
880 <!--[if lt IE 7]><link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap-ie6.min.css"><![endif]-->
881 <link href="sites/localsite/collect/peijones/js/jQuery-File-Upload/cors/bootstrap-image-gallery.min.css" rel="stylesheet"/>
882
883 <script type="text/javascript">
884 <xsl:text disable-output-escaping="yes">
885 $(window).load(function()
886 {
887 $('#fileupload').fileupload();
888 $('#fileupload').bind('fileuploaddone', function (e, data)
889 {
890 var nzImg = document.getElementById("noZoomImage");
891 nzImg.setAttribute("src", nzImg.getAttribute("src") + "?" + (new Date()).getTime());
892
893 var smallImg = document.getElementById("smallImage");
894 smallImg.setAttribute("src", smallImg.getAttribute("src") + "?" + (new Date()).getTime());
895
896 var largeImg = document.getElementById("largeImage");
897 largeImg.setAttribute("src", largeImg.getAttribute("src") + "?" + (new Date()).getTime());
898
899 readyImagesForZoom();
900 });
901 });
902 </xsl:text>
903 </script>
904
905 <script id="template-upload" type="text/html">
906 <xsl:text disable-output-escaping="yes">
907 {% for (var i=0, files=o.files, l=files.length, file=files[0]; i&lt;l; file=files[++i]) { %}
908 &lt;tr class="template-upload fade"&gt;
909 &lt;td class="preview"&gt;&lt;span class="fade"&gt;&lt;/span&gt;&lt;/td&gt;
910 &lt;td class="name"&gt;{%=file.name%}&lt;/td&gt;
911 &lt;td class="size"&gt;{%=o.formatFileSize(file.size)%}&lt;/td&gt;
912 {% if (file.error) { %}
913 &lt;td class="error" colspan="2"&gt;&lt;span class="label label-important"&gt;Error&lt;/span&gt; {%=fileUploadErrors[file.error] || file.error%}&lt;/td&gt;
914 {% } else if (o.files.valid &amp;&amp; !i) { %}
915 &lt;td&gt;
916 &lt;div class="progress progress-success progress-striped active"&gt;&lt;div class="bar" style="width:0%;"&gt;&lt;/div&gt;&lt;/div&gt;
917 &lt;/td&gt;
918 &lt;td class="start"&gt;{% if (!o.options.autoUpload) { %}
919 &lt;button class="btn btn-primary"&gt;
920 &lt;i class="icon-upload icon-white"&gt;&lt;/i&gt; Start
921 &lt;/button&gt;
922 {% } %}&lt;/td&gt;
923 {% } else { %}
924 &lt;td colspan="2"&gt;&lt;/td&gt;
925 {% } %}
926 &lt;td class="cancel"&gt;{% if (!i) { %}
927 &lt;button class="btn btn-warning"&gt;
928 &lt;i class="icon-ban-circle icon-white"&gt;&lt;/i&gt; Cancel
929 &lt;/button&gt;
930 {% } %}&lt;/td&gt;
931 &lt;/tr&gt;
932 {% } %}
933 </xsl:text>
934 </script>
935
936 <script id="template-download" type="text/html">
937 <xsl:text disable-output-escaping="yes">
938 {% for (var i=0, files=o.files, l=files.length, file=files[0]; i&lt;l; file=files[++i]) { %}
939 &lt;tr class="template-download fade"&gt;
940 {% if (file.error) { %}
941 &lt;td&gt;&lt;/td&gt;
942 &lt;td class="name"&gt;{%=file.name%}&lt;/td&gt;
943 &lt;td class="size"&gt;{%=o.formatFileSize(file.size)%}&lt;/td&gt;
944 &lt;td class="error" colspan="2"&gt;&lt;span class="label label-important"&gt;Error&lt;/span&gt; {%=fileUploadErrors[file.error] || file.error%}&lt;/td&gt;
945 {% } else { %}
946 &lt;td class="preview"&gt;{% if (file.thumbnail_url) { %}
947 &lt;a href="{%=file.url%}" title="{%=file.name%}" rel="gallery"&gt;&lt;img src="{%=file.thumbnail_url%}" style="height:100px;"/&gt;&lt;/a&gt;
948 {% } %}&lt;/td&gt;
949 &lt;td class="name"&gt;
950 &lt;a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&amp;&amp;'gallery'%}"&gt;{%=file.name%}&lt;/a&gt;
951 &lt;/td&gt;
952 &lt;td class="size"&gt;{%=o.formatFileSize(file.size)%}&lt;/td&gt;
953 &lt;td colspan="2"&gt;&lt;/td&gt;
954 {% } %}
955 &lt;/tr&gt;
956 {% } %}
957 </xsl:text>
958 </script>
959
960 <form action="dev" enctype="multipart/form-data" id="fileupload" method="POST">
961 <input name="ajaxUpload" type="hidden" value="true"/>
962 <input name="fl" type="hidden">
963 <xsl:attribute name="value">
964 <xsl:text>/sites/localsite/collect/</xsl:text>
965 <xsl:value-of select="/page/pageResponse/collection/@name"/>
966 <xsl:text>/index/assoc/</xsl:text>
967 <gsf:metadata name="assocfilepath"/>
968 <xsl:text>/</xsl:text>
969 <gsf:metadata name="SourceFile"/>
970 <xsl:text>:</xsl:text>
971 <xsl:text>/sites/localsite/collect/</xsl:text>
972 <xsl:value-of select="/page/pageResponse/collection/@name"/>
973 <xsl:text>/index/assoc/</xsl:text>
974 <gsf:metadata name="assocfilepath"/>
975 <xsl:text>/</xsl:text>
976 <gsf:metadata name="Screen"/>
977 <xsl:text>:</xsl:text>
978 <xsl:text>/sites/localsite/collect/</xsl:text>
979 <xsl:value-of select="/page/pageResponse/collection/@name"/>
980 <xsl:text>/index/assoc/</xsl:text>
981 <gsf:metadata name="assocfilepath"/>
982 <xsl:text>/</xsl:text>
983 <gsf:metadata name="Thumb"/>
984 </xsl:attribute>
985 </input>
986 <div class="row fileupload-buttonbar">
987 <div class="span6" style="margin-left:30px;">
988 <span class="btn btn-success fileinput-button">
989 <span><i class="icon-plus icon-white"><xsl:text> </xsl:text></i> Add files...</span>
990 <input multiple="" name="files[]" type="file"/>
991 </span>
992 <button class="btn btn-primary start" type="submit">
993 <i class="icon-upload icon-white"><xsl:text> </xsl:text></i> Start upload
994 </button>
995 <button class="btn btn-warning cancel" type="reset">
996 <i class="icon-ban-circle icon-white"><xsl:text> </xsl:text></i> Cancel upload
997 </button>
998 </div>
999 <div class="span6">
1000 <div class="progress progress-success progress-striped active fade">
1001 <div class="bar" style="width:0%;"><xsl:text> </xsl:text></div>
1002 </div>
1003 </div>
1004 </div>
1005 <br/>
1006 <table class="table table-striped"><tbody class="files" data-target="#modal-gallery" data-toggle="modal-gallery"><xsl:text> </xsl:text></tbody></table>
1007 </form>
1008 </xsl:otherwise>
1009 </xsl:choose>
1010 <!--</xsl:if>-->
1011 </xsl:template>
1012 </format></display><replaceListRef id="gs2-standard"/><replaceListRef id="gs2-image"/><serviceRackList>
1013 <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
1014 <serviceRack name="OAIPMH">
1015 <ListMetadataFormats>
1016 <!--What metadata sets to support is collection specific. To support other metadata schema, simply add a metadataFormat element here.
1017 The support of unqualified Dublin Core metadata set is mandatory in the oai specification.
1018 -->
1019 <metadataFormat metadataPrefix="oai_dc">
1020 <metadataPrefix>oai_dc</metadataPrefix>
1021 <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
1022 <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>
1023 <!--<metadataElements>dc.Title,dc.Creator,dc.Subject,dc.Description,dc.Publisher,dc.Contributor,dc.Date,dc.Type,dc.Format,dc.Identifier,dc.Source,dc.Language,dc.Relation,dc.Coverage,dc.Rights</metadataElements>
1024 -->
1025 <mappingList>
1026 <!--
1027 The mapping is in the form: <publicly supported metadata name>,<mapped metadata name>, short as <A>,<B>
1028 The first metadata name is medatory; if there is no mapped name followed, then the first name must be used by the records and
1029 searchable in the database, otherwise it is the mapped name stored in the database. The number of mapping elements matches the
1030 number of external metadata of the records. If only one name is present, the returned metadata will use this name plus the retrieved value;
1031 if both <A>,<B> are present, the returned metadata will use <A>'s name plus <B>'s value retrieved from database.
1032
1033 **Bear in mind: if this mapping list is not present, the standard dc. metadata names (15 in total) will be used to retrieve metadata in the database.
1034
1035 **The only case when this mapping is not present is that: 1. this metadata format is oai_dc; 2. the metadata is also stored in the database by Dublin Core's names.
1036 -->
1037 <mapping>dc.Title,Title</mapping>
1038 <!-- This mapping example means that the dc.Title is requested and the value of the metadata Title, which is used in this repository, is returned as response. -->
1039 </mappingList>
1040 </metadataFormat>
1041 </ListMetadataFormats>
1042 </serviceRack>
1043 </serviceRackList></CollectionConfig>
Note: See TracBrowser for help on using the repository browser.