From: Jeff Godin Date: Tue, 3 Apr 2012 14:34:25 +0000 (-0400) Subject: Hide copy counts for online-only bibs in results X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ad9ed2d37a16df0495bf68e7d31dfffef18a54c2;p=evergreen%2Ftadl.git Hide copy counts for online-only bibs in results Hide copy counts in search results for bibs which appear to be online-only. Signed-off-by: Jeff Godin --- diff --git a/Open-ILS/web/opac/skin/tadlv2/js/rresult.js b/Open-ILS/web/opac/skin/tadlv2/js/rresult.js index 6dccc497ec..c3471a36f2 100644 --- a/Open-ILS/web/opac/skin/tadlv2/js/rresult.js +++ b/Open-ILS/web/opac/skin/tadlv2/js/rresult.js @@ -307,7 +307,11 @@ var recsReceivedCalled = false; function rresultHandleMods(r) { var rec = r.getResultObject(); runEvt('result', 'recordReceived', rec, r.userdata, false); - resultCollectCopyCounts(rec, r.userdata, FETCH_R_COPY_COUNTS); + // Don't display copy counts if we're an online-only bib + // FIXME: more robust logic, centralize and remove hardcoded string + if (rec.online_loc()[0].substring(0,20) != "http://via.tadl.org/") { + resultCollectCopyCounts(rec, r.userdata, FETCH_R_COPY_COUNTS); + } if(resultPageIsDone() && !recsReceivedCalled) { recsReceivedCalled = true; runEvt('result', 'allRecordsReceived', recordsCache); diff --git a/Open-ILS/web/opac/skin/tadlv2/xml/page_rdetail.xml b/Open-ILS/web/opac/skin/tadlv2/xml/page_rdetail.xml index ae62e57611..9fdf85767c 100644 --- a/Open-ILS/web/opac/skin/tadlv2/xml/page_rdetail.xml +++ b/Open-ILS/web/opac/skin/tadlv2/xml/page_rdetail.xml @@ -2,7 +2,7 @@ - + diff --git a/Open-ILS/web/opac/skin/tadlv2/xml/page_rresult.xml b/Open-ILS/web/opac/skin/tadlv2/xml/page_rresult.xml index 9a39c77aa7..201de65258 100644 --- a/Open-ILS/web/opac/skin/tadlv2/xml/page_rresult.xml +++ b/Open-ILS/web/opac/skin/tadlv2/xml/page_rresult.xml @@ -1,6 +1,6 @@
- +