</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
<actions>
- <create permission="CREATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
- <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
- <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
- <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
+ <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
+ <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
+ <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
+ <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
</actions>
</permacrud>
</class>
'vl-marc-upload-status-div',
'vl-attr-editor-div',
'vl-marc-export-div',
- 'vl-profile-editor-div'
+ 'vl-profile-editor-div',
+ 'vl-item-attr-editor-div'
];
var authtoken;
case 'vl-profile-editor-div':
openils.Util.addCSSClass(dojo.byId('vl-menu-profile-editor'), 'toolbar_selected');
break;
+ case 'vl-item-attr-editor-div':
+ openils.Util.addCSSClass(dojo.byId('vl-menu-import-item-attr-editor'), 'toolbar_selected');
+ break;
}
}
function() {
profileContextOrg = this.attr('value');
pGrid.resetStore();
- buildGrid();
+ buildProfileGrid();
}
);
};
);
}
+/* --- Import Item Attr Grid --------------- */
+
+var itemAttrContextOrg;
+function vlShowImportItemAttrEditor() {
+ displayGlobalDiv('vl-item-attr-editor-div');
+ buildImportItemAttrGrid();
+
+ var connect = function() {
+ dojo.connect(itemAttrContextOrgSelector, 'onChange',
+ function() {
+ itemAttrContextOrg = this.attr('value');
+ itemAttrGrid.resetStore();
+ vlShowImportItemAttrEditor();
+ }
+ );
+ };
+ new openils.User().buildPermOrgSelector(
+ 'ADMIN_IMPORT_ITEM_ATTR_DEF',
+ itemAttrContextOrgSelector, null, connect);
+}
+
+function buildImportItemAttrGrid() {
+
+ if(itemAttrContextOrg == null)
+ itemAttrContextOrg = openils.User.user.ws_ou();
+
+ itemAttrGrid.loadAll(
+ {order_by : {viiad : 'name'}},
+ {owner : fieldmapper.aou.fullPath(itemAttrContextOrg, true)}
+ );
+}
<!ENTITY vandelay.edit.attributes "Edit Attributes">
<!ENTITY vandelay.edit.attrs "Edit Attributes">
<!ENTITY vandelay.edit.profiles "Edit Merge / Overlay Profiles">
+<!ENTITY vandelay.edit.import_item_attrs "Edit Import Item Attributes">
<!ENTITY vandelay.false "False">
<!ENTITY vandelay.file.to.upload "File to Upload:">
<!ENTITY vandelay.for.example "Example">
--- /dev/null
+<!--
+ Grid for configuring vandelay.import_item_attr_definition
+-->
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
+ <div>Import Item Attrbute Definitions</div>
+ <div>
+ <button dojoType='dijit.form.Button' onClick='itemAttrGrid.showCreateDialog()'>New Definition</button>
+ <button dojoType='dijit.form.Button' onClick='itemAttrGrid.deleteSelected()'>Delete Selected</button>
+ </div>
+ </div>
+ <div>
+ <span style='padding-right:10px;'>Context Org Unit</span>
+ <select dojoType="openils.widget.OrgUnitFilteringSelect" jsId='itemAttrContextOrgSelector'
+ searchAttr='shortname' labelAttr='shortname'> </select>
+ </div>
+ <table jsId="itemAttrGrid"
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="[]"
+ query="{id: '*'}"
+ fmClass='viiad'
+ editStyle='pane'
+ showPaginator='true'
+ editOnEnter='true'>
+ </table>
+</div>
onclick="vlShowAttrEditor();" showLabel="true">&vandelay.edit.attributes;</div>
<div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy" id='vl-menu-profile-editor'
onclick="vlShowProfileEditor();" showLabel="true">&vandelay.edit.profiles;</div>
+ <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy" id='vl-menu-import-item-attr-editor'
+ onclick="vlShowImportItemAttrEditor();" showLabel="true">&vandelay.edit.import_item_attrs;</div>
</div>
<div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-profile-editor-div' class='hidden content'>
[% INCLUDE 'default/vandelay/inc/profiles.tt2' %]
</div>
+<div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-item-attr-editor-div' class='hidden content'>
+ [% INCLUDE 'default/vandelay/inc/item_attrs.tt2' %]
+</div>
[% END %]