Hi Dan
On Fri, Jul 31, 2009 at 11:32 AM, Dan Scott<[email protected]> wrote:
> One problem in reading the patch: you've introduced a new entity, but
> there's no corresponding diff for opac.dtd.
>
> A minor nit is that the existing code in the context of your changes
> uses tabs, and you've got spaces.
>
> An aside: at some point, we're going to have to consolidate all of the
> per-skin config vars into a single file.
>
> If you resubmit the patch, can you include the DCO as well?
All fair points. Hopefully the issues with tabs-vs-spaces is addressed
in the updated patch (attached), as well as the new entity in
opac.dtd. If there's anything else, please let me know.
Also, here's the DCO:
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
Cheers,
Warren
Index: Open-ILS/web/opac/locale/en-US/opac.dtd
===================================================================
--- Open-ILS/web/opac/locale/en-US/opac.dtd (revision 13796)
+++ Open-ILS/web/opac/locale/en-US/opac.dtd (working copy)
@@ -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">
Index: Open-ILS/web/opac/skin/default/xml/myopac/myopac_bookbags.xml
===================================================================
--- Open-ILS/web/opac/skin/default/xml/myopac/myopac_bookbags.xml (revision 13796)
+++ Open-ILS/web/opac/skin/default/xml/myopac/myopac_bookbags.xml (working copy)
@@ -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>
Index: Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- Open-ILS/web/opac/skin/default/js/myopac.js (revision 13796)
+++ Open-ILS/web/opac/skin/default/js/myopac.js (working copy)
@@ -8,6 +8,8 @@
var holdCache = {};
var holdStatusCache = {};
var allowPendingAddr = false;
+var myopacEnableRefWorks = true;
+var myopacRefWorksHost = 'http://www.refworks.com';
function clearNodes( node, keepArray ) {
@@ -1151,7 +1153,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');