[open-ils-commits] r18587 - in branches/rel_2_0/Open-ILS: examples web/opac/locale/en-US web/templates web/templates/default/conify/global/config xul/staff_client/chrome/content/main (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Nov 2 12:46:20 EDT 2010


Author: senator
Date: 2010-11-02 12:46:16 -0400 (Tue, 02 Nov 2010)
New Revision: 18587

Added:
   branches/rel_2_0/Open-ILS/web/templates/default/conify/global/config/hard_due_date.tt2
   branches/rel_2_0/Open-ILS/web/templates/default/conify/global/config/hard_due_date_values.tt2
Modified:
   branches/rel_2_0/Open-ILS/examples/fm_IDL.xml
   branches/rel_2_0/Open-ILS/web/opac/locale/en-US/lang.dtd
   branches/rel_2_0/Open-ILS/web/templates/base.tt2
   branches/rel_2_0/Open-ILS/web/templates/default/conify/global/config/circ_matrix_matchpoint.tt2
   branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/menu.js
   branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
Log:
Backport r18535 from trunk: hard due date interfaces


Modified: branches/rel_2_0/Open-ILS/examples/fm_IDL.xml
===================================================================
--- branches/rel_2_0/Open-ILS/examples/fm_IDL.xml	2010-11-02 16:44:10 UTC (rev 18586)
+++ branches/rel_2_0/Open-ILS/examples/fm_IDL.xml	2010-11-02 16:46:16 UTC (rev 18587)
@@ -1905,7 +1905,7 @@
 	</class>
 
 	<class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
-		<fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_vales_id_seq">
+		<fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
 			<field reporter:label="ID" name="id" reporter:datatype="id"/>
 			<field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
 			<field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
@@ -2464,6 +2464,12 @@
 			<link field="owner" reltype="has_a" key="id" map="" class="au"/>
 		</links>
 		<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+			<actions>
+				<create permission="ADMIN_HARD_DUE_DATE" global_required="true" />
+				<retrieve />
+				<update permission="ADMIN_HARD_DUE_DATE" global_required="true" />
+				<delete permission="ADMIN_HARD_DUE_DATE" global_required="true" />
+			</actions>
 		</permacrud>
 	</class>
 

Modified: branches/rel_2_0/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- branches/rel_2_0/Open-ILS/web/opac/locale/en-US/lang.dtd	2010-11-02 16:44:10 UTC (rev 18586)
+++ branches/rel_2_0/Open-ILS/web/opac/locale/en-US/lang.dtd	2010-11-02 16:46:16 UTC (rev 18587)
@@ -703,6 +703,7 @@
 <!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.server_admin.conify.config_hard_due_date "Hard Due Date Changes">
 <!ENTITY staff.main.menu.admin.server_admin.conify.config_rule_circ_duration "Circulation Duration Rules">
 <!ENTITY staff.main.menu.admin.server_admin.conify.config_rule_recurring_fine "Circulation Recurring Fine Rules">
 <!ENTITY staff.main.menu.admin.server_admin.conify.config_rule_max_fine "Circulation Max Fine Rules">

Modified: branches/rel_2_0/Open-ILS/web/templates/base.tt2
===================================================================
--- branches/rel_2_0/Open-ILS/web/templates/base.tt2	2010-11-02 16:44:10 UTC (rev 18586)
+++ branches/rel_2_0/Open-ILS/web/templates/base.tt2	2010-11-02 16:46:16 UTC (rev 18587)
@@ -21,7 +21,7 @@
 'acqligad','acqliuad','acqlipad','acqphsm','acqlilad','acqedi','acqedim','acqdf','acqdfe','acqdfa','acqda','cnal',
 'acqclt','acqclet','acqcl','acqcle','acqscl','acqscle','acqclp','acqclpa','acqlisum','acqft','acqftm','actsce','actscecm',
 'jub','sdist','ssub','sstr','scap','bre','siss','act', 'acpl', 'ccm', 'aiit', 'atevdef', 'ath', 'atreact','atclean','atenv','atevparam','atcol','actsc','cit',
-'atval','crahp','crmf','crrf','crcd','cust','coust','cgf','czs','cbt','csp','brt','brsrc','bra','bram','brav','vaq','vbq','vqar','ccmm','ccmcmtm','citm','cifm','cvrfm','chmm','chdd']};
+'atval','crahp','crmf','crrf','crcd','cust','coust','cgf','czs','cbt','csp','brt','brsrc','bra','bram','brav','vaq','vbq','vqar','ccmm','ccmcmtm','citm','cifm','cvrfm','chmm','chdd','chddv']};
         </script>
         <script type="text/javascript" src="[% ctx.media_prefix %]/js/dojo/dojo/dojo.js"></script>
         <script type="text/javascript" src="[% ctx.media_prefix %]/js/dojo/dojo/openils_dojo.js"></script>

