[open-ils-commits] [GIT] Evergreen ILS branch master updated. a0fdeb77d15a979d80d3f4ea2e83c3e46cfe4157

Evergreen Git git at git.evergreen-ils.org
Wed Mar 7 14:27:31 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  a0fdeb77d15a979d80d3f4ea2e83c3e46cfe4157 (commit)
       via  5bf477798a9c9834824057de0e8ded4077a60f6a (commit)
      from  67dbcb0f6b307754ad45de52666cb57de586f803 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a0fdeb77d15a979d80d3f4ea2e83c3e46cfe4157
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Fri Mar 2 11:45:53 2012 -0500

    lp944947, receipt template per hold list interface
    
    Spec as follows:
    
    Individual screens use its own settings for receipt templates
    
    There are several XUL-based holds list that are all implemented with the same
    holds.js file:
    
    Actions for this Record -> View Holds
    Patron Display -> Holds
    Circulation -> Browse Hold Shelf
    Circulation -> Pull List for Hold Requests
    
    The main Print action (from the “Print” button next to the List Actions menu)
    uses the same template, “holds”, for all incarnations of the interface.  We will
    change this behavior in holds.js (specifically in the cmd_holds_print method)
    such that each interface variation will use its own template.  The new templates
    will be:
    
    holds_on_bib
    holds_for_patron
    holds_shelf
    holds_pull_list
    
    We will keep the “holds” template for backwards compatibility and as a fallback
    for when these new templates have not yet been configured.  These new templates
    will be stubbed in data.js (in the print_list_defaults method) so that they will
    appear in the Receipt Template Editor, but by default they will not have any
    defined content for their headers, footers, and line items.  Instead, we will
    use a new field called “inherit”, and have each new template use “holds”
    (referring to the original template) as the value for their inherit fields.
    
    So, for example, the current default ‘holds’ template is defined like this:
    
    'holds' : {
      'type' : 'holds',
      'header' : 'Welcome to %LIBRARY%!<br/>\r\nYou have the following titles on hold:<hr/><ol>',
      'line_item' : '<li>%title%\r\n',
      'footer' : '</ol><hr />%SHORTNAME% %TODAY_TRIM%<br/>\r\nYou were helped by %STAFF_FIRSTNAME%<br/>\r\n<br/>\r\n'
    },
    
    The new ‘holds_for_patron’ template will be defined as a peer like this:
    
    'holds_for_patron' : {
      'type' : 'holds',
      'inherit' : 'holds'
    },
    
    We will modify the _print_tree method in list.js and the post_init method in
    print_list_template_editor.js such that they will react to any value in a
    template’s inherit field and allow it to redirect them to use the contents of
    the inherited template.  For this particular use-case, we only need to support
    one level of indirection, but we may opt to support chains of inheritance for
    future use.
    
    We will modify the save_template method in print_list_template_editor.js so that
    the inherit field for a given template will be cleared if that specific template
    is saved, breaking the link and associating the displayed (and possibly edited)
    header, footer, and line item with the template.
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>

diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
index d6e79a7..cf31b79 100644
--- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
+++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
@@ -444,6 +444,22 @@ OpenILS.data.prototype = {
                     'line_item' : '<li>%title%\r\n',
                     'footer' : '</ol><hr />%SHORTNAME% %TODAY_TRIM%<br/>\r\nYou were helped by %STAFF_FIRSTNAME%<br/>\r\n<br/>\r\n'
                 },
