From: Bill Erickson Date: Fri, 10 May 2019 19:37:04 +0000 (+0000) Subject: JBAS-2279 Record detail search navigation repairs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1e473d570130bec9bf58897431630ad97d401209;p=working%2FEvergreen.git JBAS-2279 Record detail search navigation repairs Teach the browser client catalog to: 1. pass query params from title links from the embedded catalog to the angjs wrapper opened in a new tab. 2. pass query params from the record detail page angjs container page down to the iframe so the query is propagated to the catalog. 3. add tpac template mods to KCLS record detail template so the wrapper page can get search result counts. Signed-off-by: Bill Erickson --- diff --git a/KCLS/openils/var/templates_kcls/opac/parts/record/body.tt2 b/KCLS/openils/var/templates_kcls/opac/parts/record/body.tt2 index 84a463ab0a..69d7081006 100644 --- a/KCLS/openils/var/templates_kcls/opac/parts/record/body.tt2 +++ b/KCLS/openils/var/templates_kcls/opac/parts/record/body.tt2 @@ -24,6 +24,13 @@ [%#- INCLUDE "opac/parts/pref_lib_display.tt2" %] + + + +
[% IF ctx.prev_search_record; diff --git a/KCLS/openils/var/templates_kcls/opac/parts/result/table.tt2 b/KCLS/openils/var/templates_kcls/opac/parts/result/table.tt2 index 3476cd5971..b12472a6c7 100644 --- a/KCLS/openils/var/templates_kcls/opac/parts/result/table.tt2 +++ b/KCLS/openils/var/templates_kcls/opac/parts/result/table.tt2 @@ -92,7 +92,7 @@ title="[% attrs.title_extended | uri %]" [% IF ctx.is_browser_staff %] target="_blank" - href="/eg/staff/cat/catalog/record/[% rec.id %]" + href="[% mkurl('/eg/staff/cat/catalog/record/' _ rec.id) | replace(';','&') %]" [% ELSE %] href = "[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]" [% END %] diff --git a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js index fc6441ee57..365e4f5f90 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js @@ -1919,9 +1919,15 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e var url = $location.absUrl().replace(/\/staff.*/, '/opac/advanced'); // A record ID in the path indicates a request for the record- - // specific page. + // specific page. Pass along the query params if there are any. if ($routeParams.record_id) { - url = url.replace(/advanced/, '/record/' + $scope.record_id); + url = url.replace(/advanced/, 'record/' + $scope.record_id); + if (location.search) { + // KCLS propagate query params from title links + // that force-open new tabs. + url += location.search; + $scope.from_route = false; + } } // Jumping directly to the results page by passing a search