View an authority record by id user/mcooper/view_auth_via_dbid
authorMark Cooper <markchristophercooper@gmail.com>
Wed, 3 Apr 2013 17:29:10 +0000 (10:29 -0700)
committerMark Cooper <markchristophercooper@gmail.com>
Wed, 3 Apr 2013 17:29:10 +0000 (10:29 -0700)
Suggested by cataloging staff, there is no way to view an authority
record directly by id. The 'Manage Authorities' interface does not
allow retrieval of an authority record by id. This branch
leverages Supercat to display an authority as marctxt in the staff
client. Staff are ambivalent about the right-click interface for
viewing authorities in the marc editor (which could be a separate
issue), so they feel this is important. Primary use case is to
quickly view authority using id indicated in $0 subfield. Outstanding
question -- should this really load the authority in the marc editor?

Signed-off-by: Mark Cooper <markchristophercooper@gmail.com>
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/chrome/content/main/constants.js
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 d52ae78..75700a8 100644 (file)
 <!ENTITY staff.main.menu.search.record.label "Search for record by TCN">
 <!ENTITY staff.main.menu.search.record_via_id.accesskey "D">
 <!ENTITY staff.main.menu.search.record_via_id.label "Retrieve title via Database ID">
+<!ENTITY staff.main.menu.search.auth_via_id.accesskey "V">
+<!ENTITY staff.main.menu.search.auth_via_id.label "View authority via Database ID">
 <!ENTITY staff.main.menu.serials.key "l">
 <!ENTITY staff.main.menu.serials.label "Serials">
 <!ENTITY staff.main.menu.tabs.close "Close All Tabs">
index 0956d9e..0c0a6dd 100644 (file)
@@ -517,5 +517,6 @@ var urls = {
     'SERIAL_PRINT_ROUTING_LIST_USERS' : 'oils://remote/eg/serial/print_routing_list_users',
     'XUL_SERIAL_BATCH_RECEIVE': 'oils://remote/xul/server/serial/batch_receive.xul',
     'EG_TRIGGER_EVENTS' : 'oils://remote/eg/actor/user/event_log',
-    'XUL_SEARCH_PREFS' : 'chrome://open_ils_staff_client/content/main/search_prefs.xul'
+    'XUL_SEARCH_PREFS' : 'chrome://open_ils_staff_client/content/main/search_prefs.xul',
+    'SUPERCAT_AUTHORITY_TXT' : 'oils://remote/opac/extras/supercat/retrieve/marctxt/authority/'
 }
index aab9000..4f56237 100644 (file)
@@ -477,6 +477,20 @@ main.menu.prototype = {
                     );
                 }
             ],
+            'cmd_search_auth_id' : [
+                ['oncommand'],
+                function(event) {
+                    var auth_id = prompt(offlineStrings.getString('menu.cmd_search_auth_id.tab'),'',offlineStrings.getString('menu.cmd_search_auth_id.prompt'));
+                    if (!auth_id) return;
+
+                    var loc = urls.XUL_BROWSER + '?url=' + window.escape(obj.url_prefix('SUPERCAT_AUTHORITY_TXT') + auth_id);
+                    obj.new_tab(
+                        loc,
+                        {},
+                        {'tab_name': auth_id, 'show_print_button' : true}
+                    );
+                }
+            ],            
             'cmd_copy_status' : [
                 ['oncommand'],
                 function(event) {
index 2d274a6..e377f44 100644 (file)
@@ -41,6 +41,7 @@
     <command id="cmd_public_opac" />
     <command id="cmd_search_tcn" />
     <command id="cmd_search_bib_id" />
+    <command id="cmd_search_auth_id" />
     <command id="cmd_search_usr_id" />
 <!-- Perhaps add group_application.user here as well? -->
     <command id="cmd_patron_register"
         <menuitem label="&staff.main.menu.cat.retrieve_last_record.label;" accesskey="&staff.main.menu.cat.retrieve_last_record.accesskey;" command="cmd_retrieve_last_record"/>
         <menuseparator />
         <menuitem label="&staff.main.menu.cat.authority_manage.label;" accesskey="&staff.main.menu.cat.authority_manage.accesskey;" command="cmd_authority_manage"/>
+        <menuitem label="&staff.main.menu.search.auth_via_id.label;" accesskey="&staff.main.menu.search.auth_via_id.accesskey;" command="cmd_search_auth_id"/>
         <menuseparator />
         <menuitem label="&staff.main.menu.cat.url_verify.label;" accesskey="&staff.main.menu.cat.url_verify.accesskey;" command="cmd_url_verify"/>
     </menupopup>
         <menuitem label="&staff.main.menu.search.catalog.label;" accesskey="&staff.main.menu.search.catalog.accesskey;" command="cmd_search_opac" />
         <menuitem label="&staff.main.menu.search.record.label;" accesskey="&staff.main.menu.search.record.accesskey;" command="cmd_search_tcn" />
         <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.auth_via_id.label;" accesskey="&staff.main.menu.search.auth_via_id.accesskey;" command="cmd_search_auth_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
index adf86a6..c275a6b 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_auth_id.tab=What is the internal ID for the authority record?
+menu.cmd_search_auth_id.prompt=Auth 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?