added import profile selector and auto-merge-1-match options to main upload page
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 24 Mar 2010 18:32:46 +0000 (18:32 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 24 Mar 2010 18:32:46 +0000 (18:32 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15954 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xml
Open-ILS/web/js/ui/default/vandelay/vandelay.js
Open-ILS/web/opac/locale/en-US/vandelay.dtd
Open-ILS/web/templates/default/vandelay/inc/profiles.tt2
Open-ILS/web/templates/default/vandelay/inc/upload.tt2

index 52cb226..d6844f0 100644 (file)
@@ -146,7 +146,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
                                <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
-                               <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
+                               <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
                                <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
                                <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
                        </actions>
index 8f10cc3..0af7275 100644 (file)
@@ -42,6 +42,7 @@ dojo.require('openils.widget.GridColumnPicker');
 dojo.require('openils.PermaCrud');
 dojo.require('openils.widget.OrgUnitFilteringSelect');
 dojo.require('openils.widget.AutoGrid');
+dojo.require('openils.widget.AutoFieldWidget');
 
 
 var globalDivs = [
@@ -102,6 +103,12 @@ function vlInit() {
             runStartupCommands();
     }
 
+    var profiles = new openils.PermaCrud().retrieveAll('vmp');
+    vlUploadMergeProfile.store = new dojo.data.ItemFileReadStore({data:fieldmapper.vmp.toStoreData(profiles)});
+    vlUploadMergeProfile.labelAttr = 'name';
+    vlUploadMergeProfile.searchAttr = 'name';
+    vlUploadMergeProfile.startup();
+
     // Fetch the bib and authority attribute definitions 
     vlFetchBibAttrDefs(function () { checkInitDone(); });
     vlFetchAuthAttrDefs(function () { checkInitDone(); });
@@ -838,6 +845,17 @@ function vlImportRecordQueue(type, queueId, noMatchOnly, onload) {
         vlUploadQueueAutoOverlayExact.checked = false;
     }
 
+    if(vlUploadQueueAutoOverlay1Match.checked) {
+        options.auto_overlay_1match = true;
+        vlUploadQueueAutoOverlay1Match.checked = false;
+    }
+
+    
+    var profile = vlUploadMergeProfile.attr('value');
+    if(profile != null && profile != '') {
+        options.merge_profile = profile;
+    }
+
     fieldmapper.standardRequest(
         ['open-ils.vandelay', method],
         {   async: true,
@@ -877,7 +895,7 @@ function batchUpload() {
     currentType = dijit.byId('vl-record-type').getValue();
 
     var handleProcessSpool = function() {
-        if(vlUploadQueueAutoImport.checked || vlUploadQueueAutoOverlayExact.checked) {
+        if(vlUploadQueueAutoImport.checked || vlUploadQueueAutoOverlayExact.checked || vlUploadQueueAutoOverlay1Match.checked) {
 
             vlImportRecordQueue(
                 currentType, 
index 1f64fda..f0a3369 100644 (file)
@@ -3,6 +3,8 @@
 <!ENTITY vandelay.auth.records "Authority Records">
 <!ENTITY vandelay.auto.import.noncolliding "Auto-Import Non-Colliding Records">
 <!ENTITY vandelay.auto.import.auto_overlay_exact "Auto Merge/Overlay Exact Matches">
+<!ENTITY vandelay.auto.import.auto_overlay_1match "Auto Merge/Overlay When Exactly 1 Match is Found">
+<!ENTITY vandelay.auto.import.merge_profile "Merge/Overlay Profile">
 <!ENTITY vandelay.auto.width "Auto Width">
 <!ENTITY vandelay.back.to.import.queue "Back To Import Queue">
 <!ENTITY vandelay.bib.attrs "Bibliographic attributes">
index d5f2bcd..5bd4d4d 100644 (file)
@@ -1,6 +1,4 @@
-<script src='[% ctx.media_prefix %]/js/ui/default/vandelay/vandelay.js'> </script>
-
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
         <div>Overlay / Merge Profiles</div>
         <div>
index 8691c4d..8ab8687 100644 (file)
@@ -19,7 +19,7 @@
             </td>
             <td>&vandelay.add.existing.queue;</td>
             <td>
-                <select jsId='vlUploadQueueSelector' dojoType='dijit.form.FilteringSelect'>
+                <select jsId='vlUploadQueueSelector' dojoType='dijit.form.FilteringSelect' required='false'>
                 </select>
             </td>
         </tr>
             </td>
         </tr>
         <tr>
+            <td>&vandelay.auto.import.auto_overlay_1match;</td>
+            <td colspan='4'>
+                <input jsId='vlUploadQueueAutoOverlay1Match' dojoType='dijit.form.CheckBox'/>
+            </td>
+        </tr>
+        <tr>
+            <td>&vandelay.auto.import.merge_profile;</td>
+            <td colspan='4'>
+                <div jsId='vlUploadMergeProfile' dojoType='dijit.form.FilteringSelect' required='false' labelAttr='name' searchAttr='name'/>
+            </td>
+        </tr>
+        <tr>
             <td>Import Attached Holdings</td>
             <td colspan='4'>
                 <input jsId='vlUploadQueueHoldingsImport' dojoType='dijit.form.CheckBox'/>