[open-ils-commits] r14952 - in trunk/Open-ILS: web/opac/locale/en-US web/templates/default/conify/global/config xul/staff_client/chrome/content/main (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Nov 18 08:42:20 EST 2009
Author: erickson
Date: 2009-11-18 08:42:19 -0500 (Wed, 18 Nov 2009)
New Revision: 14952
Added:
trunk/Open-ILS/web/templates/default/conify/global/config/usr_setting_type.tt2
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
Log:
Patch from Lebbeous Fogle-Weekley to add a config interface for the new config.usr_setting_type table
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-11-18 13:33:31 UTC (rev 14951)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-11-18 13:42:19 UTC (rev 14952)
@@ -664,6 +664,7 @@
<!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...">
Added: trunk/Open-ILS/web/templates/default/conify/global/config/usr_setting_type.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/config/usr_setting_type.tt2 (rev 0)
+++ trunk/Open-ILS/web/templates/default/conify/global/config/usr_setting_type.tt2 2009-11-18 13:42:19 UTC (rev 14952)
@@ -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 %]
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2009-11-18 13:33:31 UTC (rev 14951)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2009-11-18 13:42:19 UTC (rev 14952)
@@ -622,6 +622,10 @@
['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'); }
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul 2009-11-18 13:33:31 UTC (rev 14951)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul 2009-11-18 13:42:19 UTC (rev 14952)
@@ -121,6 +121,7 @@
<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>
@@ -315,6 +316,7 @@
<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>
More information about the open-ils-commits
mailing list