[open-ils-commits] r18215 - in trunk/Open-ILS: src/perlmods/OpenILS/Application/Circ web/opac/extras/circ web/opac/locale/en-US xul/staff_client/server/admin xul/staff_client/server/patron (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Oct 6 17:01:48 EDT 2010


Author: senator
Date: 2010-10-06 17:01:42 -0400 (Wed, 06 Oct 2010)
New Revision: 18215

Added:
   trunk/Open-ILS/web/opac/extras/circ/alt_holds_print.html
Removed:
   trunk/Open-ILS/web/opac/extras/circ/alt_pull_list.html
Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/server/admin/index.xhtml
   trunk/Open-ILS/xul/staff_client/server/patron/holds.js
   trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul
Log:
New way to printing shelf-expired holds

This just takes the newest template for printing hold pull lists and
grafts this new functionality onto it.  It should perhaps be adjusted to also
be able to print things on the holds shelf that /aren't/ shelf-expired.

For now you get to this under Admin -> For Developers -> Local Administration

This also corrects a bug because of which a "print pull list (alternate
strategy)" button appeared where it shouldn't.

This also removes the booking links from Admin -> For Developers -> Local
Administration, as there are regular staff client menu entries for those now.


Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2010-10-06 20:45:49 UTC (rev 18214)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2010-10-06 21:01:42 UTC (rev 18215)
@@ -1749,8 +1749,8 @@
 	my( $self, $conn, $auth, $org ) = @_;
 
 	my $e = new_editor(authtoken => $auth);
-	return $e->event unless $e->checkauth;
-	return $e->event unless $e->allowed('VIEW_HOLD'); # XXX rely on editor perm
+	return $e->die_event unless $e->checkauth;
+	return $e->die_event unless $e->allowed('VIEW_HOLD'); # XXX rely on editor perm
 
 	$org ||= $e->requestor->ws_ou;
 
