From 9877785cbabbc369e5dd0186622fd11db88839e7 Mon Sep 17 00:00:00 2001 From: dbs Date: Sat, 18 Sep 2010 01:47:15 +0000 Subject: [PATCH] Expose an RSS (Atom, actually) feed in the dynamic OPAC for search results I doubt most humans really care about RSS feeds, but this will make the RSS feed icon highlight in Firefox and that should satisfy one of the "requirements" for a Next Generation OPAC if that's the bar for research papers these days. git-svn-id: svn://svn.open-ils.org/ILS/trunk@17802 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/skin/default/js/result_common.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Open-ILS/web/opac/skin/default/js/result_common.js b/Open-ILS/web/opac/skin/default/js/result_common.js index 234c4dc26..025e7e984 100644 --- a/Open-ILS/web/opac/skin/default/js/result_common.js +++ b/Open-ILS/web/opac/skin/default/js/result_common.js @@ -93,6 +93,11 @@ function resultCollectSearchIds( type, method, handler ) { _debug('Search args: ' + js2JSON(args)); _debug('Raw query: ' + getTerm()); + var atomfeed = "/opac/extras/opensearch/1.1/" + findOrgUnit(args.org_unit).shortname() + "/atom-full/" + getStype() + '?searchTerms=' + getTerm(); + if (sort) { atomfeed += '&searchSort=' + sort; } + if (sortdir) { atomfeed += '&searchSortDir=' + sortdir; } + dojo.create('link', {"rel":"alternate", "href":atomfeed, "type":"application/atom+xml"}, dojo.query('head')[0]); + var req = new Request(method, args, getTerm(), 1); req.callback(handler); req.send(); -- 2.11.0