+                'holds_on_bib' : {
+                    'type' : 'holds',
+                    'inherit' : 'holds'
+                },
+                'holds_for_patron' : {
+                    'type' : 'holds',
+                    'inherit' : 'holds'
+                },
+                'holds_shelf' : {
+                    'type' : 'holds',
+                    'inherit' : 'holds'
+                },
+                'holds_pull_list' : {
+                    'type' : 'holds',
+                    'inherit' : 'holds'
+                },
                 'hold_slip' : {
                     'type' : 'holds',
                     'header' : 'This item needs to be routed to <b>%route_to%</b>:<br/>\r\nBarcode: %item_barcode%<br/>\r\nTitle: %item_title%<br/>\r\n<br/>\r\n%hold_for_msg%<br/>\r\nBarcode: %PATRON_BARCODE%<br/>\r\nNotify by phone: %notify_by_phone%<br/>\r\nNotified by text: %notify_by_text%<br/>\r\nNotified by email: %notify_by_email%<br/>\r\n',
diff --git a/Open-ILS/xul/staff_client/chrome/content/util/list.js b/Open-ILS/xul/staff_client/chrome/content/util/list.js
index f62e10f..605bc44 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/list.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/list.js
@@ -1408,6 +1408,10 @@ util.list.prototype = {
             }
             if (params.template && data.print_list_templates[ params.template ]) {
                 var template = data.print_list_templates[ params.template ];
+                if (template.inherit) {
+                    template = data.print_list_templates[ template.inherit ];
+                    // if someone wants to implement recursion later, feel free
+                }
                 for (var i in template) params[i] = template[i];
             }
             obj.wrap_in_full_retrieve(
diff --git a/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js b/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
index c4d461f..bdb7279 100644
--- a/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
+++ b/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
@@ -105,6 +105,10 @@ circ.print_list_template_editor.prototype = {
         setTimeout(
             function() {
                 var tmp = obj.data.print_list_templates[ obj.controller.view.template_name_menu.value ];
+                if (tmp.inherit) {
+                    tmp = obj.data.print_list_templates[ tmp.inherit ];
+                    // if someone wants to implement recursion later, feel free
+                }
                 obj.controller.view.template_type_menu.value = tmp.type;
                 obj.controller.view.header.value = tmp.header;
                 obj.controller.view.line_item.value = tmp.line_item;
@@ -307,6 +311,10 @@ circ.print_list_template_editor.prototype = {
                                         'command',
                                         function(ev) {
                                             var tmp = obj.data.print_list_templates[ ev.target.value ];
+                                            if (tmp.inherit) {
+                                                tmp = obj.data.print_list_templates[ tmp.inherit ];
+                                                // if someone wants to implement recursion later, feel free
+                                            }
                                             obj.controller.view.template_type_menu.value = tmp.type;
                                             obj.controller.view.header.value = tmp.header;
                                             obj.controller.view.line_item.value = tmp.line_item;
@@ -397,6 +405,7 @@ circ.print_list_template_editor.prototype = {
 
     'save_template' : function(name) {
         var obj = this;
+        obj.data.print_list_templates[name].inherit = null;
         obj.data.print_list_templates[name].header = obj.controller.view.header.value;
         obj.data.print_list_templates[name].line_item = obj.controller.view.line_item.value;
         obj.data.print_list_templates[name].footer = obj.controller.view.footer.value;
diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js
index 9ba18a6..ccee8c9 100644
--- a/Open-ILS/xul/staff_client/server/patron/holds.js
+++ b/Open-ILS/xul/staff_client/server/patron/holds.js
@@ -395,9 +395,23 @@ patron.holds.prototype = {
                             try {
                                 JSAN.use('patron.util');
                                 var params = {
-                                    'patron' : patron.util.retrieve_au_via_id(ses(),obj.patron_id),
-                                    'template' : 'holds'
+                                    'patron' : patron.util.retrieve_au_via_id(ses(),obj.patron_id)
                                 };
+                                switch(obj.hold_interface_type) {
+                                    case 'patron':
+                                        params.template = 'holds_for_patron';
+                                    break;
+                                    case 'record':
+                                        params.template = 'holds_on_bib';
+                                    break;
+                                    case 'shelf':
+                                        params.template = 'holds_shelf';
+                                    break;
+                                    case 'pull':
+                                    default:
+                                        params.template = 'holds_pull_list';
+                                    break;
+                                }
                                 obj.list.print(params);
                             } catch(E) {
                                 obj.error.standard_unexpected_error_alert('print 1',E);

commit 5bf477798a9c9834824057de0e8ded4077a60f6a
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Fri Mar 2 11:44:04 2012 -0500

    Remove Browse Unfulfilled Holds interface
    
    Which never left Admin->For Developers and doesn't work as advertised
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>

diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index 2acf0c7..6c6aa19 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -684,8 +684,6 @@
 <!ENTITY staff.main.menu.acquisitions.accesskey "q">
 <!ENTITY staff.main.menu.acquisitions.label "Acquisitions">
 <!ENTITY staff.main.menu.admin.accesskey "-">
-<!ENTITY staff.main.menu.admin.browse_holds.accesskey "B">
-<!ENTITY staff.main.menu.admin.browse_holds.label "Browse Unfulfilled Holds for this Pickup Lib">
 <!ENTITY staff.main.menu.admin.change_session.label "Operator Change: New">
 <!ENTITY staff.main.menu.admin.clear_cache.accesskey "3">
 <!ENTITY staff.main.menu.admin.clear_cache.label "Clear Cache">
diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js
index bc1e834..65d93b5 100644
--- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js
+++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js
@@ -625,13 +625,6 @@ main.menu.prototype = {
                     obj.command_tab(event,obj.url_prefix(urls.XUL_CHECKIN)+'?hold_capture=1',{},{});
                 }
             ],
-            'cmd_browse_holds' : [
-                ['oncommand'],
-                function(event) { 
-                    obj.data.stash_retrieve();
-                    obj.command_tab(event,obj.url_prefix(urls.XUL_HOLDS_BROWSER),{ 'tab_name' : offlineStrings.getString('menu.cmd_browse_holds.tab') },{});
-                }
-            ],
             'cmd_browse_holds_shelf' : [
                 ['oncommand'],
                 function(event) { 
diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul b/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
index 3b37a62..de03fa6 100644
--- a/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
+++ b/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
@@ -598,7 +598,6 @@
                 <menuitem label="&staff.main.menu.admin.stat_cat_edit.label;" accesskey="&staff.main.menu.admin.stat_cat_edit.accesskey;" command="cmd_stat_cat_edit"/>
                 <menuitem label="&staff.main.menu.admin.non_cat_type_edit.label;" accesskey="&staff.main.menu.admin.non_cat_type_edit.accesskey;" command="cmd_non_cat_type_edit"/>
                 <menuitem label="&staff.main.menu.admin.copy_location_edit.label;" accesskey="&staff.main.menu.admin.copy_location_edit.accesskey;" command="cmd_copy_location_edit"/>
-                <menuitem label="&staff.main.menu.admin.browse_holds.label;" command="cmd_browse_holds" accesskey="&staff.main.menu.admin.browse_holds.accesskey;"/>
                 <menuitem label="&staff.main.menu.admin.local_admin.label;" accesskey="&staff.main.menu.admin.local_admin.accesskey;" command="cmd_local_admin"/>
                 <menuitem label="&staff.main.menu.admin.survey_wizard.label;" accesskey="&staff.main.menu.admin.survey_wizard.accesskey;" command="cmd_survey_wizard"/>
                 <menuseparator />

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/opac/locale/en-US/lang.dtd            |    2 --
 .../staff_client/chrome/content/OpenILS/data.js    |   16 ++++++++++++++++
 .../xul/staff_client/chrome/content/main/menu.js   |    7 -------
 .../chrome/content/main/menu_frame_menus.xul       |    1 -
 .../xul/staff_client/chrome/content/util/list.js   |    4 ++++
 .../server/circ/print_list_template_editor.js      |    9 +++++++++
 Open-ILS/xul/staff_client/server/patron/holds.js   |   18 ++++++++++++++++--
 7 files changed, 45 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list