@@ -1803,6 +1803,84 @@
 }
 
 __PACKAGE__->register_method(
+    method    => "print_expired_holds_stream",
+    api_name  => "open-ils.circ.captured_holds.expired.print.stream",
+    stream    => 1
+);
+
+sub print_expired_holds_stream {
+    my ($self, $client, $auth, $params) = @_;
+
+    # No need to check specific permissions: we're going to call another method
+    # that will do that.
+    my $e = new_editor("authtoken" => $auth);
+    return $e->die_event unless $e->checkauth;
+
+    delete($$params{org_id}) unless (int($$params{org_id}));
+    delete($$params{limit}) unless (int($$params{limit}));
+    delete($$params{offset}) unless (int($$params{offset}));
+    delete($$params{chunk_size}) unless (int($$params{chunk_size}));
+    delete($$params{chunk_size}) if  ($$params{chunk_size} && $$params{chunk_size} > 50); # keep the size reasonable
+    $$params{chunk_size} ||= 10;
+
+    $$params{org_id} = (defined $$params{org_id}) ? $$params{org_id}: $e->requestor->ws_ou;
+
+    my @hold_ids = $self->method_lookup(
+        "open-ils.circ.captured_holds.id_list.expired_on_shelf.retrieve"
+    )->run($auth, $params->{"org_id"});
+
+    if (!@hold_ids) {
+        $e->disconnect;
+        return;
+    } elsif (defined $U->event_code($hold_ids[0])) {
+        $e->disconnect;
+        return $hold_ids[0];
+    }
+
+    $logger->info("about to stream back up to " . scalar(@hold_ids) . " expired holds");
+
+    while (@hold_ids) {
+        my @hid_chunk = splice @hold_ids, 0, $params->{"chunk_size"};
+
+        my $result_chunk = $e->json_query({
+            "select" => {
+                "acp" => ["barcode"],
+                "au" => [qw/
+                    first_given_name second_given_name family_name alias
+                /],
+                "acn" => ["label"],
+                "bre" => ["marc"],
+                "acpl" => ["name"]
+            },
+            "from" => {
+                "ahr" => {
+                    "acp" => {
+                        "field" => "id", "fkey" => "current_copy",
+                        "join" => {
+                            "acn" => {
+                                "field" => "id", "fkey" => "call_number",
+                                "join" => {
+                                    "bre" => {
+                                        "field" => "id", "fkey" => "record"
+                                    }
+                                }
+                            },
+                            "acpl" => {"field" => "id", "fkey" => "location"}
+                        }
+                    },
+                    "au" => {"field" => "id", "fkey" => "usr"}
+                }
+            },
+            "where" => {"+ahr" => {"id" => \@hid_chunk}}
+        }) or return $e->die_event;
+        $client->respond($result_chunk);
+    }
+
+    $e->disconnect;
+    undef;
+}
+
+__PACKAGE__->register_method(
     method    => "check_title_hold_batch",
     api_name  => "open-ils.circ.title_hold.is_possible.batch",
     stream    => 1,

Added: trunk/Open-ILS/web/opac/extras/circ/alt_holds_print.html
===================================================================
--- trunk/Open-ILS/web/opac/extras/circ/alt_holds_print.html	                        (rev 0)
+++ trunk/Open-ILS/web/opac/extras/circ/alt_holds_print.html	2010-10-06 21:01:42 UTC (rev 18215)
@@ -0,0 +1,241 @@
+<html>
+    <head>
+        <title>Printable Pull List</title>
+        <style type="text/css">
+            @import url('/js/dojo/dojo/resources/dojo.css');
+            @import url('/js/dojo/dijit/themes/tundra/tundra.css');
+            @import url('/js/dojo/dojox/widget/Toaster/Toaster.css');
+            @import url('/opac/skin/default/css/layout.css');
+        </style>
+        <style type="text/css">
+           /* html, body {
+                height: 100%;
+                width: 100%;
+                margin: 0px 0px 0px 0px;
+                padding: 0px 0px 0px 0px;
+                overflow: hidden;
+            } */
+            body { font-size: 14pt; }
+            td {
+                padding-right: 1em;
+                padding-bottom: 1em;
+                border-bottom: 1px #999 dashed;
+            }
+            th {
+                text-align: left; font-weight: bold;
+                border-bottom: 1px #000 solid;
+                border-right: 1px #000 solid;
+                padding: 0.5em;
+            }
+        </style>
+        <!-- The OpenSRF API writ JS -->
+        <script language='javascript' src='/opac/common/js/utils.js' type='text/javascript'></script>
+        <script language='javascript' src='/opac/common/js/Cookies.js' type='text/javascript'></script>
+        <script language='javascript' src='/opac/common/js/CGI.js' type='text/javascript'></script>
+        <script language='javascript' src='/opac/common/js/JSON_v1.js' type='text/javascript'></script>
+        <!-- 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"];
+        </script>
+        <script type="text/javascript" src="/js/dojo/dojo/dojo.js"></script>
+        <script type="text/javascript" src="/js/dojo/dojo/openils_dojo.js"></script>
+        <script type="text/javascript" src="/js/dojo/dijit/dijit.js"></script>
+        <script type="text/javascript" src="/js/dojo/openils/AutoIDL.js"></script>
+        <script type="text/javascript" src="/js/dojo/openils/User.js"></script>
+        <script type="text/javascript" src="/js/dojo/openils/Util.js"></script>
+        <script type="text/javascript">
+            dojo.require("dojo.cookie");
+            dojo.require("dojox.xml.parser");
+            dojo.require("openils.BibTemplate");
+            dojo.require("openils.widget.ProgressDialog");
+
+            function do_pull_list(user, cgi) {
+                progress_dialog.show(true);
+
+                var any = false;
+
+                fieldmapper.standardRequest(
+                    ['open-ils.circ','open-ils.circ.hold_pull_list.print.stream'],
+                    { async : true,
+                      params: [
+                        user.authtoken,
+                        { org_id     : cgi.param('o'),
+                          limit      : cgi.param('limit'),
+                          offset     : cgi.param('offset'),
+                          chunk_size : cgi.param('chunk_size'),
+                          sort       : sort_order
+                        }
+                      ],
+                      onresponse : function (r) {
+                        any = true;
+                        dojo.forEach( openils.Util.readResponse(r), function (hold_fm) {
+    
+                            // hashify the hold
+                            var hold = hold_fm.toHash(true);
+                            hold.usr = hold_fm.usr().toHash(true);
+                            hold.usr.card = hold_fm.usr().card().toHash(true);
+                            hold.current_copy = hold_fm.current_copy().toHash(true);
+                            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);
+    
+                            // clone the template's html
+                            var tr = dojo.clone(
+                                dojo.query("tr", dojo.byId('template'))[0]
+                            );
+                            dojo.query("td:not([type])", tr).forEach(
+                                function(td) {
+                                    td.innerHTML =
+                                        dojo.string.substitute(td.innerHTML, hold);
+                                }
+                            );
+    
+                            new openils.BibTemplate({
+                                root : tr,
+                                xml  : dojox.xml.parser.parse(hold.current_copy.call_number.record.marc),
+                                delay: false
+                            });
+    
+                            dojo.place(tr, "target");
+                        });
+                      },
+                      oncomplete : function () {
+                        progress_dialog.hide();
+                        if (any)
+                            window.print();
+                        else
+                            alert(dojo.byId("no_results").innerHTML);
+                      }
+                    }
+                );
+            }
+
+            function do_shelf_expired_holds(user, cgi) {
+                progress_dialog.show(true);
+
+                var any = false;
+                fieldmapper.standardRequest(
+                    ["open-ils.circ",
+                        "open-ils.circ.captured_holds.expired.print.stream"], {
+                        "async": true,
+                        "params": [
+                            user.authtoken, {
+                                "org_id": cgi.param("o"),
+                                "limit": cgi.param("limit"),
+                                "offset": cgi.param("offset"),
+                                "chunk_size": cgi.param("chunk_size"),
+                                "sort": sort_order
+                            }
+                        ],
+                        "onresponse": function(r) {
+                            dojo.forEach(
+                                openils.Util.readResponse(r),
+                                function(hold_fields) {
+                                    any = true;
+                                    /* munge this object to make it look like
+                                       the template expects */
+                                    var hold  = {
+                                        "usr": {},
+                                        "current_copy": {
+                                            "barcode": hold_fields.barcode,
+                                            "call_number": {
+                                                "label": hold_fields.label,
+                                                "record": {"marc": hold_fields.marc}
+                                            },
+                                            "location": {"name": hold_fields.name}
+                                        }
+                                    };
+                                    if (hold_fields.alias) {
+                                        hold.usr.display_name = hold_fields.alias;
+                                    } else {
+                                        hold.usr.display_name = [
+                                            (hold_fields.family_name ? hold_fields.family_name : ""),
+                                            (hold_fields.first_given_name ? hold_fields.first_given_name : ""),
+                                            (hold_fields.second_given_name ? hold_fields.second_given_name : "")
+                                        ].join(" ");
+                                    }
+                                    ["first_given_name","second_given_name","family_name","alias"].forEach(function(k) {hold.usr[k] = hold_fields[k]; });
+    
+                                    // clone the template's html
+                                    var tr = dojo.clone(
+                                        dojo.query("tr", dojo.byId('template'))[0]
+                                    );
+                                    dojo.query("td:not([type])", tr).forEach(
+                                        function(td) {
+                                            td.innerHTML =
+                                                dojo.string.substitute(td.innerHTML, hold);
+                                        }
+                                    );
+            
+                                    new openils.BibTemplate({
+                                        "root": tr,
+                                        "xml": dojox.xml.parser.parse(hold.current_copy.call_number.record.marc),
+                                        "delay": false
+                                    });
+            
+                                    dojo.place(tr, "target");
+                                }
+                            );
+                        },
+                        "oncomplete": function() {
+                            progress_dialog.hide();
+                            if (any)
+                                window.print();
+                            else
+                                alert(dojo.byId("no_results").innerHTML);
+                        }
+                    }
+                );
+            }
+
+            function my_init() {
+                var cgi = new CGI();
+                var ses = (typeof ses == "function" ? ses() : 0) ||
+                    cgi.param("ses") || dojo.cookie("ses");
+                var user = new openils.User({"authtoken": ses});
+
+                if (cgi.param("do") == "shelf_expired_holds") {
+                    do_shelf_expired_holds(user, cgi);
+                } else {
+                    dojo.query("[only='shelf_expired_holds']").forEach(dojo.destroy);
+                    do_pull_list(user, cgi);
+                }
+            }
+            dojo.addOnLoad(my_init);
+        </script>
+    </head>
+    <body class='tundra'>
+
+        <div dojoType="openils.widget.ProgressDialog" jsId="progress_dialog"></div>
+        <div class="hide_me" id="no_results">No results</div>
+<!-- START OF TEMPLATE SECTION -->
+
+        <table>
+            <tbody id='target'>
+                <tr>
+                    <th>Title</th>
+                    <th>Author</th>
+                    <th>Shelving Location</th>
+                    <th>Call Number</th>
+                    <th>Barcode</th>
+                    <th only="shelf_expired_holds">Patron</th>
+                </tr>
+            </tbody>
+            <tbody id='template' class='hide_me'>
+                <tr>
+                    <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.barcode}</td>
+                    <td only="shelf_expired_holds">${usr.display_name}</td>
+                </tr>
+            </tbody>
+        </table>
+
+<!-- END OF TEMPLATE SECTION -->
+
+
+    </body>
+</html>

