Patch from Lebbeous Fogle-Weekley to add a config interface for the new config.usr_se...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 18 Nov 2009 13:42:19 +0000 (13:42 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 18 Nov 2009 13:42:19 +0000 (13:42 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14952 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/web/templates/default/conify/global/config/usr_setting_type.tt2 [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/menu.js
Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul

index d835258..24bc5d0 100644 (file)
 <!ENTITY staff.main.menu.admin.server_admin.conify.z3950_source.label "Z39.50 Servers">
 <!ENTITY staff.main.menu.admin.server_admin.conify.circulation_modifier.label "Circulation Modifiers">
 <!ENTITY staff.main.menu.admin.server_admin.conify.org_unit_setting_type "Organization Unit Setting Types">
+<!ENTITY staff.main.menu.admin.server_admin.conify.usr_setting_type "User Setting Types">
 
 
 <!ENTITY staff.main.menu.admin.developer.label "For developers...">
diff --git a/Open-ILS/web/templates/default/conify/global/config/usr_setting_type.tt2 b/Open-ILS/web/templates/default/conify/global/config/usr_setting_type.tt2
new file mode 100644 (file)
index 0000000..41e2dd7
--- /dev/null
@@ -0,0 +1,64 @@
+[% WRAPPER default/base.tt2 %]
+[% ctx.page_title = 'User Setting Types' %]
+
+<script type ="text/javascript">
+    dojo.require('dijit.form.FilteringSelect');
+    dojo.require('openils.widget.AutoGrid');
+
+    openils.Util.addOnLoad(
+        function() {
+            ustGrid.overrideEditWidgets.datatype = dTypeSelector;
+            ustGrid.loadAll({order_by:{cust : 'name'}});
+        }
+    );
+
+    function formatDatatype(dtype) {
+        // pull the label from the type selector
+        return dojo.query('[value=' + dtype +']', dTypeSelector.domNode)[0].innerHTML;
+    }
+
+</script>
+
+<div class='hidden'>
+    <select dojoType="dijit.form.FilteringSelect" jsId="dTypeSelector">
+        <option value='string' selected='selected'>String</option>
+        <option value='bool'>Boolean</option>
+        <option value='integer'>Integer</option>
+        <option value='float'>Float</option>
+        <option value='currency'>Currency</option>
+        <option value='interval'>Interval</option>
+        <option value='date'>Date</option>
+        <option value='object'>Object</option>
+        <option value='array'>Array</option>
+        <option value='link'>Link</option>
+    </select>
+</div>
+
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
+    <div>User Setting Types</div>
+    <div>
+        <button dojoType='dijit.form.Button' onClick='ustGrid.showCreateDialog()'>New User Setting Type</button>
+        <button dojoType='dijit.form.Button' onClick='ustGrid.deleteSelected()'>Delete Selected</button>
+    </div>
+</div>
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <table  jsId="ustGrid"
+            autoHeight='true'
+            dojoType="openils.widget.AutoGrid"
+            fieldOrder="['name', 'label', 'datatype', 'description', 'fm_class']"
+            query="{name: '*'}"
+            defaultCellWidth='"auto"'
+            fmClass='cust'
+            showPaginator='true'
+            editOnEnter='true'>
+        <thead>
+            <tr>
+                <th field="datatype" formatter="formatDtype"/>
+            </tr>
+        </thead>
+    </table>
+ </div>
+
+[% END %]
index ce1abcd..f4474e6 100644 (file)
@@ -622,6 +622,10 @@ main.menu.prototype = {
                 ['oncommand'],
                 function() { open_eg_web_page('conify/global/config/org_unit_setting_type'); }
             ],
+            'cmd_server_admin_usr_setting_type' : [
+                ['oncommand'],
+                function() { open_eg_web_page('conify/global/config/usr_setting_type'); }
+            ],
             'cmd_acq_view_picklist' : [
                 ['oncommand'],
                 function() { open_eg_web_page('acq/picklist/list', 'menu.cmd_acq_view_picklist.tab'); }
index 07f20f3..7616135 100644 (file)
     <command id="cmd_server_admin_z39_source"/>
     <command id="cmd_server_admin_circ_mod"/>
     <command id="cmd_server_admin_org_unit_setting_type"/>
+    <command id="cmd_server_admin_usr_setting_type"/>
 </commandset>
 
 
                 <menuitem label="&staff.main.menu.admin.server_admin.conify.z3950_source.label;" command="cmd_server_admin_z39_source"/>
                 <menuitem label="&staff.main.menu.admin.server_admin.conify.circulation_modifier.label;" command="cmd_server_admin_circ_mod"/>
                 <menuitem label="&staff.main.menu.admin.server_admin.conify.org_unit_setting_type;" command="cmd_server_admin_org_unit_setting_type"/>
+                <menuitem label="&staff.main.menu.admin.server_admin.conify.usr_setting_type;" command="cmd_server_admin_usr_setting_type"/>
             </menupopup>
         </menu>