New way to printing shelf-expired holds
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Oct 2010 21:01:42 +0000 (21:01 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Oct 2010 21:01:42 +0000 (21:01 +0000)
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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@18215 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Open-ILS/web/opac/extras/circ/alt_holds_print.html [new file with mode: 0644]
Open-ILS/web/opac/extras/circ/alt_pull_list.html [deleted file]
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/server/admin/index.xhtml
Open-ILS/xul/staff_client/server/patron/holds.js
Open-ILS/xul/staff_client/server/patron/holds_overlay.xul

index 924d653..ebdaf53 100644 (file)
@@ -1749,8 +1749,8 @@ sub fetch_captured_holds {
        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 @@ sub fetch_captured_holds {
 }
 
 __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,
diff --git a/Open-ILS/web/opac/extras/circ/alt_holds_print.html b/Open-ILS/web/opac/extras/circ/alt_holds_print.html
new file mode 100644 (file)
index 0000000..370aa98
--- /dev/null
@@ -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>
diff --git a/Open-ILS/web/opac/extras/circ/alt_pull_list.html b/Open-ILS/web/opac/extras/circ/alt_pull_list.html
deleted file mode 100644 (file)
index 966ee40..0000000
+++ /dev/null
@@ -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>
index 8b2b606..d507abb 100644 (file)
 <!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)">
 <!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 ">
index aa01bc5..60a3327 100644 (file)
             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;'>
                             <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>
index 4cf392b..f6f8116 100644 (file)
@@ -352,7 +352,7 @@ patron.holds.prototype = {
                                 });
 
                                 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 @@ patron.holds.prototype = {
         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 @@ patron.holds.prototype = {
                 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 @@ patron.holds.prototype = {
                 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 @@ patron.holds.prototype = {
                 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
index 7b2accd..ce36619 100644 (file)
 
         <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>