Deleted: trunk/Open-ILS/web/opac/extras/circ/alt_pull_list.html
===================================================================
--- trunk/Open-ILS/web/opac/extras/circ/alt_pull_list.html	2010-10-06 20:45:49 UTC (rev 18214)
+++ trunk/Open-ILS/web/opac/extras/circ/alt_pull_list.html	2010-10-06 21:01:42 UTC (rev 18215)
@@ -1,142 +0,0 @@
-<html>
-    <head>
-        <title>Printable Pull List</title>
-        <style type="text/css">
-            @import url('/js/dojo/dojo/resources/dojo.css');
-            @import url('/js/dojo/dijit/themes/tundra/tundra.css');
-            @import url('/js/dojo/dojox/widget/Toaster/Toaster.css');
-            @import url('/opac/skin/default/css/layout.css');
-        </style>
-        <style type="text/css">
-           /* html, body {
-                height: 100%;
-                width: 100%;
-                margin: 0px 0px 0px 0px;
-                padding: 0px 0px 0px 0px;
-                overflow: hidden;
-            } */
-            body { font-size: 14pt; }
-            td {
-                padding-right: 1em;
-                padding-bottom: 1em;
-                border-bottom: 1px #999 dashed;
-            }
-            th {
-                text-align: left; font-weight: bold;
-                border-bottom: 1px #000 solid;
-                border-right: 1px #000 solid;
-                padding: 0.5em;
-            }
-        </style>
-        <!-- The OpenSRF API writ JS -->
-        <script language='javascript' src='/opac/common/js/utils.js' type='text/javascript'></script>
-        <script language='javascript' src='/opac/common/js/Cookies.js' type='text/javascript'></script>
-        <script language='javascript' src='/opac/common/js/CGI.js' type='text/javascript'></script>
-        <script language='javascript' src='/opac/common/js/JSON_v1.js' type='text/javascript'></script>
-        <!-- 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"];
-        </script>
-        <script type="text/javascript" src="/js/dojo/dojo/dojo.js"></script>
-        <script type="text/javascript" src="/js/dojo/dojo/openils_dojo.js"></script>
-        <script type="text/javascript" src="/js/dojo/dijit/dijit.js"></script>
-        <script type="text/javascript" src="/js/dojo/openils/AutoIDL.js"></script>
-        <script type="text/javascript" src="/js/dojo/openils/User.js"></script>
-        <script type="text/javascript" src="/js/dojo/openils/Util.js"></script>
-        <script type="text/javascript">
-            dojo.require("dojo.cookie");
-            dojo.require("dojox.xml.parser");
-            dojo.require("openils.BibTemplate");
-            dojo.require("openils.widget.ProgressDialog");
-
-            function my_init() {
-                var cgi = new CGI();
-                var ses = (typeof ses == "function" ? ses() : 0) ||
-                    cgi.param("ses") || dojo.cookie("ses");
-                var user = new openils.User({"authtoken": ses});
-
-                progress_dialog.show(true);
-                fieldmapper.standardRequest(
-                    ['open-ils.circ','open-ils.circ.hold_pull_list.print.stream'],
-                    { async : true,
-                      params: [
-                        user.authtoken,
-                        { org_id     : cgi.param('o'),
-                          limit      : cgi.param('limit'),
-                          offset     : cgi.param('offset'),
-                          chunk_size : cgi.param('chunk_size'),
-                          sort       : sort_order
-                        }
-                      ],
-                      onresponse : function (r) {
-                        dojo.forEach( openils.Util.readResponse(r), function (hold_fm) {
-    
-                            // hashify the hold
-                            var hold = hold_fm.toHash(true);
-                            hold.usr = hold_fm.usr().toHash(true);
-                            hold.usr.card = hold_fm.usr().card().toHash(true);
-                            hold.current_copy = hold_fm.current_copy().toHash(true);
-                            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);
-    
-                            // clone the template's html
-                            var tr = dojo.clone(
-                                dojo.query("tr", dojo.byId('template'))[0]
-                            );
-                            dojo.query("td:not([type])", tr).forEach(
-                                function(td) {
-                                    td.innerHTML =
-                                        dojo.string.substitute(td.innerHTML, hold);
-                                }
-                            );
-    
-                            new openils.BibTemplate({
-                                root : tr,
-                                xml  : dojox.xml.parser.parse(hold.current_copy.call_number.record.marc),
-                                delay: false
-                            });
-    
-                            dojo.place(tr, "target");
-                        });
-                      },
-                    oncomplete : function () {
-                     progress_dialog.hide(); window.print() }
-                    }
-                );
-            }
-            dojo.addOnLoad(my_init);
-        </script>
-    </head>
-    <body class='tundra'>
-
-        <div dojoType="openils.widget.ProgressDialog" jsId="progress_dialog"></div>
-<!-- START OF TEMPLATE SECTION -->
-
-        <table>
-            <tbody id='target'>
-                <tr>
-                    <th>Title</th>
-                    <th>Author</th>
-                    <th>Shelving Location</th>
-                    <th>Call Number</th>
-                    <th>Barcode</th>
-                </tr>
-            </tbody>
-            <tbody id='template' class='hide_me'>
-                <tr>
-                    <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.barcode}</td>
-                </tr>
-            </tbody>
-        </table>
-
-<!-- END OF TEMPLATE SECTION -->
-
-
-    </body>
-</html>

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2010-10-06 20:45:49 UTC (rev 18214)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2010-10-06 21:01:42 UTC (rev 18215)
@@ -1904,6 +1904,7 @@
 <!ENTITY staff.server.admin.index.library_settings "Library Settings Editor">
 <!ENTITY staff.server.admin.index.non_cataloged_types "Non-cataloged Types Editor">
 <!ENTITY staff.server.admin.index.statistical_categories "Statistical Categories Editor">