Modified: branches/rel_2_0/Open-ILS/web/templates/default/conify/global/config/circ_matrix_matchpoint.tt2
===================================================================
--- branches/rel_2_0/Open-ILS/web/templates/default/conify/global/config/circ_matrix_matchpoint.tt2	2010-11-02 16:44:10 UTC (rev 18586)
+++ branches/rel_2_0/Open-ILS/web/templates/default/conify/global/config/circ_matrix_matchpoint.tt2	2010-11-02 16:46:16 UTC (rev 18587)
@@ -7,7 +7,7 @@
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <table  jsId="cmGrid"
-            autoHeight='true'
+            style="height: 600px;"
             dojoType="openils.widget.AutoGrid"
             fieldOrder="['org_unit', 'active', 'grp', 'circ_modifier', 'marc_type', 'marc_form', 'marc_vr_format']"
             defaultCellWidth='"auto"'
@@ -17,6 +17,12 @@
             editOnEnter='true'
             showColumnPicker='true'
             columnPickerPrefix='"conify.config.circ_matrix_matchpoint"'>
+            <thead>
+                <tr>
+                    <th field="hard_due_date" formatter="format_hard_due_date">
+                    </th>
+                </tr>
+            </thead>
     </table>
 </div>
 
@@ -51,5 +57,12 @@
 
 <div class='hidden'><div dojoType='openils.widget.ProgressDialog' jsId='progressDialog'/></div>
 
+<script type="text/javascript">
+    function format_hard_due_date(name) {
+        return "<a href='" + oilsBasePath +
+            "/conify/global/config/hard_due_date?name=" +
+            encodeURIComponent(name) + "'>" + name + "</a>";
+    }
+</script>
 [% END %]
 

Copied: branches/rel_2_0/Open-ILS/web/templates/default/conify/global/config/hard_due_date.tt2 (from rev 18535, trunk/Open-ILS/web/templates/default/conify/global/config/hard_due_date.tt2)
===================================================================
--- branches/rel_2_0/Open-ILS/web/templates/default/conify/global/config/hard_due_date.tt2	                        (rev 0)
+++ branches/rel_2_0/Open-ILS/web/templates/default/conify/global/config/hard_due_date.tt2	2010-11-02 16:46:16 UTC (rev 18587)
@@ -0,0 +1,80 @@
+[% WRAPPER default/base.tt2 %]
+[% ctx.page_title = "Hard Due Dates" %]
+<script type="text/javascript">
+    dojo.require("openils.CGI");
+    dojo.require("openils.Util");
+    dojo.require("openils.widget.AutoGrid");
+
+    function get_chdd_name(rowIndex, item) {
+        if (!item) return null;
+        else return {
+            "id": this.grid.store.getValue(item, "id"),
+            "name": this.grid.store.getValue(item, "name")
+        };
+    }
+
+    function format_chdd_name(blob) {
+        if (blob) {
+            return "<a href='" + oilsBasePath +
+                "/conify/global/config/hard_due_date_values?chdd=" +
+                blob.id + "'>" + blob.name + "</a>";
+        } else {
+            return "";
+        }
+    }
+
+    openils.Util.addOnLoad(
+        function() {
+            var cgi = new openils.CGI();
+            var filter = null;
+            var id = cgi.param("id");
+            var name = cgi.param("name");
+            if (id) {
+                filter = {"id": id};
+                openils.Util.show("one_only");
+            } else if (name) {
+                filter = {"name": name};
+                openils.Util.show("one_only");
+            }
+            chddGrid.loadAll({"order_by": {"chdd": "name"}}, filter);
+        }
+    );
+</script>
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <div dojoType="dijit.layout.ContentPane"
+        layoutAlign="top" class="oils-header-panel">
+        <div>Hard Due Dates</div>
+        <div>
+            <button
+                dojoType="dijit.form.Button"
+                onClick="chddGrid.showCreateDialog();">New Hard Due Date</button>
+            <button
+                dojoType="dijit.form.Button"
+                onClick="chddGrid.deleteSelected();">Deleted Selected</button>
+        </div>
+    </div>
+    <div id="one_only" class="hidden">
+        <em>Showing only one hard due date.</em> [
+            <a href="./hard_due_date">Show them all</a>
+        ]
+    </div>
+    <div>
+        <table jsId="chddGrid"
+            dojoType="openils.widget.AutoGrid"
+            showPaginator="true"
+            query="{name: '*'}"
+            defaultCellWidth="'auto'"
+            fieldOrder="['name', 'owner', 'ceiling_date', 'forceto']"
+            fmClass="chdd"
+            hideSelector="true"
+            editOnEnter="true">
+            <thead>
+                <tr>
+                    <th field="name" get="get_chdd_name"
+                        formatter="format_chdd_name"></th>
+                </tr>
+            </thead>
+        </table>
+    </div>
+</div>
+[% END %]

