Bugzilla – Attachment 50208 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]
Bug 16243: Add Mendeley reference manager to OPAC
Bug-16243-Add-Mendeley-reference-manager-to-OPAC.patch (text/plain), 11.72 KB, created by
Héctor Eduardo Castro Avalos
on 2016-04-13 17:21:33 UTC
(
hide
)
Description:
Bug 16243: Add Mendeley reference manager to OPAC
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-04-13 17:21:33 UTC
Size:
11.72 KB
patch
obsolete
>From c399e6866d8e7c2d035e9556167315ac72948926 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 > >NOTE: Fixed according with QA comment > >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 | 7 +++++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 3 +++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 8 +++++++- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 7 +++++++ > koha-tmpl/opac-tmpl/bootstrap/images/mendeley.png | Bin 0 -> 572 bytes > koha-tmpl/opac-tmpl/bootstrap/js/mendeley.js | 13 +++++++++++++ > 10 files changed, 53 insertions(+), 2 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_16243-add_mendeley_reference_manager.sql > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/images/mendeley.png > 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..967df0c 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="#" id="mendeley_modal">Save to Mendeley <img src="[% interface %]/[% theme %]/images/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..9d104f5 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="#" id="mendeley_modal"><img src="[% interface %]/[% theme %]/images/mendeley.png"/> Save to Mendeley</a> >+ [% END %] > </div> > > <div id="selections-toolbar" class="toolbar"> >@@ -426,4 +430,7 @@ > //]]> > </script> > [% END # / IF print_basket %] >+[% IF Koha.Preference( 'MendeleyReferenceManager' ) %] >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/mendeley.js"></script> >+[% END %] > [% END # / BLOCK jsinclude %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index 8e7efe4..c3d70db 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1873,4 +1873,7 @@ > //]]> > </script> > [% END # / IF OPACPopupAuthorsSearch %] >+[% IF Koha.Preference( 'MendeleyReferenceManager' ) %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/mendeley.js"></script> >+[% END %] > [% END %] >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..20663db 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -160,7 +160,6 @@ > <span class="addto"></span> > [% END %] > <span id="placehold"><!-- input class="submit" type="submit" value="Place Hold"/ --></span> >- > [% IF ( TagsInputEnabled && loggedinusername ) %] > <span id="tagsel_span"> > <input id="tagsel_tag" class="disabled" type="submit" value="Tag"/> >@@ -176,6 +175,10 @@ > </div> > [% END %] > </span> <!-- / .links --> >+ [% IF Koha.Preference( 'MendeleyReferenceManager' ) %] >+ <span class="sep">|</span> >+ <span id="export_mendeley"><a href="#" id="mendeley_modal">Save to Mendeley <img src="[% interface %]/[% theme %]/images/mendeley.png"/></a></span> >+ [% END %] > </div> <!-- / #selections-toolbar --> > > <!-- TABLE RESULTS START --> >@@ -981,4 +984,7 @@ $("input.newtag").on('keydown', function(e){ > }); > //]]> > </script> >+[% IF Koha.Preference( 'MendeleyReferenceManager' ) %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/mendeley.js"></script> >+[% END %] > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index ab704ab..f22b57a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -278,6 +278,10 @@ > <span id="removeitems"></span> > [% END %] > </span> <!-- / .links --> >+ [% IF Koha.Preference( 'MendeleyReferenceManager' ) %] >+ <span class="sep">|</span> >+ <span id="export_mendeley"><a href="#" id="mendeley_modal">Save to Mendeley <img src="[% interface %]/[% theme %]/images/mendeley.png"/></a></span> >+ [% END %] > </div> <!-- / #selections-toolbar --> > > <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed"> >@@ -962,4 +966,7 @@ function Check(f) { > } > //]]> > </script> >+[% IF Koha.Preference( 'MendeleyReferenceManager' ) %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/mendeley.js"></script> >+[% END %] > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/images/mendeley.png b/koha-tmpl/opac-tmpl/bootstrap/images/mendeley.png >new file mode 100644 >index 0000000000000000000000000000000000000000..1008143b362c1673ab2dbbd239924f04ff8549e6 >GIT binary patch >literal 572 >zcmV-C0>k}@P)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM0000PbVXQnQ*UN; >zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUz-bqA3RCwByQawmpQ53$%B>p5OFM((w >zQKKXff0ArkT7rWGp}1tVlbayA3NCKCw38w@iEY5aA%U)4N`}&<lo%SLP!)^dVtMa{ >z4vlb+=iGav;^uvid(ZvOcYg1Ia&$sGXL(W32LezC5J<ZK08|1=yc>{DU<1jRRxrw^ >zyf+qYL&8vD9mqR#$ZPjtEc$v<-Ps*Vw6f`*p_n8+swJ>PYBkElyTaR_U#36rzxi77 >z1bb1+SH*3T2^^X)sK~tFFg&WlirGpjoE_7Z*|p=A)9lYr>FcfImWQV(C(6w$C7QY( >zt@DF2Wqxl!T1p8xG4M)5#+KdG>VKD4jh&Aq#OG%E^DlKkRWx_hOJ+VR6v>VItYBq+ >ziK1uLRx)eL#PfwhgmhZL^wL6Ke$qZ_{C8YY3?%<n>r~Bk<$KYeqW|0Cs;;lPu~iHZ >zk|Y&fn-_mR`BR)yAQ2~jk=&T1z##mCag#bXj}iSEy@>$=JOxkKJvr-n(f4Ehy?t^< >ztea}xN++Gu-?b0BEytw?Y1u9js+(IkN55dNYXnRyOsjZK+Fsj;nFVeu;?tfYNFm`d >z-7vVX)K)codfrSZeBc=OT7`OAQN>3?Lp_(EneEa|1fIb=0R{jzbsz2X(L5pm0000< >KMNUMnLSTZ|qXJg| > >literal 0 >HcmV?d00001 > >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 Raw
Actions:
View
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