@@ -, +, @@ - 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 --- .../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 --- a/installer/data/mysql/atomicupdate/bug_16243-add_mendeley_reference_manager.sql +++ a/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'); --- a/installer/data/mysql/sysprefs.sql +++ a/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') ; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref +++ a/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. + --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc @@ -58,6 +58,11 @@ [% END %] [% END %] + [% IF Koha.Preference( 'MendeleyReferenceManager' ) %] +
  • + Save to Mendeley +
  • + [% END %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt @@ -29,6 +29,10 @@ Print Empty and close Hide window + [% IF Koha.Preference( 'MendeleyReferenceManager' ) %] + | + Save to Mendeley + [% END %]
    --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -160,6 +160,7 @@ [% END %] + | [% IF ( TagsInputEnabled && loggedinusername ) %] @@ -176,6 +177,9 @@
    [% END %] + [% IF Koha.Preference( 'MendeleyReferenceManager' ) %] + Save to Mendeley + [% END %] --- a/koha-tmpl/opac-tmpl/bootstrap/js/mendeley.js +++ a/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; + }); +}); --