[% 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">
+
+<script>
+ var providerId = '[% ctx.page_args.0 %]';
+
function formatName(inDatum) {
switch (inDatum) {
case 'owning_lib':
return 'Local Note';
case 'price':
return 'Price';
- case 'circ_modifier':
+ case 'circ-Modifier':
return 'Circulation Modifier';
case 'copy_location':
return 'Copy Location';
}
}
+ function getProviderName(rowIndex, item) {
+ if(!item) return '';
+ var name = this.grid.store.getValue(item, 'name');
+ var id = this.grid.store.getValue(item, 'id');
+ return id + ':' + name;
+ }
+
+ function formatName(value) {
+ if(value) {
+ var vals = value.split(/:/);
+ return '<a href="[% ctx.base_path %]/conify/global/acq/provider/'+vals[0]+'">'+vals[1]+'</a>';
+ }
+ }
</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 Location</option>
- <option value='collection_code'>Collection Code</option>
-</select>
+
+
+<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 Location</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>
</div>
</div>
</div>
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:90%'>
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
<table jsId="pListGrid"
dojoType="openils.widget.AutoGrid"
fieldOrder="['id', 'name', 'code', 'owner', 'currency_type']"
query="{id: '*'}"
- defaultCellWidth='12'
+ defaultCellWidth='"auto"'
+ autoHeight='true'
fmClass='acqpro'
editOnEnter='true'>
<thead>
- <tr><th field='name' get='getProviderName'/></tr>
+ <tr><th field='name' get='getProviderName' formatter='formatName'/></tr>
</thead>
</table>
+ <div/>
</div>
</div>
- <div id='provider-summary-pane'></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 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>
- <button dojoType='dijit.form.Button' onClick='paListGrid.showCreateDialog()'>New Provider Address</button>
- <button dojoType='dijit.form.Button' onClick='paListGrid.deleteSelected()'>Delete Selected</button>
- </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:400px'>
+ </div>
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:100px'>
<table jsId="paListGrid"
dojoType="openils.widget.AutoGrid"
fieldOrder="['id', 'address_type', 'provider', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
query="{id: '*'}"
fmClass='acqpa'
+ defaultCellWidth='"auto"'
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>
- <button dojoType='dijit.form.Button' onClick='pcListGrid.showCreateDialog()'>New Contact</button>
- <button dojoType='dijit.form.Button' onClick='pcListGrid.deleteSelected()'>Delete Selected</button>
+ <button dojoType='dijit.form.Button' onClick='pcListGrid.showCreateDialog()'>New Contact</button>
+ <button dojoType='dijit.form.Button' onClick='pcListGrid.deleteSelected()'>Delete Selected</button>
</div>
</div>
<div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:200px'>
<table jsId="pcListGrid"
dojoType="openils.widget.AutoGrid"
fieldOrder="['id', 'name', 'provider', 'role', 'email']"
- defaultCellWidth='12'
+ defaultCellWidth='"auto"'
query="{id: '*'}"
fmClass='acqpc'
editOnEnter='true'>
</table>
</div>
-
+
<div id='contact-addr-div'>
<div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
<div>Contact Address</div>
<div>
- <button dojoType='dijit.form.Button' onClick='pcaListGrid.showCreateDialog()'>New Contact Address</button>
- <button dojoType='dijit.form.Button' onClick='pcaListGrid.deleteSelected()'>Delete Selected</button>
+ <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>
- <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', 'contact', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
query="{id: '*'}"
fmClass='acqpca'
+ defaultCellWidth='"auto"'
editOnEnter='true'>
-
+
</table>
</div>
- </div>
-</div>
- <div dojoType="dijit.layout.ContentPane" title='Attribute Definitions' id='tab-attr'>
+ </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>
<div>
- <button dojoType='dijit.form.Button' onClick='padListGrid.showCreateDialog()'>New Attribute Definition</button>
- <button dojoType='dijit.form.Button' onClick='padListGrid.deleteSelected()'>Delete Selected</button>
+ <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>
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:400px'>
+ <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'
+ fieldOrder="['id', 'provider', 'code', 'description', 'provider', 'ident', 'remove', 'tag', 'subfield', 'xpath']"
query="{id: '*'}"
fmClass='acqlipad'
editOnEnter='true'>
-
+ <thead>
+ <tr>
+ <th field="xpath" width='auto'/>
+ <th field="tag" get='getParsedTag'/>
+ <th field="subfield" get='getParsedSubf'/>
+ </tr>
+ </thead>
</table>
</div>
</div>
-
- <div dojoType="dijit.layout.ContentPane" title='Holding Subfield' id='tab-hold'>
+
+ <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>
<div>
- <button dojoType='dijit.form.Button' onClick='phsListGrid.showCreateDialog()'>New Holding Subfield</button>
- <button dojoType='dijit.form.Button' onClick='phsListGrid.deleteSelected()'>Delete Selected</button>
+ <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>
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:400px'>
+ <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>
</div>
[% END %]