+<!ENTITY staff.server.admin.index.expired_holds_shelf "Expired Holds Shelf Printable Listing">
 <!ENTITY staff.server.admin.index.hold_pull_list "Pull List for Hold Requests">
 <!ENTITY staff.server.admin.index.testing "(Testing)">
 <!ENTITY staff.server.admin.index.hold_pull_list_classic "Pull List for Hold Requests (Classic)">
@@ -1915,14 +1916,6 @@
 <!ENTITY staff.server.admin.index.external_text_editor.label "External Text Editor Command">
 <!ENTITY staff.server.admin.index.external_text_editor.accesskey "x">
 
-<!ENTITY staff.server.admin.index.booking "Booking">
-<!ENTITY staff.server.admin.index.booking.reservation "Create/Cancel Reservations">
-<!ENTITY staff.server.admin.index.booking.pull_list "Pull List">
-<!ENTITY staff.server.admin.index.booking.capture "Capture">
-<!ENTITY staff.server.admin.index.booking.pickup "Pickup Reservations">
-<!ENTITY staff.server.admin.index.booking.return "Return Reservations">
-
-
 <!ENTITY staff.server.admin.org_settings.title "Evergreen: Library Settings Editor">
 <!-- This will be followed by the user's name -->
 <!ENTITY staff.server.admin.org_settings.greeting "Welcome ">

