fc1fd38ec11596d261d8559e28d0196078a733c0
[Evergreen.git] / Open-ILS / web / vandelay / vandelay.xml
1 <!-- 
2 # Copyright (C) 2008  Georgia Public Library Service
3 # Bill Erickson <erickson@esilibrary.com>
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 -->
14
15 <!DOCTYPE html PUBLIC 
16         "-//W3C//DTD XHTML 1.0 Transitional//EN" 
17         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
18         <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
19 ]>
20
21 <html xmlns='http://www.w3.org/1999/xhtml'>
22     <head>
23         <title>Vandelay</title>
24         <link type='text/css' rel='stylesheet' href="/vandelay/vandelay.css"/>
25         <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:false" src="/js/dojo/dojo/dojo.js"></script>
26         <script type="text/javascript" src='/js/dojo/openils/MarcXPathParser.js'></script>
27         <script type="text/javascript" src='/vandelay/vandelay.js'></script>
28     </head>
29     <body class="tundra tall">
30       <div dojoType="dijit.layout.LayoutContainer" orientation="vertical" class="tall">
31
32
33         <!-- navigation toolbar -->
34         <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
35             <div dojoType="dijit.Toolbar" id='toolbar'>
36                 <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy" 
37                     onclick="displayGlobalDiv('vl-marc-upload-div');" showLabel="true">Import Records</div>
38                 <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy" 
39                     onclick="vlShowQueueSelect();" showLabel="true">Inspect Queue</div>
40
41                 <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy" 
42                      onclick="vlShowBibAttrDefs();" showLabel="true">Bib Attr Definitions</div>
43             </div>
44         </div>
45
46         <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id="vl-generic-progress" class='progress'>
47             <div dojoType="dijit.ProgressBar" style="width:300px" indeterminate="true"></div>
48         </div>
49         <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id="vl-generic-progress-with-total" class='hidden progress'>
50             <div dojoType="dijit.ProgressBar" jsId='vlControlledProgressBar' style="width:300px"></div>
51         </div>
52
53         <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-upload-status-div' class='hidden'>
54             <h1>Upload Status</h1><br/>
55             <div id='vl-upload-status-uploading'><h3>Uploading...</h3></div>
56             <div id='vl-upload-status-processing' class='hidden'>
57                 <h3>Processing... <span id='vl-upload-status-count'/></h3>
58             </div>
59         </div>
60
61         <!-- MARC upload form -->
62         <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-upload-div' class='hidden'>
63             <h1>Evergreen MARC File Upload</h1><br/>
64             <form id="vl-marc-upload-form" enctype="multipart/form-data">
65                 <input type='hidden' name='ses' id='vl-ses-input'/>
66                 <table class='form_table'>
67                     <tr>
68                         <td>Record Type</td>
69                         <td colspan='4'>
70                             <select id='vl-record-type' dojoType='dijit.form.FilteringSelect' 
71                                     jsId='vlUploadRecordType' onchange='vlShowUploadForm();'>
72                                 <option value='bib' selected='selected'>Bibliographic Records</option>
73                                 <option value='auth'>Authority Records</option>
74                             </select>
75                         </td>
76                     </tr>
77                     <tr>
78                         <td>Create a New Upload Queue</td>
79                         <td>
80                             <input type='text' dojoType='dijit.form.TextBox' id='vl-queue-name' size='32'></input>
81                         </td>
82                         <td>or Add to an Existing Queue</td>
83                         <td>
84                             <select jsId='vlUploadQueueSelector' dojoType='dijit.form.FilteringSelect'>
85                             </select>
86                         </td>
87                     </tr>
88                     <tr>
89                         <td>Auto-Import Non-Colliding Records</td>
90                         <td colspan='4'>
91                             <input jsId='vlUploadQueueAutoImport' dojoType='dijit.form.CheckBox'/>
92                         </td>
93                     </tr>
94                     <tr>
95                         <td>
96                             <span id="vl-file-label">File to Upload:</span>
97                         </td>
98                         <td id='vl-input-td' colspan='4'>
99                             <input size='48' type="file" name="marc_upload"/>
100                         </td>
101                     </tr>
102                     <tr>
103                         <td align='center' colspan='4'>
104                             <button dojoType="dijit.form.Button" onclick="batchUpload()">Upload</button>
105                         </td>
106                     </tr>
107                 </table>
108             </form>
109         </div>
110
111         <!-- record queue grid -->
112         <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-queue-div' class='tall hidden'>
113             <h1>Record Queue</h1><br/>
114             <script>
115                 var vlQueueGridLayout;
116                 function resetVlQueueGridLayout() {
117                     vlQueueGridLayout = [{
118                         defaultCell: {styles: 'text-align: center;'},
119                         cells : [[
120                             {name: '&lt;input id="vl-queue-grid-row-selector" type="checkbox" onclick="vlToggleQueueGridSelect();"/>', 
121                                 get: vlQueueGridDrawSelectBox },
122                             {   name: 'View MARC', 
123                                 get: vlGetViewMARC, 
124                                 value:'&lt;a href="javascript:void(0);" onclick="vlLoadMARCHtml(RECID, false, '+
125                                     'function(){displayGlobalDiv(\'vl-queue-div\');});">View MARC&lt;/a>'
126                             },
127                             {   name: 'Matches', 
128                                 get: vlGetViewMatches,
129                                 value:'&lt;a href="javascript:void(0);" onclick="vlLoadMatchUI(RECID);">Matches&lt;/a>'
130                             },
131                             {name: 'Import Time', field:'import_time', get:vlGetDateTimeField, selectableColumn:true}
132                         ]]
133                     }];
134                 }
135             </script>
136             <div id='vl-queue-div-grid' class='tall' dojoType="dijit.layout.ContentPane" layoutAlign='client'>
137
138                 <!-- column picker dialog -->
139                 <div dojoType="dijit.Dialog" jsId='vlQueueGridColumePickerDialog' title="Column Picker" execute="alert(2);">
140                     <table class='form_table'>
141                         <thead>
142                             <tr><th width='33%'>Column</th><th width='33%'>Display</th><th width='33%'>Auto Width</th></tr>
143                         </thead>
144                         <tbody>
145                             <tr>
146                                 <td colspan='3' align='center'>
147                                     <button jsId='vlQueueGridColumnPickerButton' 
148                                         onclick='vlQueueGridColumePickerDialog.hide();vlQueueGridColumePicker.update();' 
149                                         dojoType='dijit.form.Button'>Done</button>
150                                 </td>
151                             </tr>
152                         </tbody>
153                     </table>
154                 </div>
155
156                 <!-- queue grid navigation row -->
157                 <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
158                     <table width='100%' style='margin-bottom:0px;'>
159                         <tr>
160                             <td align='left'>
161                                 <button dojoType='dijit.form.Button' onclick='vlImportSelectedRecords();'>Import Selected</button>
162                                 <button dojoType='dijit.form.Button' onclick="
163                                     if(confirm('Are you sure want to delete this queue?')) {
164                                         vlDeleteQueue(currentType, currentQueueId, 
165                                             function() { displayGlobalDiv('vl-marc-upload-div'); });
166                                     }">Delete Queue</button>
167                             </td>
168                             <td align='middle'>
169                                 <style>.filter_td { padding-right: 5px; border-right: 2px solid #e8e1cf; } </style>
170                                 <table><tr>
171                                     <td class='filter_td'>
172                                         Limit to Collision Matches
173                                         <input dojoType='dijit.form.CheckBox' jsId='vlQueueGridShowMatches' checked='checked'/>
174                                     </td>
175                                     <td class='filter_td' style='padding-left:5px;'>
176                                         Results Per Page 
177                                         <select style='width:68px;' jsId='vlQueueDisplayLimit' dojoType='dijit.form.FilteringSelect' value='10'>
178                                             <option value='10'>10</option>
179                                             <option value='20'>20</option>
180                                             <option value='50'>50</option>
181                                             <option value='100'>100</option>
182                                         </select>
183                                     </td>
184                                     <td class='filter_td' style='padding-left:5px;'>
185                                         Page <input style='width:36px;' dojoType='dijit.form.TextBox' jsId='vlQueueDisplayPage' value='1'/>
186                                     </td>
187                                     <td style='padding-left:5px;'>
188                                         <button dojoType='dijit.form.Button' 
189                                             onclick='retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords)'>Refresh</button>
190                                     </td>
191                                 </tr></table>
192                             </td>
193                             <td align='right' valign='bottom'>
194                                 <span style='padding-right:4px;'>
195                                     <a href='javascript:void(0);' onclick='vlQueueGridPrevPage();'>&#171; Previous Page</a>
196                                 </span>
197                                 <span style='padding-right:10px;'>
198                                     <a href='javascript:void(0);' onclick='vlQueueGridNextPage();'>Next Page &#187;</a>
199                                 </span>
200                                 <span style='background:#e8e1cf;padding:3px 0px 0px 6px;-moz-border-radius:6px 0px 0px 0px;'>
201                                     <a href='javascript:void(0);' onclick='vlQueueGridColumePickerDialog.show();'>Select Columns</a>
202                                 </span>
203                             </td>
204                         </tr>
205                     </table>
206                 </div>
207
208                 <!-- Queue Grid -->
209                 <div class='' style='height:90%;' dojoType="dijit.layout.ContentPane" layoutAlign='client'>
210                     <div dojoType='dojox.Grid' jsId='vlQueueGrid'> </div>
211                 </div>
212             </div>
213         </div>
214
215         <!-- Grid of record matches -->
216         <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-match-div' class='tall hidden'>
217             <script>
218                 var vlMatchGridLayout;
219                 function resetVlMatchGridLayout() {
220                     vlMatchGridLayout = [{
221                         defaultCell: {styles: 'text-align: center;'},
222                         cells : [[
223                             {
224                                 name: 'Overlay Target', 
225                                 get: vlGetOverlayTargetSelector,
226                                 value: '&lt;input type="radio" name="overlay_target" '+
227                                     'onclick="vlHandleOverlayTargetSelected();" id="vl-overlay-target-ID"/>'
228                             },
229                             {name:'Source Match Point', field:'src_matchpoint'},
230                             {name:'Destination Match Point', field:'dest_matchpoint'},
231                             {name: 'ID', field:'id'},
232                             {   name: 'View MARC', 
233                                 get: vlGetViewMARC, 
234                                 value:'&lt;a href="javascript:void(0);" onclick="vlLoadMARCHtml(RECID, '+
235                                     'true, function(){displayGlobalDiv(\'vl-match-div\');});">View MARC&lt;/a>'
236                             },
237                             {name: 'Creator', get: vlGetCreator},
238                             {name: 'Create Date', field:'create_date', get: vlGetDateTimeField},
239                             {name: 'Last Edit Date', field:'edit_date', get: vlGetDateTimeField},
240                             {name: 'Source', field:'source'},
241                             {name: 'TCN Source', field:'tcn_source'},
242                             {name: 'TCN Value', field:'tcn_value'}
243                         ]]
244                     }];
245                 }
246             </script>
247             <h1>Import Matches</h1><br/>
248             <div>
249                 <button dojoType='dijit.form.Button' 
250                     onclick="displayGlobalDiv('vl-queue-div');">&#x2196; Back To Import Queue</button>
251                 <span style='padding-left:20px;'>
252                     <input dojoType='dijit.form.CheckBox' jsId='vlOverlayTargetEnable' onclick='vlHandleOverlayTargetSelected'/> 
253                     Overlay selected record with imported record
254                 </span>
255             </div>
256             <div class='tall'>
257                 <div dojoType='dojox.Grid' jsId='vlMatchGrid'> </div>
258             </div>
259         </div>
260
261         <!-- MARC as HTML -->
262         <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-marc-html-div' class='tall hidden'>
263             <h1>MARC Record</h1><br/>
264             <div>
265                 <button id='vl-marc-html-done-button' dojoType='dijit.form.Button'>&#x2196; Return</button>
266             </div>
267             <div>
268                 <style>#vl-marc-record-html td {padding:0px;}</style>
269                 <div id='vl-marc-record-html'> </div>
270             </div>
271         </div>
272
273         <!-- Form for choosing which queue to view -->
274         <div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-queue-select-div' class='tall hidden'>
275             <h1>Select a Queue to Inspect</h1><br/>
276             <table class='form_table'>
277                 <tr>
278                     <td>Queue Type</td>
279                     <td>
280                         <select jsId='vlQueueSelectType' dojoType='dijit.form.FilteringSelect' onchange='vlShowQueueSelect();'>
281                             <option value='bib' selected='selected'>Bibliographic Records</option>
282                             <option value='auth'>Authority Records</option>
283                         </select>
284                     </td>
285                 </tr>
286                 <tr>
287                     <td>Queue</td>
288                     <td>
289                         <select jsId='vlQueueSelectQueueList' dojoType='dijit.form.FilteringSelect'>
290                         </select>
291                     </td>
292                 </tr>
293                 <tr>
294                     <td colspan='2'>
295                         <button dojoType='dijit.form.Button' onclick='vlFetchQueueFromForm();'>Retrieve Queue</button>
296                     </td>
297                 </tr>
298             </table>
299         </div>
300
301         <!-- bib attribute definitions  -->
302         <div dojoType="dijit.layout.ContentPane"  id="vl-bib-attr-defs-div"
303                 class='hidden bib-attr-detail-content-pane' title="Bib Attr Definition" style='height:400px;' layoutAlign="client">
304
305             <div class='vl-bib-attr-defs-actions-div' style='margin:8px;'>
306
307                 <div dojoType="dijit.form.DropDownButton" id="vl-create-bib-attr-button">
308                     <span name="create">Create Attribute Definition</span>
309                     <span name="update" class="hidden">Update Attribute Definition</span>
310
311                     <div dojoType="dijit.TooltipDialog" execute="saveNewBibAttrRecord(arguments[0]);" id="bib-attr-dialog">
312                         <script type='dojo/connect' event='onOpen'>onAttrEditorOpen();</script>
313                         <script type='dojo/connect' event='onClose'>onAttrEditorClose();</script>
314                         <table class='dijitTooltipTable'>
315                             <tr>
316                                 <td><label for="code">Code: </label></td>
317                                 <td><input id='oils-bib-attr-code' name="code" dojoType="dijit.form.TextBox"/></td>
318                             </tr>
319                             <tr>
320                                 <td><label for="description">Description: </label></td>
321                                 <td><input id='bib-attr-description' dojoType="dijit.form.TextBox" name="description"> </input></td>
322                             </tr>
323                             <tr>
324                                 <td><label for="amount">Tag(s): </label></td>
325                                 <td><input id="bib-attr-tag" dojoType="dijit.form.TextBox" name="tag"></input>
326                                 <div class="hidden" id="bib-attr-tag-tip">
327                                 <p>You can enter multiple tags, separated by spaces and/or commas.</p>
328                                 <p>Example: <code>120, 220, 300</code> or <code>120 220 330</code></p></div>
329                                 </td>
330                             </tr>
331
332                             <tr>
333                                 <td><label for="amount">Subfield(s): </label></td>
334                                 <td><input dojoType="dijit.form.TextBox" name="subfield" id="bib-attr-subfield"></input></td>
335                                 <div class="hidden" id="bib-attr-subfield-tip">
336                                 <p>You can enter multiple subfields, separated by spaces and/or commas.</p>
337                                 <p>Example: <code>a, b, j, x</code> or <code>a b j x</code></p></div>
338
339                             </tr>
340                             <tr>
341                                 <td><label for="ident">Identifer Field?: </label></td>
342                                 <td>
343                                     <select dojoType="dijit.form.FilteringSelect" name="ident" id="bib-attr-ident-selector">
344                                         <option value='f' selected='selected'>False</option>
345                                         <option value='t'>True</option>
346                                     </select>
347                                 </td>
348                             </tr>
349                             <tr>
350                                 <td><label for="amount">XPath (advanced): </label></td>
351
352                                 <td><input dojoType="dijit.form.TextBox" id="bib-attr-xpath" name="xpath"></input></td>
353                             </tr>
354                             <tr>
355                                 <td><label for="amount">Remove (advanced): </label></td>
356
357                                 <td><input dojoType="dijit.form.TextBox" id="bib-attr-remove" name="remove"></input></td>
358                             </tr>
359                             <tr class="create_bar">
360                                 <td colspan='2' align='center'>
361                                     <button dojoType="dijit.form.Button" type="submit" 
362                                             id="bib-attr-create-button">Create</button>
363                                     <button type="button" dojoType="dijit.form.Button"
364                                             onclick="dijit.byId('bib-attr-dialog').onCancel();">Cancel</button>
365                                 </td>
366                             </tr>
367                             <tr class="update_bar">
368                                 <td colspan='2' align='center'>
369                                     <button dojoType="dijit.form.Button" type="submit" 
370                                             id="bib-attr-update-button">Update</button>
371                                     <button type="button" dojoType="dijit.form.Button"
372                                             onclick="dijit.byId('bib-attr-dialog').onCancel();">Cancel</button>
373                                     <button dojoType="dijit.form.Button" 
374                                             type="button" 
375                                             id="bib-attr-delete-button"
376                                             style="padding-left: 2em;">Delete record</button>
377                                 </td>
378                             </tr>
379                         </table>
380
381                     </div>
382                 </div>
383
384             </div>
385             <script>
386                 var bibAttrGridLayout = [{
387                 cells : [[
388                 {name: 'ID', field: 'id'},
389                 {name: 'Code', field:'code', width:'auto'},
390                 {name: 'Description', field: "description", width:'auto'}, 
391                 {name: 'Tag', get:getTag},
392                 {name: 'Subfield', get: getSubfield},
393                 {name: 'Identifier', field:'ident'},
394                 {name: 'XPath', field:'xpath', width:'auto'},
395                 {name: 'Remove', field:'remove', width:'auto'}
396                 ]]
397                 }];
398               </script>
399
400               <div class='tall'>
401                 <div dojoType='dojox.Grid' jsId='bibAttrGrid'> </div>
402               </div>
403
404         </div>
405
406         <div style='text-align:center;width:100%;' dojoType="dijit.layout.ContentPane" layoutAlign='bottom'>
407             Powered by Evergreen!
408         </div>
409       </div>
410     </body>
411 </html>