Copied: branches/rel_2_0/Open-ILS/web/templates/default/conify/global/config/hard_due_date_values.tt2 (from rev 18535, trunk/Open-ILS/web/templates/default/conify/global/config/hard_due_date_values.tt2)
===================================================================
--- branches/rel_2_0/Open-ILS/web/templates/default/conify/global/config/hard_due_date_values.tt2	                        (rev 0)
+++ branches/rel_2_0/Open-ILS/web/templates/default/conify/global/config/hard_due_date_values.tt2	2010-11-02 16:46:16 UTC (rev 18587)
@@ -0,0 +1,73 @@
+[% WRAPPER default/base.tt2 %]
+[% ctx.page_title = "Hard Due Date Values" %]
+<script type="text/javascript">
+    dojo.require("openils.CGI");
+    dojo.require("openils.PermaCrud");
+    dojo.require("openils.Util");
+    dojo.require("openils.widget.AutoGrid");
+    dojo.require("dijit.form.TextBox");
+
+    openils.Util.addOnLoad(
+        function() {
+            var filter = null;
+            var chdd_id = (new openils.CGI()).param("chdd");
+
+            if (chdd_id) {
+                filter = {"hard_due_date": chdd_id};
+                var hard_due_date =
+                    (new openils.PermaCrud()).retrieve("chdd", chdd_id);
+
+                dojo.byId("linked_chdd_name").innerHTML = hard_due_date.name();
+                dojo.byId("linked_chdd_link").innerHTML = hard_due_date.id();
+                dojo.byId("linked_chdd_link").onclick = function() {
+                    location.href = oilsBasePath +
+                        "/conify/global/config/hard_due_date?id=" +
+                        hard_due_date.id();
+                };
+                openils.Util.show("linked_chdd");
+            }
+
+            chddvGrid.overrideEditWidgets.hard_due_date =
+                new dijit.form.TextBox({"disabled": true});
+            chddvGrid.overrideEditWidgets.hard_due_date.shove = {
+                "create": chdd_id
+            };
+
+            chddvGrid.loadAll({"order_by": {"chddv": "active_date"}}, filter);
+        }
+    );
+</script>
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <div dojoType="dijit.layout.ContentPane"
+        layoutAlign="top" class="oils-header-panel">
+        <div>Hard Due Date Values</div>
+        <div>
+            <button
+                dojoType="dijit.form.Button"
+                onClick="chddvGrid.showCreateDialog();">New Hard Due Date Value</button>
+            <button
+                dojoType="dijit.form.Button"
+                onClick="chddvGrid.deleteSelected();">Deleted Selected</button>
+        </div>
+    </div>
+    <div class="hidden" id="linked_chdd">
+        <em>Showing only hard due date values related to hard due date object</em>
+        <strong id="linked_chdd_name"></strong> (#
+        <a href="javascript:void(0);" id="linked_chdd_link"></a>)
+    </div>
+    <div>
+        <table jsId="chddvGrid"
+            dojoType="openils.widget.AutoGrid"
+            showPaginator="true"
+            query="{name: '*'}"
+            defaultCellWidth="'auto'"
+            fieldOrder="['hard_due_date', 'ceiling_date', 'active_date']"
+            suppressFields="['hard_due_date']"
+            suppressEditFields="['id']"
+            fmClass="chddv"
+            hideSelector="true"
+            editOnEnter="true">
+        </table>
+    </div>
+</div>
+[% END %]

Modified: branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/menu.js	2010-11-02 16:44:10 UTC (rev 18586)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/menu.js	2010-11-02 16:46:16 UTC (rev 18587)
@@ -613,6 +613,10 @@
                 ['oncommand'],
                 function() { open_eg_web_page('conify/global/config/rule_circ_duration'); }
             ],
+            'cmd_server_admin_config_hard_due_date' : [
+                ['oncommand'],
+                function() { open_eg_web_page('conify/global/config/hard_due_date'); }
+            ],
             'cmd_server_admin_config_rule_recurring_fine' : [
                 ['oncommand'],
                 function() { open_eg_web_page('conify/global/config/rule_recurring_fine'); }

Modified: branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul	2010-11-02 16:44:10 UTC (rev 18586)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul	2010-11-02 16:46:16 UTC (rev 18587)
@@ -161,6 +161,7 @@
     <command id="cmd_server_admin_global_flag"/>
     <command id="cmd_server_admin_org_unit_setting_type"/>
     <command id="cmd_server_admin_usr_setting_type"/>
+    <command id="cmd_server_admin_config_hard_due_date"/>
     <command id="cmd_server_admin_config_rule_circ_duration"/>
     <command id="cmd_server_admin_config_rule_recurring_fine"/>
     <command id="cmd_server_admin_config_rule_max_fine"/>
@@ -391,6 +392,7 @@
                 <menuitem label="&staff.main.menu.admin.server_admin.conify.global_flag.label;" command="cmd_server_admin_global_flag"/>
                 <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"/>
+                <menuitem label="&staff.main.menu.admin.server_admin.conify.config_hard_due_date;" command="cmd_server_admin_config_hard_due_date"/>
                 <menuitem label="&staff.main.menu.admin.server_admin.conify.config_rule_circ_duration;" command="cmd_server_admin_config_rule_circ_duration"/>
                 <menuitem label="&staff.main.menu.admin.server_admin.conify.config_rule_recurring_fine;" command="cmd_server_admin_config_rule_recurring_fine"/>
                 <menuitem label="&staff.main.menu.admin.server_admin.conify.config_rule_max_fine;" command="cmd_server_admin_config_rule_max_fine"/>



More information about the open-ils-commits mailing list