Bugzilla – Attachment 50153 Details for
Bug 16243
Add reference manager software (Mendeley and EasyBib) to OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16243: Add Mendeley reference manager to OPAC
Bug-16243-Add-Mendeley-reference-manager-to-OPAC.patch (text/plain), 8.37 KB, created by
Héctor Eduardo Castro Avalos
on 2016-04-12 17:41:15 UTC
(
hide
)
Description:
Bug 16243: Add Mendeley reference manager to OPAC
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-04-12 17:41:15 UTC
Size:
8.37 KB
patch
obsolete
>From 75e1f65e2a1e5a1e756f026b39fcee36f5fc76f4 Mon Sep 17 00:00:00 2001 >From: Hector Castro <hector.hecaxmmx@gmail.com> >Date: Mon, 11 Apr 2016 15:49:29 -0600 >Subject: [PATCH] Bug 16243: Add Mendeley reference manager to OPAC > >Mendeley provides a mechanism for export bib records to a personal account >in a free reference manager and academic social network (similar to Zotero) ><https://www.mendeley.com/> > >To test: >- Apply patch >- Run perl installer/data/mysql/updatedatabase.pl >- On master, search for the syspref MendeleyReferenceManager >- Enable the option >- Do a search for books >- Notice about the new option 'Save to Mendeley' in search result, cart, > record, and your list pages >- Create an account in Mendeley (Is free) >- Click in new option and notice that you can save bib references in Mendeley > >Sponsored-by: Universidad de El Salvador >--- > .../bug_16243-add_mendeley_reference_manager.sql | 1 + > installer/data/mysql/sysprefs.sql | 3 ++- > .../en/modules/admin/preferences/enhanced_content.pref | 8 ++++++++ > .../bootstrap/en/includes/opac-detail-sidebar.inc | 5 +++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt | 4 ++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 4 ++++ > koha-tmpl/opac-tmpl/bootstrap/js/mendeley.js | 13 +++++++++++++ > 7 files changed, 37 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_16243-add_mendeley_reference_manager.sql > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/js/mendeley.js > >diff --git a/installer/data/mysql/atomicupdate/bug_16243-add_mendeley_reference_manager.sql b/installer/data/mysql/atomicupdate/bug_16243-add_mendeley_reference_manager.sql >new file mode 100644 >index 0000000..44bd641 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_16243-add_mendeley_reference_manager.sql >@@ -0,0 +1 @@ >+INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('MendeleyReferenceManager',NULL,'Add Mendeley reference manager to search results and bibliographic detail pages on the OPAC.',NULL,'free'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index ef4c3f0..f81e20d 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -532,5 +532,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('XSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on intranet','Free'), > ('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'), > ('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'), >-('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo') >+('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'), >+('MendeleyReferenceManager',NULL,NULL,'Add Mendeley reference manager to search results and bibliographic detail pages on the OPAC.','free') > ; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >index ce8bee3..24bfa9d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >@@ -367,3 +367,11 @@ Enhanced Content: > aws: Amazon Web Services > gb: Google Books > ol: Open Library >+ Mendeley reference manager: >+ - >+ - pref: MendeleyReferenceManager >+ choices: >+ yes: Add >+ no: "Don't add" >+ - Mendeley reference manager to search results and bibliographic detail pages on the OPAC. >+ >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc >index d02b4c2..456e128 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc >@@ -58,6 +58,11 @@ > </li> > [% END %] > [% END %] >+ [% IF Koha.Preference( 'MendeleyReferenceManager' ) %] >+ <li> >+ <a role="menuitem" href="javascript:document.getElementsByTagName('body')[0].appendChild(document.createElement('script')).setAttribute('src','https://www.mendeley.com/minified/bookmarklet.js');">Save to Mendeley <img src="http://www.mendeley.com/graphics/mendeley.png"/></a> >+ </li> >+ [% END %] > </ul> > </div> > </div> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >index fa7e496..46acc72 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >@@ -29,6 +29,10 @@ > <a class="print-large" href="opac-basket.pl" onclick="printBasket(); return false;">Print</a> > <a class="empty" href="opac-basket.pl" onclick="delBasket(); return false;">Empty and close</a> > <a class="hide close" href="opac-basket.pl">Hide window</a> >+ [% IF Koha.Preference( 'MendeleyReferenceManager' ) %] >+ <span class="sep">|</span> >+ <a href="javascript:document.getElementsByTagName('body')[0].appendChild(document.createElement('script')).setAttribute('src','https://www.mendeley.com/minified/bookmarklet.js');"><img src="http://www.mendeley.com/graphics/mendeley.png"/> Save to Mendeley</a> >+ [% END %] > </div> > > <div id="selections-toolbar" class="toolbar"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index 061ceed..39d55ac 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -160,6 +160,7 @@ > <span class="addto"></span> > [% END %] > <span id="placehold"><!-- input class="submit" type="submit" value="Place Hold"/ --></span> >+ <span class="sep">|</span> > > [% IF ( TagsInputEnabled && loggedinusername ) %] > <span id="tagsel_span"> >@@ -176,6 +177,9 @@ > </div> > [% END %] > </span> <!-- / .links --> >+ [% IF Koha.Preference( 'MendeleyReferenceManager' ) %] >+ <span id="export_mendeley"><a href="javascript:document.getElementsByTagName('body')[0].appendChild(document.createElement('script')).setAttribute('src','https://www.mendeley.com/minified/bookmarklet.js');">Save to Mendeley <img src="http://www.mendeley.com/graphics/mendeley.png"/></a></span> >+ [% END %] > </div> <!-- / #selections-toolbar --> > > <!-- TABLE RESULTS START --> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/mendeley.js b/koha-tmpl/opac-tmpl/bootstrap/js/mendeley.js >new file mode 100644 >index 0000000..e9ad403 >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/mendeley.js >@@ -0,0 +1,13 @@ >+//Call for Mendeley Reference Manager >+ >+function getMendeleyModal(){ >+ document.getElementsByTagName('body')[0].appendChild(document.createElement('script')).setAttribute('src','https://www.mendeley.com/minified/bookmarklet.js'); >+} >+ >+$(document).ready(function(){ >+ $( "#mendeley_modal" ).click(function( event ){ >+ event.preventDefault(); >+ getMendeleyModal(); >+ return false; >+ }); >+}); >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16243
:
50134
|
50135
|
50153
|
50154
|
50208
|
50290
|
50378
|
50379
|
50418
|
50419
|
50653
|
50654
|
51062
|
51063
|
53206
|
53207
|
55701
|
55702
|
55703
|
55719
|
56727