Add "Retrieve patron via Database ID" menu entry
authorJason Etheridge <jason@esilibrary.com>
Sun, 31 Jul 2011 04:33:31 +0000 (00:33 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Tue, 2 Aug 2011 15:06:35 +0000 (11:06 -0400)
Add "Retrieve patron via Database ID" menu entry to top-level Search menu

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/chrome/content/main/menu.js
Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties

index f9549b8..86d86a1 100644 (file)
 <!ENTITY staff.main.menu.search.patrons.label "Search for Patrons">
 <!ENTITY staff.main.menu.search.patrons_barcode.accesskey "n">
 <!ENTITY staff.main.menu.search.patrons_barcode.label "Search for patron by Barcode">
+<!ENTITY staff.main.menu.search.patron_db_id.accesskey "">
+<!ENTITY staff.main.menu.search.patron_db_id.label "Retrieve patron via Database ID">
 <!ENTITY staff.main.menu.search.record.accesskey "T">
 <!ENTITY staff.main.menu.search.record.label "Search for record by TCN">
 <!ENTITY staff.main.menu.search.record_via_id.accesskey "D">
index de4579f..8d179c0 100644 (file)
@@ -378,6 +378,23 @@ main.menu.prototype = {
                     obj.set_patron_tab({},{},event);
                 }
             ],
+            'cmd_search_usr_id' : [
+                ['oncommand'],
+                function(event) {
+                    var usr_id = prompt(
+                        offlineStrings.getString('menu.cmd_search_usr_id.tab'),
+                        '',
+                        offlineStrings.getString('menu.cmd_search_usr_id.prompt')
+                    );
+                    if (usr_id != '' && ! isNaN(usr_id)) {
+                        obj.set_patron_tab(
+                            {},
+                            { 'id' : usr_id },
+                            event
+                        );
+                    }
+                }
+            ],
             'cmd_search_opac' : [
                 ['oncommand'],
                 function(event) {
index 2218ae8..480ac2b 100644 (file)
@@ -38,6 +38,7 @@
     <command id="cmd_public_opac" />
     <command id="cmd_search_tcn" />
     <command id="cmd_search_bib_id" />
+    <command id="cmd_search_usr_id" />
 <!-- Perhaps add group_application.user here as well? -->
     <command id="cmd_patron_register"
              perm="CREATE_USER" 
         <menuitem label="&staff.main.menu.search.record_via_id.label;" accesskey="&staff.main.menu.search.record_via_id.accesskey;" command="cmd_search_bib_id" />
         <menuitem label="&staff.main.menu.search.copies.label;" accesskey="&staff.main.menu.search.copies.accesskey;" command="cmd_copy_status"/>
         <menuitem label="&staff.main.menu.search.patrons_barcode.label;" accesskey="&staff.main.menu.search.patrons_barcode.accesskey;" command="cmd_circ_checkout"/>
+        <menuitem
+            command="cmd_search_usr_id"
+            label="&staff.main.menu.search.patron_db_id.label;"
+            accesskey="&staff.main.menu.search.patron_db_id.accesskey;"/>
     </menupopup>
 </menu>
 
index 753da58..ca7eedf 100644 (file)
@@ -110,6 +110,8 @@ menu.cmd_replace_barcode.renaming.failure=The rename operation probably failed.
 menu.cmd_search_opac.tab=Catalog
 menu.cmd_search_bib_id.tab=What is the internal ID for the bibliographic record?
 menu.cmd_search_bib_id.prompt=Bib ID Lookup
+menu.cmd_search_usr_id.tab=What is the internal database ID for the patron account?
+menu.cmd_search_usr_id.prompt=Patron ID Lookup
 menu.cmd_search_tcn.tab=What is the TCN or accession ID for the record?
 menu.cmd_search_tcn.prompt=TCN Lookup
 menu.cmd_search_tcn.not_found.error="%1$s" not found