From d6468899a0dadf0cd761f2bd6ccc087383e31586 Mon Sep 17 00:00:00 2001 From: dbs Date: Sat, 17 Oct 2009 18:40:10 +0000 Subject: [PATCH] Patch from Warren Layton to add a "Export to RefWorks" link for bookbags. The link only appears if the user's bookbag is shared (if it's not shared, Supercat feeds for the bookbag won't be visible to outside world, including RefWorks). It appears under the "Shared" column (right under "Yes (View) [RSS]"). Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Warren Layton git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@14477 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/locale/en-US/opac.dtd | 1 + Open-ILS/web/opac/skin/default/js/myopac.js | 20 +++++++++++++++++++- .../opac/skin/default/xml/myopac/myopac_bookbags.xml | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/opac/locale/en-US/opac.dtd b/Open-ILS/web/opac/locale/en-US/opac.dtd index f015c0a763..5550bef154 100644 --- a/Open-ILS/web/opac/locale/en-US/opac.dtd +++ b/Open-ILS/web/opac/locale/en-US/opac.dtd @@ -137,6 +137,7 @@ Are you sure you wish to continue?"> + diff --git a/Open-ILS/web/opac/skin/default/js/myopac.js b/Open-ILS/web/opac/skin/default/js/myopac.js index a01334a2ea..2be360cd78 100644 --- a/Open-ILS/web/opac/skin/default/js/myopac.js +++ b/Open-ILS/web/opac/skin/default/js/myopac.js @@ -8,6 +8,8 @@ var fleshedContainers = {}; var holdCache = {}; var holdStatusCache = {}; var allowPendingAddr = false; +var myopacEnableRefWorks = false; +var myopacRefWorksHost = 'http://www.refworks.com'; function clearNodes( node, keepArray ) { @@ -1172,7 +1174,23 @@ function myOPACShowBookbags(force) { link = $n(row, 'myopac_bb_make_unpublished'); link.setAttribute('href', 'javascript:myOPACMakeBBPublished("'+cont.id()+'", true);'); unHideMe(link); - + + var RW = $n(row, 'myopac_bb_exp_refworks'); + if (RW && myopacEnableRefWorks) { + var here = (findOrgUnit(getLocation())).name(); + var org_name = here.replace(" ", "+"); + var cgi = new CGI(); + + RW.setAttribute('href', + myopacRefWorksHost + '/express/expressimport.asp?vendor=' + + org_name + + '&filter=MARC+Format&database=All+MARC+Formats&encoding=65001&url=http%3A%2F%2F' + + cgi.server_name + '/opac/extras/feed/bookbag/marctxt-full/' + + cont.id() + ); + RW.setAttribute('target', 'RefWorksMain'); + unHideMe($n(row, 'myopac_bb_exp_refworks')); + } } else { unHideMe($n(row, 'myopac_bb_published_no')); var link = $n(row, 'myopac_bb_make_published'); diff --git a/Open-ILS/web/opac/skin/default/xml/myopac/myopac_bookbags.xml b/Open-ILS/web/opac/skin/default/xml/myopac/myopac_bookbags.xml index e0d691cba2..d4c6d3f3d3 100644 --- a/Open-ILS/web/opac/skin/default/xml/myopac/myopac_bookbags.xml +++ b/Open-ILS/web/opac/skin/default/xml/myopac/myopac_bookbags.xml @@ -35,6 +35,7 @@ &myopac.atom.feed; +
&myopac.bookbag.refworks; -- 2.11.0