big re-work of the provider config page
[working/Evergreen.git] / Open-ILS / web / templates / default / conify / global / acq / provider.tt2
index 1b28daa..8fffef7 100644 (file)
@@ -1,16 +1,54 @@
 [% WRAPPER default/base.tt2 %]
 <script src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/provider.js'> </script>
 <script> var providerId = '[% ctx.page_args.0 %]';</script>
+ <script type ="text/javascript">
+        function formatName(inDatum) {
+        switch (inDatum) {
+        case 'owning_lib':
+        return 'Owning Library';
+        case 'quantity':
+        return 'Quantity';
+        case 'call_number':
+        return 'Call Number';
+        case 'fund_code':
+        return 'Fund Code';
+        case 'local_note':
+        return 'Local Note';
+        case 'price':
+        return 'Price';
+        case 'circ-Modifier':
+        return 'Circulation Modifier';
+        case 'copy_location':
+        return 'Copy Location';
+        case 'collection_code':
+        return 'Collection Code';
+        }
+        }
 
-
-<div id='provider-list-div'>
-    <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ </script>
+<div class="hidden"><select dojoType="dijit.form.FilteringSelect" jsId="nameSelect">
+    <option value='owning_lib'>Owning Library</option>
+    <option value='quantity'>Quantity</option>
+    <option value='call_number'>Call Number</option>
+    <option value='fund_code'>Fund Code</option>
+    <option value='local_note'>Local Note</option>
+    <option value='price'>Price</option>
+    <option value='circ_modifier'>Circulation Modifier</option>
+    <option value='copy_location'>Copy Locations</option>
+    <option value='collection_code'>Collection Code</option>
+</select>
+</div> 
+<div id='provider-list-div' style='height: 600px;'>
+    <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
-        <div>Provider</div>
-        <div>
-            <button dojoType='dijit.form.Button' onClick='pListGrid.showCreateDialog()'>New Provider</button>
-            <button dojoType='dijit.form.Button' onClick='pListGrid.deleteSelected()'>Delete Selected</button> </div>
+            <div>Provider</div>
+            <div>
+                <button dojoType='dijit.form.Button' onClick='pListGrid.showCreateDialog()'>New Provider</button>
+                <button dojoType='dijit.form.Button' onClick='pListGrid.deleteSelected()'>Delete Selected</button> </div>
         </div>
+    </div>
+    <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:90%'>
         <table  jsId="pListGrid"
                 dojoType="openils.widget.AutoGrid"
                 fieldOrder="['id', 'name', 'code', 'owner', 'currency_type']"
         </table>
     </div>
 </div>
+ <div id='provider-summary-pane'></div>     
+<div id='provider-details-div' style='height:600px;'>
+<div dojoType="dijit.layout.TabContainer" style='height:100%;' jsId='providerTabs'>
 
-
-
-<div id='provider-details-div'>
-    <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
-        <div id='provider-summary-pane'/>
-    </div>
+    <div dojoType="dijit.layout.ContentPane" title='Provider Address' select='true' id='provider-address'>
+        
         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
-            <div>Provider Address</div>
+            <div> Provider Address</div>
             <button dojoType='dijit.form.Button' onClick='paListGrid.showCreateDialog()'>New Provider Address</button>
+            <button dojoType='dijit.form.Button' onClick='paListGrid.deleteSelected()'>Delete Selected</button>
         </div>
         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:100px'>
             <table  jsId="paListGrid"
                     editOnEnter='true'>
             </table>
         </div>
-
+    </div>
+    
+    <div dojoType="dijit.layout.ContentPane" title='Provider Contact' id='tab-pro-contact'>
         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
-            <div>Provider Contact</div>
+            <div> Provider Contact</div>
             <button dojoType='dijit.form.Button' onClick='pcListGrid.showCreateDialog()'>New Contact</button>
+            <button dojoType='dijit.form.Button' onClick='pcListGrid.deleteSelected()'>Delete Selected</button>
         </div>
         <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
             <table  jsId="pcListGrid"
                     editOnEnter='true'>
             </table>
         </div>
-
-
-
+    
+    <div id='contact-addr-div'>
         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
             <div>Contact Address</div>
             <button dojoType='dijit.form.Button' onClick='pcaListGrid.showCreateDialog()'>New Contact Address</button>
+            <button dojoType='dijit.form.Button' onClick='pcaListGrid.deleteSelected()'>Delete Selected</button>
         </div>
-        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
+        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:400px'>
             <table  jsId="pcaListGrid"
                     dojoType="openils.widget.AutoGrid"
-                    fieldOrder="['id', 'address_type', 'provider', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
+                    fieldOrder="['id', 'address_type', 'contact', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
                     query="{id: '*'}"
                     fmClass='acqpca'
                     editOnEnter='true'>
-
+                
+            </table>
+        </div>
+    </div> 
+</div>
+    <div dojoType="dijit.layout.ContentPane" title='Attribute Definitions' id='tab-attr'>       
+        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
+            <div> Attribute Definitions</div>
+            <button dojoType='dijit.form.Button' onClick='padListGrid.showCreateDialog()'>New Attribute Definition</button>
+            <button dojoType='dijit.form.Button' onClick='padListGrid.deleteSelected()'>Delete Selected</button>
+        </div>
+        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
+            <table  jsId="padListGrid"
+                    dojoType="openils.widget.AutoGrid"
+                    fieldOrder="['id', 'provider', 'code', 'description', 'xpath', 'provider', 'ident']"
+                    defaultCellWidth='20'
+                    query="{id: '*'}"
+                    fmClass='acqlipad'
+                    editOnEnter='true'>
+                
+            </table>
+        </div>
+    </div>
+    
+    <div dojoType="dijit.layout.ContentPane" title='Holding Subfield' id='tab-hold'>       
+        <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
+            <div>Holding Subfield</div>
+            <button dojoType='dijit.form.Button' onClick='phsListGrid.showCreateDialog()'>New Holding Subfield</button>
+            <button dojoType='dijit.form.Button' onClick='phsListGrid.deleteSelected()'>Delete Selected</button>
+        </div>
+        <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
+            <table  jsId="phsListGrid"
+                    dojoType="openils.widget.AutoGrid"
+                    fieldOrder="['id', 'provider', 'name', 'subfield']"
+                    defaultCellWidth='20'
+                    query="{id: '*'}"
+                    fmClass='acqphsm'
+                    editOnEnter='true'>
+                <thead>
+                    <tr>
+                        <th field="name" formatter='formatName'/>
+                        </tr>
+                    </thead>
             </table>
         </div>
     </div>
+</div>  
 </div>
 [% END %]