in opac->record summary->copy summary->copy details, add an "other bibs" link for...
authorJason Etheridge <jason@esilibrary.com>
Fri, 8 Apr 2011 08:47:05 +0000 (04:47 -0400)
committerJason Etheridge <jason@esilibrary.com>
Fri, 8 Apr 2011 08:47:05 +0000 (04:47 -0400)
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
Open-ILS/web/opac/locale/en-US/opac.dtd
Open-ILS/web/opac/skin/default/js/copy_details.js
Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_cn_details.xml

index 949f6ff..94357aa 100644 (file)
@@ -1070,7 +1070,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                </fields>
         <links>
             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
-            <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
+            <link field="peer_record" reltype="has_a" key="id" map="id" class="bre"/>
             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
         </links>
         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
@@ -4814,6 +4814,7 @@ SELECT  usr,
                        <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
                        <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
                        <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
+                       <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
                </fields>
                <links>
                        <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
@@ -4831,6 +4832,7 @@ SELECT  usr,
                        <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
                        <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
                        <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
+                       <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
                </links>
         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
             <actions>
index 88af4f5..8098fb5 100644 (file)
@@ -973,7 +973,7 @@ sub copy_details {
                        {
                                flesh => 2,
                                flesh_fields => {
-                                       acp => ['call_number','parts'],
+                                       acp => ['call_number','parts','peer_records'],
                                        acn => ['record','prefix','suffix','label_class']
                                }
                        }
index d9af59e..f8a8931 100644 (file)
@@ -494,7 +494,7 @@ sub fleshed_copy_retrieve2 {
                 flesh        => 2,
                 flesh_fields => {
                     acp => [
-                        qw/ location status stat_cat_entry_copy_maps notes age_protect parts /
+                        qw/ location status stat_cat_entry_copy_maps notes age_protect parts peer_records /
                     ],
                     ascecm => [qw/ stat_cat stat_cat_entry /],
                 }
index c1ebf6b..9eb2ec6 100644 (file)
@@ -500,6 +500,7 @@ Please see a librarian to renew your account.">
 <!ENTITY rdetail.cn.less "less info">
 <!ENTITY rdetail.cn.hold "place hold">
 <!ENTITY rdetail.cn.reserve "book now">
+<!ENTITY rdetail.cn.multi_home "other bibs">
 <!ENTITY rdetail.cn.disabled "- Disabled -">
 <!ENTITY rdetail.cn.note "Copy Note">
 <!ENTITY rdetail.cn.category "Copy Category">
index 04e8e41..b14fdaa 100644 (file)
@@ -215,7 +215,7 @@ function cpdDrawCopy(r) {
         return;
     }
 
-       $n(row, 'barcode').appendChild(text(copy.barcode()));
+       var b = $n(row, 'barcode').appendChild(text(copy.barcode()));
        $n(row, 'location').appendChild(text(copy.location().name()));
        $n(row, 'status').appendChild(text(copy.status().name()));
 
@@ -231,6 +231,16 @@ function cpdDrawCopy(r) {
         }
     }
 
+    /* show the other bibs link */
+    if (copy.peer_records().length > 0) {
+        var l = $n(row, 'copy_multi_home');
+        unHideMe(l);
+        var link_args = {};
+        link_args.page = RRESULT;
+        link_args[PARAM_RTYPE] = RTYPE_LIST;
+        link_args[PARAM_RLIST] = copy.peer_records();
+        l.setAttribute('href',buildOPACLink(link_args));
+    }
        if(isXUL()) {
                /* show the hold link */
                var l = $n(row, 'copy_hold_link');
index 45a5c85..f937089 100644 (file)
@@ -32,6 +32,8 @@
                                                                                href='javascript:void(0);'>&rdetail.cn.hold;</a>
                                                                        <a class='hide_me classic_link copy_more_info' name='copy_reserve_link' 
                                                                                href='javascript:void(0);'>&rdetail.cn.reserve;</a>
+                                                                       <a class='hide_me classic_link copy_more_info' name='copy_multi_home'
+                                                                               href='javascript:void(0);'>&rdetail.cn.multi_home;</a>
                                                                </td>
 
                                                                <td name='status'> </td>