[open-ils-commits] r14478 - in trunk/Open-ILS/web/opac: locale/en-US skin/default/js skin/default/xml/myopac (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Sat Oct 17 14:41:30 EDT 2009


Author: dbs
Date: 2009-10-17 14:41:26 -0400 (Sat, 17 Oct 2009)
New Revision: 14478

Modified:
   trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
   trunk/Open-ILS/web/opac/skin/default/js/myopac.js
   trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_bookbags.xml
Log:
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


Modified: trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/opac.dtd	2009-10-17 18:40:10 UTC (rev 14477)
+++ trunk/Open-ILS/web/opac/locale/en-US/opac.dtd	2009-10-17 18:41:26 UTC (rev 14478)
@@ -137,6 +137,7 @@
 <!ENTITY myopac.bookbag.create "Create a new Bookbag">
 <!ENTITY myopac.bookbag.naming "Enter the name of the new Bookbag: ">
 <!ENTITY myopac.bookbag.share "Share this Bookbag">
+<!ENTITY myopac.bookbag.refworks "Export to RefWorks">
 <!ENTITY myopac.bookbag.no.items "The selected bookbag contains no items...">
 <!ENTITY myopac.bookbag.remove "Remove this item?">
 <!ENTITY myopac.remove.link "remove">

Modified: trunk/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/myopac.js	2009-10-17 18:40:10 UTC (rev 14477)
+++ trunk/Open-ILS/web/opac/skin/default/js/myopac.js	2009-10-17 18:41:26 UTC (rev 14478)
@@ -8,6 +8,8 @@
 var holdCache = {};
 var holdStatusCache = {};
 var allowPendingAddr = false;
+var myopacEnableRefWorks = false;
+var myopacRefWorksHost = 'http://www.refworks.com';
 
 
 function clearNodes( node, keepArray ) {
@@ -1175,7 +1177,23 @@
 			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');

Modified: trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_bookbags.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_bookbags.xml	2009-10-17 18:40:10 UTC (rev 14477)
+++ trunk/Open-ILS/web/opac/skin/default/xml/myopac/myopac_bookbags.xml	2009-10-17 18:41:26 UTC (rev 14478)
@@ -35,6 +35,7 @@
 					<a name='myopac_bb_published_atom' class='unadorned_link hide_me'>
 						<img border="0" src="/opac/images/small-rss.png" title="&myopac.atom.feed;" alt="&myopac.atom.feed;"/>
 					</a>
+					<br/><a name='myopac_bb_exp_refworks' class='classic_link hide_me'>&myopac.bookbag.refworks;</a>
 				</td>
 
 				<td>



More information about the open-ils-commits mailing list