[open-ils-commits] r18588 - in branches/rel_1_6/Open-ILS: examples web/opac/locale/en-US 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 15:33:48 EDT 2010
Author: senator
Date: 2010-11-02 15:33:44 -0400 (Tue, 02 Nov 2010)
New Revision: 18588
Added:
branches/rel_1_6/Open-ILS/web/templates/default/conify/global/config/hard_due_date.tt2
branches/rel_1_6/Open-ILS/web/templates/default/conify/global/config/hard_due_date_values.tt2
Modified:
branches/rel_1_6/Open-ILS/examples/fm_IDL.xml
branches/rel_1_6/Open-ILS/web/opac/locale/en-US/lang.dtd
branches/rel_1_6/Open-ILS/web/templates/default/conify/global/config/circ_matrix_matchpoint.tt2
branches/rel_1_6/Open-ILS/xul/staff_client/chrome/content/main/menu.js
branches/rel_1_6/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
Log:
Backport r18535 from trunk: hard due date config UIs
Modified: branches/rel_1_6/Open-ILS/examples/fm_IDL.xml
===================================================================
--- branches/rel_1_6/Open-ILS/examples/fm_IDL.xml 2010-11-02 16:46:16 UTC (rev 18587)
+++ branches/rel_1_6/Open-ILS/examples/fm_IDL.xml 2010-11-02 19:33:44 UTC (rev 18588)
@@ -1599,7 +1599,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"/>
Modified: branches/rel_1_6/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- branches/rel_1_6/Open-ILS/web/opac/locale/en-US/lang.dtd 2010-11-02 16:46:16 UTC (rev 18587)
+++ branches/rel_1_6/Open-ILS/web/opac/locale/en-US/lang.dtd 2010-11-02 19:33:44 UTC (rev 18588)
@@ -642,6 +642,7 @@
<!ENTITY staff.main.menu.admin.server_admin.conify.perm_list.label "Permissions">
<!ENTITY staff.main.menu.admin.server_admin.conify.copy_status.label "Copy Statuses">
<!ENTITY staff.main.menu.admin.server_admin.conify.marc_code_maps.label "MARC Codes">
+<!ENTITY staff.main.menu.admin.server_admin.conify.config_hard_due_date "Hard Due Date Changes">
<!ENTITY staff.main.menu.admin.server_admin.conify.billing_type.label "Billing Types">
<!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">
Modified: branches/rel_1_6/Open-ILS/web/templates/default/conify/global/config/circ_matrix_matchpoint.tt2
===================================================================
--- branches/rel_1_6/Open-ILS/web/templates/default/conify/global/config/circ_matrix_matchpoint.tt2 2010-11-02 16:46:16 UTC (rev 18587)
+++ branches/rel_1_6/Open-ILS/web/templates/default/conify/global/config/circ_matrix_matchpoint.tt2 2010-11-02 19:33:44 UTC (rev 18588)
@@ -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 %]
Added: branches/rel_1_6/Open-ILS/web/templates/default/conify/global/config/hard_due_date.tt2
===================================================================
--- branches/rel_1_6/Open-ILS/web/templates/default/conify/global/config/hard_due_date.tt2 (rev 0)
+++ branches/rel_1_6/Open-ILS/web/templates/default/conify/global/config/hard_due_date.tt2 2010-11-02 19:33:44 UTC (rev 18588)
@@ -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 %]
Added: branches/rel_1_6/Open-ILS/web/templates/default/conify/global/config/hard_due_date_values.tt2
===================================================================
--- branches/rel_1_6/Open-ILS/web/templates/default/conify/global/config/hard_due_date_values.tt2 (rev 0)
+++ branches/rel_1_6/Open-ILS/web/templates/default/conify/global/config/hard_due_date_values.tt2 2010-11-02 19:33:44 UTC (rev 18588)
@@ -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_1_6/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- branches/rel_1_6/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2010-11-02 16:46:16 UTC (rev 18587)
+++ branches/rel_1_6/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2010-11-02 19:33:44 UTC (rev 18588)
@@ -612,6 +612,10 @@
['oncommand'],
function() { open_eg_web_page('conify/global/booking/resource_attr_map'); }
],
+ 'cmd_server_admin_config_hard_due_date' : [
+ ['oncommand'],
+ function() { open_eg_web_page('conify/global/config/hard_due_date'); }
+ ],
'cmd_acq_view_picklist' : [
['oncommand'],
function() { open_eg_web_page('acq/picklist/list', 'menu.cmd_acq_view_picklist.tab'); }
Modified: branches/rel_1_6/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
===================================================================
--- branches/rel_1_6/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul 2010-11-02 16:46:16 UTC (rev 18587)
+++ branches/rel_1_6/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul 2010-11-02 19:33:44 UTC (rev 18588)
@@ -126,6 +126,7 @@
<command id="cmd_server_admin_billing_type"/>
<command id="cmd_server_admin_z39_source"/>
<command id="cmd_server_admin_circ_mod"/>
+ <command id="cmd_server_admin_config_hard_due_date"/>
<command id="cmd_server_admin_booking_resource" />
<command id="cmd_server_admin_booking_resource_type" />
@@ -329,6 +330,7 @@
<menuitem label="&staff.main.menu.admin.server_admin.conify.perm_list.label;" command="cmd_server_admin_perm_list"/>
<menuitem label="&staff.main.menu.admin.server_admin.conify.copy_status.label;" command="cmd_server_admin_copy_status"/>
<menuitem label="&staff.main.menu.admin.server_admin.conify.marc_code_maps.label;" command="cmd_server_admin_marc_code"/>
+ <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.billing_type.label;" command="cmd_server_admin_billing_type"/>
<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"/>
More information about the open-ils-commits
mailing list