Bugzilla – Attachment 50418 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 reference manager software (Mendeley and EasyBib) to OPAC
Bug-16243-Add-reference-manager-software-Mendeley-.patch (text/plain), 27.14 KB, created by
Héctor Eduardo Castro Avalos
on 2016-04-19 14:59:15 UTC
(
hide
)
Description:
Bug 16243: Add reference manager software (Mendeley and EasyBib) to OPAC
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-04-19 14:59:15 UTC
Size:
27.14 KB
patch
obsolete
>From 591fdbd6f80ed7d5cf18ae9f55c254b0a7d77cfe 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 reference manager software (Mendeley and > EasyBib) 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/> >EasyBib Generate citations in MLA, APA & Chicago formats for bibliographies ><http://www.easybib.com/> > >To test: >- Apply patches >- Run perl installer/data/mysql/updatedatabase.pl >- On master, search for the syspref OpacReferenceManager >- Enable the two options >- Do a search for books >- Notice about the new option 'Export to Reference Manager' in search results >- Create an account in Mendeley (Is free) >- Click in new option and notice that you can save bib references in Mendeley >- Click in new option Cite on EasyBib, you will see the records selected in > EasyBib >- Repeat for items saved in cart and patron list. >- Go to record detail page test in Normal view, Marc view and ISBD view > >NOTE: Fixed according with QA comment > >Sponsored-by: Universidad de El Salvador >--- > .../bug_16243-add_reference_managers.sql | 1 + > installer/data/mysql/sysprefs.sql | 3 +- > .../prog/en/modules/admin/preferences/opac.pref | 6 ++ > .../bootstrap/en/includes/opac-detail-sidebar.inc | 13 +++ > .../en/includes/opac-reference-manager.inc | 106 ++++++++++++++++++ > .../bootstrap/en/modules/opac-ISBDdetail.tt | 6 +- > .../bootstrap/en/modules/opac-MARCdetail.tt | 3 + > .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 12 ++- > .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 3 + > .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 11 +- > .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 10 ++ > koha-tmpl/opac-tmpl/bootstrap/images/easybib.png | Bin 0 -> 415 bytes > koha-tmpl/opac-tmpl/bootstrap/images/mendeley.png | Bin 0 -> 572 bytes > .../opac-tmpl/bootstrap/js/reference_manager.js | 114 ++++++++++++++++++++ > koha-tmpl/opac-tmpl/bootstrap/less/opac.less | 32 +++++- > opac/opac-downloadcart.pl | 1 + > 16 files changed, 314 insertions(+), 7 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_16243-add_reference_managers.sql > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-reference-manager.inc > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/images/easybib.png > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/images/mendeley.png > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/js/reference_manager.js > >diff --git a/installer/data/mysql/atomicupdate/bug_16243-add_reference_managers.sql b/installer/data/mysql/atomicupdate/bug_16243-add_reference_managers.sql >new file mode 100644 >index 0000000..1cc7be8 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_16243-add_reference_managers.sql >@@ -0,0 +1 @@ >+INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacReferenceManager','mendeley,easybib','Select reference manager software options that should be available from OPAC detail, basket and list pages.','','multiple'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index ef4c3f0..05e0f3d 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'), >+('OpacReferenceManager','mendeley,easybib','','Select reference manager software options that should be available from OPAC detail, basket and list pages.','multiple') > ; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index b041ddf..299aaef 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -258,6 +258,12 @@ OPAC: > type: htmlarea > class: code > - >+ - 'Select reference manager software options that should be available from OPAC detail, basket and list pages:' >+ - pref: OpacReferenceManager >+ multiple: >+ mendeley: Mendeley (Reference Manager Software) >+ easybib: EasyBib (Free Bibliography Generator) >+ - > - pref: OpacAddMastheadLibraryPulldown > choices: > yes: Add >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..e4b6410 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 >@@ -64,6 +64,11 @@ > </li> > [% END %] > >+[% IF Koha.Preference( 'OpacReferenceManager' ) %] >+ [% PROCESS 'opac-reference-manager.inc' %] >+ [% INCLUDE menu_side_bar %] >+[% END %] >+ > [% IF ( OPACSearchForTitleIn ) %] > <li> > <div id="moresearches_menu"> >@@ -107,3 +112,11 @@ > </div> > </form> > </div> >+ >+[% IF Koha.Preference( 'OpacReferenceManager' ) %] >+<!-- Form to send RIS data to EasyBib --> >+<form method="post" id="ris_form" action="http://www.easybib.com/impexport/index/add" target="_blank"> >+ <textarea id="easybibTextArea" name="records"></textarea> >+ <input type="submit"> >+</form> >+[% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-reference-manager.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-reference-manager.inc >new file mode 100644 >index 0000000..d95df62 >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-reference-manager.inc >@@ -0,0 +1,106 @@ >+[% BLOCK modal_main %] >+<!-- Reference Manager Modal (EasyBib) --> >+<div class="modal hide" id="exportModal_" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_" aria-hidden="true"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true" id="closeEasyBibModal">×</button> >+ <h3 class="modal-title" id="exportModalLabel">Cite your sources on EasyBib</h3> >+ </div> >+ <form method="get" role="form" id="easybib_form"> >+ <div class="modal-body"> >+ <div id="selections-toolbar" class="toolbar"> >+ <a id="CheckAllEasy" href="#">Select all</a> >+ <span class="sep">|</span> >+ <a id="CheckNoneEasy" href="#">Clear all</a> >+ <span class="sep">|</span> >+ </div> >+ <fieldset id="reference_manager_fieldset"> >+ <div id="content" class="checkbox"> >+ </div> >+ </fieldset> >+ </div> >+ <div class="modal-footer"> >+ <button type="submit" class="btn">Export</button> >+ <button class="btn btn-link" data-dismiss="modal" aria-hidden="true" id="cancelEasyBibModal">Cancel</button> >+ </div> >+ </form> >+<form method="post" id="ris_form" action="http://www.easybib.com/impexport/index/add" target="_blank"> >+ <textarea id="easybibTextArea" name="records"></textarea> >+ <input type="submit"> >+</form> >+</div> >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/reference_manager.js"></script> >+[% END %] >+ >+[% BLOCK menu_basket %] >+<!-- Reference Manager Menu (EasyBib)-Basket --> >+ [% SET reference_manager_options = Koha.Preference('OpacReferenceManager').split(',') %] >+ [% IF reference_manager_options.size %] >+ <span class="sep">|</span> >+ <li class="dropdown"> >+ <a id="reference_manager" class="dropdown-toggle" role="button" data-toggle="dropdown" href="#">Export to Reference Manager <b class="caret"></b></a> >+ <ul class="dropdown-menu" role="menu" aria-labelledby="listsmenu"> >+ [% FOREACH option IN reference_manager_options %] >+ [% IF option == 'mendeley' %] >+ <li role="presentation"> >+ <a role="menuitem" tabindex="-1" href="#" id="mendeley_modal">Save to Mendeley</a> >+ </li> >+ [% ELSE %] >+ <li role="presentation"> >+ <a role="menuitem" tabindex="-1" href="#" data-toggle="modal" data-target="#exportModal_" id="easybib_modal_basket">Cite on EasyBib</a> >+ </li> >+ [% END %] >+ [% END %] >+ </ul> >+ </li> >+ [% END %] >+ >+[% END %] >+ >+[% BLOCK menu_list_results %] >+<!-- Reference Manager Menu (EasyBib)-OPAC Lists and Results --> >+ [% SET reference_manager_options = Koha.Preference('OpacReferenceManager').split(',') %] >+ [% IF reference_manager_options.size %] >+ <span class="sep">|</span> >+ <li class="dropdown"> >+ <a id="reference_manager" class="dropdown-toggle" role="button" data-toggle="dropdown" href="#">Export to Reference Manager <b class="caret"></b></a> >+ <ul class="dropdown-menu" role="menu" aria-labelledby="listsmenu"> >+ [% FOREACH option IN reference_manager_options %] >+ [% IF option == 'mendeley' %] >+ <li role="presentation"> >+ <a role="menuitem" tabindex="-1" href="#" id="mendeley_modal">Save to Mendeley</a> >+ </li> >+ [% ELSE %] >+ <li role="presentation"> >+ <a role="menuitem" tabindex="-1" href="#" data-toggle="modal" data-target="#exportModal_" id="easybib_modal">Cite on EasyBib</a> >+ </li> >+ [% END %] >+ [% END %] >+ </ul> >+ </li> >+ [% END %] >+[% END %] >+ >+[% BLOCK menu_side_bar %] >+ [% SET reference_manager_options = Koha.Preference('OpacReferenceManager').split(',') %] >+ [% IF reference_manager_options.size %] >+ <li> >+ <div id="exportORM_menu"> >+ <div class="dropdown"> >+ <a id="export_reference_manager" class="dropdown-toggle" data-toggle="dropdown" href="#">Export to Reference Manager <b class="caret"></b></a> >+ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="export_reference_manager"> >+ [% FOREACH option IN reference_manager_options %] >+ [% IF option == 'mendeley' %] >+ <li> >+ <a role="menuitem" href="#" id="mendeley_modal">Save to Mendeley</a> >+ </li> >+ [% ELSE %] >+ <li> >+ <a role="menuitem" href="#" id="easybib_menu" data-bibnum="[% biblionumber %]">Cite on EasyBib</a> >+ </li> >+ [% END %] >+ [% END %] >+ </ul> >+ </div></div> >+ </li> >+ [% END %] >+[% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-ISBDdetail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-ISBDdetail.tt >index 3c47566..dba5a2e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-ISBDdetail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-ISBDdetail.tt >@@ -35,4 +35,8 @@ > </div> <!-- / .main --> > > [% INCLUDE 'opac-bottom.inc' %] >-[% BLOCK jsinclude %][% END %] >+[% BLOCK jsinclude %] >+[% IF Koha.Preference( 'OpacReferenceManager' ) %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/reference_manager.js"></script> >+[% END %] >+[% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt >index f4ca095..6587353 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt >@@ -207,4 +207,7 @@ $(document).ready(function(){ > [% END %] > //]]> > </script> >+[% IF Koha.Preference( 'OpacReferenceManager' ) %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/reference_manager.js"></script> >+[% END %] > [% END %] >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..b6d68bd 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,12 @@ > <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( 'OpacReferenceManager' ) %] >+ [% PROCESS 'opac-reference-manager.inc' %] >+ [% INCLUDE menu_basket %] >+[% END %] >+ > </div> > > <div id="selections-toolbar" class="toolbar"> >@@ -263,7 +269,7 @@ > </td> > [% END %] > <td> >- <a href="#" onclick="openBiblio('[% BIBLIO_RESULT.dest %]',[% BIBLIO_RESULT.biblionumber %])">[% BIBLIO_RESULT.title |html %][% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %][% subtitl.subfield |html %][% END %][% END %]</a> >+ <a class="title" href="#" onclick="openBiblio('[% BIBLIO_RESULT.dest %]',[% BIBLIO_RESULT.biblionumber %])" data-bibnumber="[% BIBLIO_RESULT.biblionumber %]">[% BIBLIO_RESULT.title |html %][% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %][% subtitl.subfield |html %][% END %][% END %]</a> > <!-- COinS / Openurl --> > <span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.au=[% BIBLIO_RESULT.author %]&rft.btitle=[% BIBLIO_RESULT.title |url %]&rft.date=[% BIBLIO_RESULT.publicationyear %]&rft.tpages=[% BIBLIO_RESULT.item('size') %]&rft.isbn=[% BIBLIO_RESULT.isbn |url %]&rft.aucorp=&rft.place=[% BIBLIO_RESULT.place %]&rft.pub=[% BIBLIO_RESULT.publisher |url %]&rft.edition=[% BIBLIO_RESULT.edition %]&rft.series=[% BIBLIO_RESULT.series %]&rft.genre="></span> > [% IF ( TagsInputEnabled && loggedinusername ) %] >@@ -426,4 +432,8 @@ > //]]> > </script> > [% END # / IF print_basket %] >+[% IF Koha.Preference( 'OpacReferenceManager' ) %] >+ [% INCLUDE modal_main %] >+[% 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..820b97d 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( 'OpacReferenceManager' ) %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/reference_manager.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..51f5993 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,12 @@ > </div> > [% END %] > </span> <!-- / .links --> >+ >+[% IF Koha.Preference( 'OpacReferenceManager' ) %] >+ [% PROCESS 'opac-reference-manager.inc' %] >+ [% INCLUDE menu_list_results %] >+[% END %] >+ > </div> <!-- / #selections-toolbar --> > > <!-- TABLE RESULTS START --> >@@ -981,4 +986,8 @@ $("input.newtag").on('keydown', function(e){ > }); > //]]> > </script> >+[% IF Koha.Preference( 'OpacReferenceManager' ) %] >+ [% PROCESS 'opac-reference-manager.inc' %] >+ [% INCLUDE modal_main %] >+[% 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..d994e6f 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,12 @@ > <span id="removeitems"></span> > [% END %] > </span> <!-- / .links --> >+ >+[% IF Koha.Preference( 'OpacReferenceManager' ) %] >+ [% PROCESS 'opac-reference-manager.inc' %] >+ [% INCLUDE menu_list_results %] >+[% END %] >+ > </div> <!-- / #selections-toolbar --> > > <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed"> >@@ -962,4 +968,8 @@ function Check(f) { > } > //]]> > </script> >+[% IF Koha.Preference( 'OpacReferenceManager' ) %] >+ [% PROCESS 'opac-reference-manager.inc' %] >+ [% INCLUDE modal_main %] >+[% END %] > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/images/easybib.png b/koha-tmpl/opac-tmpl/bootstrap/images/easybib.png >new file mode 100644 >index 0000000000000000000000000000000000000000..c77e18b07259d60321c0b829e8fc7bc0ca49529b >GIT binary patch >literal 415 >zcmV;Q0bu@#P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00006VoOIv0RI60 >z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru-~<j46e20*KPLbH0W3*G >zK~y-)jnT1698nm>@!zhCVG|-DOr;p6&@lK0wqm*jv`M8FDf0s9EPaawT_GV5d;$Bk >zb~1L8O%MVTBp8Fj&R&~Yka3oo0~fyg9XOo-y`4NxR<VOmxWg~}#!rmO`3h%ImY%Dq >zhj-X7?@zE+o~kafR9$v)gwL9_n8(S+qkt$&|6rh<cB_ldbjagmgyn{S8!SXwI(djN >z)p3gk&+xYT22%}NVr<nSlo;Q!-VpE~&!-sOiut8QgQwW8Lx7W(7<;t{CB`W>TZFub >zvh;7a#yD)*;{B`!bGSyoA>a%jJ9SPTCj)%Y>*>8-5hj7jgrZ<P2E~t2jsr6SHu5+L >zw_m@75JCt=5vt1LWIm6R{;URlyuk%tVZQvnZi)R8!zfGt-2*MyWgNukg&qI^002ov >JPDHLkV1gsfs)Yam > >literal 0 >HcmV?d00001 > >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/reference_manager.js b/koha-tmpl/opac-tmpl/bootstrap/js/reference_manager.js >new file mode 100644 >index 0000000..99ab369 >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/reference_manager.js >@@ -0,0 +1,114 @@ >+//Invoke 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; >+ }); >+}); >+ >+//EasyBib for opac results and patron lists >+ >+$(document).ready(function(){ >+ >+ $("#CheckAllEasy").click(function(){ >+ $( ".easycheck" ).prop( "checked", true ); >+ }); >+ >+ $("#CheckNoneEasy").click(function(){ >+ $( ".easycheck" ).prop( "checked", false ); >+ }); >+ >+ $("#closeEasyBibModal, #cancelEasyBibModal").click(function(){ >+ $( ".easycheck" ).remove(); >+ $( ".label_reference_manager" ).remove(); >+ $( ".crRecord" ).remove(); >+ $( ".recordSeparator" ).remove(); >+ }); >+ >+ $("#easybib_modal").click(function(){ >+ $( ".cb" ).each(function( index ) { >+ var value = $( this ).val(); >+ var id = "biblionumber" + value; >+ var checkbox = "<input type='checkbox' name='bib' value='" + value + "' id='" + id + "' class='easycheck'>"; >+ $( checkbox ).appendTo( "#content" ); >+ $( ".title" ).each(function( i ) { >+ var title = $( this ).text(); >+ var href = $( this ).attr("href"); >+ var url = "/cgi-bin/koha/opac-detail.pl?biblionumber=" + value + "&query_desc="; >+ var urlShelves = "/cgi-bin/koha/opac-detail.pl?biblionumber=" + value; >+ if ( href == url || href == urlShelves ){ >+ var label = "<label for='" + id + "' class='label_reference_manager'>" + title + "</label>"; >+ $( label ).appendTo( "#content" ); >+ $( "<br class='crRecord'>" ).appendTo( "#content" ); >+ $( "<hr class='recordSeparator'>" ).appendTo( "#content" ); >+ } >+ }); >+ }); >+ }); >+ >+//EasyBib for basket >+ >+ $("#easybib_modal_basket").click(function(){ >+ $( ".title" ).each(function( index ) { >+ var data_bibnum = $( this ).data( "bibnumber" ); >+ var id = "biblionumber" + data_bibnum; >+ var checkbox = "<input type='checkbox' name='bib' value='" + data_bibnum + "' id='" + id + "' class='easycheck'>"; >+ $( checkbox ).appendTo( "#content" ); >+ var title = $( this ).text(); >+ var label = "<label for='" + id + "' class='label_reference_manager'>" + title + "</label>"; >+ $( label ).appendTo( "#content" ); >+ $( "<br class='crRecord'>" ).appendTo( "#content" ); >+ $( "<hr class='recordSeparator'>" ).appendTo( "#content" ); >+ }); >+ }); >+}); >+ >+$( "#easybib_form" ).submit(function( event ) { >+ event.preventDefault(); >+ var recordSelected = []; >+ var totalSeleceted; >+ $.each($(".easycheck:checked"), function(){ >+ recordSelected.push($(this).val()); >+ }); >+ if ( recordSelected.length > 0 ) { >+ totalSelected = recordSelected.join( "/" ); >+ $.ajax({ >+ url: "/cgi-bin/koha/opac-downloadcart.pl", >+ contentType: "application/x-www-form-urlencoded; charset=UTF-8", >+ type: "post", >+ data: { format: "ris", bib_list: totalSelected }, >+ success: function( data ){ >+ $( "#easybibTextArea" ).html(data); >+ $( "#ris_form" ).submit(); >+ $( "#closeEasyBibModal" ).click(); >+ } >+ }); >+ } else { >+ alert (_("Please select at least one title to cite on EasyBib") ); >+ } >+}); >+ >+//EasyBib for opac detail record and populate data >+$(document).ready(function(){ >+ $( "#easybib_menu" ).click(function( event ){ >+ event.preventDefault(); >+ var bibNumber = $( this ).data( "bibnum" ); >+ $.ajax({ >+ url: "/cgi-bin/koha/opac-export.pl", >+ contentType: "application/x-www-form-urlencoded; charset=UTF-8", >+ type: "get", >+ data: { op: "export", bib: bibNumber, format: "ris" }, >+ success: function( data ){ >+ $( "#easybibTextArea" ).html(data); >+ $( "#ris_form" ).submit(); >+ } >+ }); >+ return false; >+ }); >+}); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/less/opac.less b/koha-tmpl/opac-tmpl/bootstrap/less/opac.less >index 447e255..99582d0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/less/opac.less >+++ b/koha-tmpl/opac-tmpl/bootstrap/less/opac.less >@@ -1305,6 +1305,7 @@ span#Normalview { > } > > #export, >+#exportORM_menu, > #moresearches_menu { > li { > padding : 0; >@@ -1319,7 +1320,8 @@ span#Normalview { > } > > #format, >-#furthersearches { >+#furthersearches, >+#export_reference_manager { > padding-left : 35px; > } > .highlight_controls { >@@ -2494,18 +2496,42 @@ a.reviewlink:visited { > font-size: 90%; > } > >-#dc_fieldset { >+#dc_fieldset, >+#reference_manager_fieldset { > border: 1px solid #dddddd; > border-width: 1px; > padding: 5px; > border-radius: 10px > } > >-.label_dc{ >+.label_dc, >+.label_reference_manager { > display: inline; > padding: 0px; > margin: 0px; > cursor: pointer; > } > >+#mendeley_modal { >+ background-image: url("../images/mendeley.png"); >+ background-repeat: no-repeat; >+ text-decoration: none; >+ padding-left: 35px; >+ margin-left: 5px; >+} >+ >+#easybib_menu, >+#easybib_modal, >+#easybib_modal_basket { >+ background-image: url("../images/easybib.png"); >+ background-repeat: no-repeat; >+ text-decoration : none; >+ padding-left: 35px; >+ margin-left: 5px; >+} >+ >+#ris_form { >+ display: none; >+} >+ > @import "responsive.less"; >diff --git a/opac/opac-downloadcart.pl b/opac/opac-downloadcart.pl >index c5574e3..78ed9c1 100755 >--- a/opac/opac-downloadcart.pl >+++ b/opac/opac-downloadcart.pl >@@ -90,6 +90,7 @@ if ($bib_list && $format) { > print $query->header( > -type => ($type) ? $type : 'application/octet-stream', > -'Content-Transfer-Encoding' => 'binary', >+ -charset => 'utf-8', > -attachment => ($extension) ? "cart.$format.$extension" : "cart.$format" > ); > print $output; >-- >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