[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 61226632163640c72fddc80d58511edd2163d15d

Evergreen Git git at git.evergreen-ils.org
Wed May 18 01:08:49 EDT 2011


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, rel_2_1 has been updated
       via  61226632163640c72fddc80d58511edd2163d15d (commit)
      from  3af69e089bb548ea61c821405134e2466facb148 (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 61226632163640c72fddc80d58511edd2163d15d
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Wed May 18 01:05:17 2011 -0400

    Include call number prefix/suffix in display and sorting of holds for Print Full Pull List (Alternate strategy).  Also fix things so that we're sorting on the label_sortkey for call number, and not the label.  So, for this interface, the hard-wired sort order is Copy Location Order (as defined by Admin -> Local Administration -> Copy Location Order), Call Number Prefix, Call Number Label, Call Number Suffix, and Hold Request time.
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
index e316eb3..c95a74a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -1348,7 +1348,7 @@ __PACKAGE__->register_method(
         desc   => 'Returns a stream of fleshed holds',
         params => [
             { desc => 'Authtoken', type => 'string'},
-            { desc => 'Hash of optional param: Org unit ID (defaults to workstation org unit), limit, offset, sort (array of: acplo.position, call_number, request_time)',
+            { desc => 'Hash of optional param: Org unit ID (defaults to workstation org unit), limit, offset, sort (array of: acplo.position, prefix, call_number, suffix, request_time)',
               type => 'object'
             },
         ],
@@ -1383,8 +1383,12 @@ sub print_hold_pull_list_stream {
                     "class" => "acplo", "field" => "position",
                     "transform" => "coalesce", "params" => [999]
                 };
+            } elsif ($s eq 'prefix') {
+                push @$sort, {"class" => "acnp", "field" => "label_sortkey"};
             } elsif ($s eq 'call_number') {
-                push @$sort, {"class" => "acn", "field" => "label"};
+                push @$sort, {"class" => "acn", "field" => "label_sortkey"};
+            } elsif ($s eq 'suffix') {
+                push @$sort, {"class" => "acns", "field" => "label_sortkey"};
             } elsif ($s eq 'request_time') {
                 push @$sort, {"class" => "ahr", "field" => "request_time"};
             }
@@ -1407,7 +1411,17 @@ sub print_hold_pull_list_stream {
                         "join" => {
                             "acn" => {
                                 "field" => "id",
-                                "fkey" => "call_number" 
+                                "fkey" => "call_number",
+                                "join" => {
+                                    "acnp" => {
+                                        "field" => "id",
+                                        "fkey" => "prefix"
+                                    },
+                                    "acns" => {
+                                        "field" => "id",
+                                        "fkey" => "suffix"
+                                    }
+                                }
                             },
                             "acplo" => {
                                 "field" => "org",
@@ -1448,7 +1462,7 @@ sub print_hold_pull_list_stream {
                     "ahr" => ["usr", "current_copy"],
                     "au"  => ["card"],
                     "acp" => ["location", "call_number"],
-                    "acn" => ["record"]
+                    "acn" => ["record","prefix","suffix"]
                 }
             }
         ]);
diff --git a/Open-ILS/web/opac/extras/circ/alt_holds_print.html b/Open-ILS/web/opac/extras/circ/alt_holds_print.html
index 405aaed..5801df2 100644
--- a/Open-ILS/web/opac/extras/circ/alt_holds_print.html
+++ b/Open-ILS/web/opac/extras/circ/alt_holds_print.html
@@ -31,7 +31,7 @@
         <!-- Dojo goodness -->
         <script type="text/javascript">
             var djConfig = {parseOnLoad:true,isDebug:false,AutoIDL:['aou','aout','pgt','ahr','acp','acn']};
-            var sort_order = ["acplo.position", "call_number", "request_time"];
+            var sort_order = ["acplo.position", "prefix", "call_number", "suffix", "request_time"];
         </script>
         <script type="text/javascript" src="/js/dojo/dojo/dojo.js"></script>
         <script type="text/javascript" src="/js/dojo/dojo/openils_dojo.js"></script>
@@ -93,7 +93,7 @@
                     <td type='opac/slot-data' query='datafield[tag=245]'></td>
                     <td type='opac/slot-data' query='datafield[tag^=1]' limit='1'> </td>
                     <td>${current_copy.location.name}</td>
-                    <td>${current_copy.call_number.label}</td>
+                    <td>${current_copy.call_number.prefix.label} ${current_copy.call_number.label} ${current_copy.call_number.suffix.label}</td>
                     <td>${current_copy.barcode}</td>
                 </tr>
             </tbody>
diff --git a/Open-ILS/web/opac/extras/circ/alt_holds_print.js b/Open-ILS/web/opac/extras/circ/alt_holds_print.js
index 31a21c1..a3f0378 100644
--- a/Open-ILS/web/opac/extras/circ/alt_holds_print.js
+++ b/Open-ILS/web/opac/extras/circ/alt_holds_print.js
@@ -35,6 +35,8 @@ function do_pull_list() {
                 hold.current_copy.location = hold_fm.current_copy().location().toHash(true);
                 hold.current_copy.call_number = hold_fm.current_copy().call_number().toHash(true);
                 hold.current_copy.call_number.record = hold_fm.current_copy().call_number().record().toHash(true);
+                hold.current_copy.call_number.prefix = hold_fm.current_copy().call_number().prefix().toHash(true);
+                hold.current_copy.call_number.suffix = hold_fm.current_copy().call_number().suffix().toHash(true);
 
                 // clone the template's html
                 var tr = dojo.clone(

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

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Circ/Holds.pm |   22 ++++++++++++++++---
 Open-ILS/web/opac/extras/circ/alt_holds_print.html |    4 +-
 Open-ILS/web/opac/extras/circ/alt_holds_print.js   |    2 +
 3 files changed, 22 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list