Modified: trunk/Open-ILS/xul/staff_client/server/admin/index.xhtml
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/index.xhtml	2010-10-06 20:45:49 UTC (rev 18214)
+++ trunk/Open-ILS/xul/staff_client/server/admin/index.xhtml	2010-10-06 21:01:42 UTC (rev 18215)
@@ -24,10 +24,7 @@
             function getBuildId() { return location.href.match(/\/xul\/(.+?)\/server\//)[1]; }
 
             function my_init() {
-                try {
-                    dojo.require("dojo.cookie");
-                    window.xulG.auth = {"session": {"key": dojo.cookie("ses")}};
-                } catch(E) { /* XXX ignorable except for booking links */ }
+                ;
             }
         </script>
         <style type='text/css'>
@@ -50,7 +47,6 @@
                         <th width='25%'>&staff.server.admin.index.workstation_configuration;</th>
                         <th width='25%'>&staff.server.admin.index.library_configuration;</th>
                         <th width='25%'>&staff.server.admin.index.maintenance_reports;</th>
-                        <th width='25%'>&staff.server.admin.index.booking;</th>
                     </tr>
                 </thead>
                 <tbody>
@@ -80,6 +76,9 @@
                             </div>
                         </td><td>
                             <div style='padding: 8px;'>
+                                <a href='javascript:window.xulG.new_tab(window.xulG.url_prefix("/opac/extras/circ/alt_holds_print.html").replace("http","https") + "?do=shelf_expired_holds&amp;chunk_size=25",{"tab_name":"&staff.server.admin.index.expired_holds_shelf;"},{});'>&staff.server.admin.index.expired_holds_shelf;</a>
+                            </div>
+                            <div style='padding: 8px;'>
                                 <a href='javascript:window.xulG.new_tab("/xul/server/patron/holds.xul",{"tab_name":"&staff.server.admin.index.hold_pull_list;"},{});'>&staff.server.admin.index.hold_pull_list;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
                             </div>
                             <div style='padding: 8px;'>
@@ -94,22 +93,6 @@
                             <div style='padding: 8px;'>
                                 <a href='javascript:window.xulG.new_tab("/xul/server/admin/transit_list.xul",{"tab_name":"&staff.server.admin.index.transits;"},{});'>&staff.server.admin.index.transit_list;</a>
                             </div>
-                        </td><td>
-                            <div style='padding: 8px;'>
-                                <a href='javascript:window.xulG.new_tab("/eg/booking/reservation",{"tab_name":"&staff.server.admin.index.booking.reservation;","browser":false},window.xulG);'>&staff.server.admin.index.booking.reservation;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
-                            </div>
-                            <div style='padding: 8px;'>
-                                <a href='javascript:window.xulG.new_tab("/eg/booking/pull_list",{"tab_name":"&staff.server.admin.index.booking.pull_list;","browser":false},window.xulG);'>&staff.server.admin.index.booking.pull_list;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
-                            </div>
-                            <div style='padding: 8px;'>
-                                <a href='javascript:window.xulG.new_tab("/eg/booking/capture",{"tab_name":"&staff.server.admin.index.booking.capture;","browser":false},window.xulG);'>&staff.server.admin.index.booking.capture;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
-                            </div>
-                            <div style='padding: 8px;'>
-                                <a href='javascript:window.xulG.new_tab("/eg/booking/pickup",{"tab_name":"&staff.server.admin.index.booking.pickup;","browser":false},window.xulG);'>&staff.server.admin.index.booking.pickup;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
-                            </div>
-                            <div style='padding: 8px;'>
-                                <a href='javascript:window.xulG.new_tab("/eg/booking/return",{"tab_name":"&staff.server.admin.index.booking.return;","browser":false},window.xulG);'>&staff.server.admin.index.booking.return;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
-                            </div>
                         </td>
                     </tr>
                 </tbody>

Modified: trunk/Open-ILS/xul/staff_client/server/patron/holds.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/holds.js	2010-10-06 20:45:49 UTC (rev 18214)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds.js	2010-10-06 21:01:42 UTC (rev 18215)
@@ -352,7 +352,7 @@
                                 });
 
                                 var loc = urls.XUL_BROWSER + "?url=" + window.escape(
-                                    xulG.url_prefix("/opac/extras/circ/alt_pull_list.html").replace("http:","https:")
+                                    xulG.url_prefix("/opac/extras/circ/alt_holds_print.html").replace("http:","https:")
                                 );
                                 xulG.new_tab(
                                     loc, {
@@ -1335,6 +1335,7 @@
         var x_clear_shelf_widgets = document.getElementById('clear_shelf_widgets');
         var x_expired_checkbox = document.getElementById('expired_checkbox');
         var x_print_full_pull_list = document.getElementById('print_full_btn');
+        var x_print_full_pull_list_alt = document.getElementById('print_alt_btn');
         switch(obj.hold_interface_type) {
             case 'shelf':
                 obj.render_lib_menus({'pickup_lib':true});
@@ -1342,10 +1343,12 @@
                 if (x_lib_type_menu) x_lib_type_menu.hidden = false;
                 if (x_lib_menu_placeholder) x_lib_menu_placeholder.hidden = false;
                 if (x_clear_shelf_widgets) x_clear_shelf_widgets.hidden = false;
+                if (x_print_full_pull_list_alt) x_print_full_pull_list_alt.hidden = true;
             break;
             case 'pull' :
                 if (x_fetch_more) x_fetch_more.hidden = false;
                 if (x_print_full_pull_list) x_print_full_pull_list.hidden = false;
+                if (x_print_full_pull_list_alt) x_print_full_pull_list_alt.hidden = false;
                 if (x_lib_type_menu) x_lib_type_menu.hidden = true;
                 if (x_lib_menu_placeholder) x_lib_menu_placeholder.hidden = true;
             break;
@@ -1353,6 +1356,7 @@
                 obj.render_lib_menus({'pickup_lib':true,'request_lib':true});
                 if (x_lib_filter_checkbox) x_lib_filter_checkbox.hidden = false;
                 if (x_lib_type_menu) x_lib_type_menu.hidden = false;
+                if (x_print_full_pull_list_alt) x_print_full_pull_list_alt.hidden = true;
                 if (x_lib_menu_placeholder) x_lib_menu_placeholder.hidden = false;
             break;
             default:
@@ -1361,6 +1365,7 @@
                 if (x_lib_type_menu) x_lib_type_menu.hidden = true;
                 if (x_lib_menu_placeholder) x_lib_menu_placeholder.hidden = true;
                 if (x_show_cancelled_deck) x_show_cancelled_deck.hidden = false;
+                if (x_print_full_pull_list_alt) x_print_full_pull_list_alt.hidden = true;
             break;
         }
         setTimeout( // We do this because render_lib_menus above creates and appends a DOM node, but until this thread exits, it doesn't really happen

Modified: trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul	2010-10-06 20:45:49 UTC (rev 18214)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul	2010-10-06 21:01:42 UTC (rev 18215)
@@ -189,7 +189,7 @@
 
         <button id="holds_print" label="&staff.patron.holds_overlay.print.label;" command="cmd_holds_print" accesskey="&staff.patron.holds_overlay.print.accesskey;" />
         <button id="print_full_btn" hidden="true" label="&staff.patron.holds_overlay.print_full_pull_list.label;" command="cmd_holds_print_full" accesskey="&staff.patron.holds_overlay.print_full_pull_list.accesskey;" />
-        <button id="print_alt_btn" label="&staff.patron.holds_overlay.print_alt_pull_list.label;" command="cmd_holds_print_alt" accesskey="&staff.patron.holds_overlay.print_alt_pull_list.accesskey;" />
+        <button id="print_alt_btn" hidden="true" label="&staff.patron.holds_overlay.print_alt_pull_list.label;" command="cmd_holds_print_alt" accesskey="&staff.patron.holds_overlay.print_alt_pull_list.accesskey;" />
         <spacer flex="1"/>
     </hbox>
 



More information about the open-ils-commits mailing list