Bug 16243

Summary: Add reference manager software (Mendeley and EasyBib) to OPAC
Product: Koha Reporter: Héctor Eduardo Castro Avalos <hector.hecaxmmx>
Component: OPACAssignee: Héctor Eduardo Castro Avalos <hector.hecaxmmx>
Status: Patch doesn't apply --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: anke.bruns, bgkriegel, dcook, hagud, jonathan.druart, katrin.fischer, m.de.rooy, niamh.walker-headon, oleonard, patrick.robitaille, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8995
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9606
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16245
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7989
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 16340    
Bug Blocks:    
Attachments: Bug 16243: Add Mendeley reference manager to OPAC
Bug 16243: Add Mendeley reference manager to OPAC
Bug 16243: Add Mendeley reference manager to OPAC
Bug 16243: Add Mendeley reference manager to OPAC
Bug 16243: Add Mendeley reference manager to OPAC
Bug 16243: Add reference manager software (Mendeley and EasyBib) to OPAC
Bug 16243: Add reference manager software (Mendeley and EasyBib) to OPAC
Bug 16243: Changes LESS opac.less > to opac.css
Bug 16243: Add reference manager software (Mendeley and EasyBib) to OPAC
Bug 16243: Changes LESS opac.less > to opac.css
Bug 16243: Add reference manager software (Mendeley and EasyBib) to OPAC
Bug 16243: Changes LESS opac.less > to opac.css
[ISGNED-OFF] Bug 16243: Add reference manager software (Mendeley and EasyBib) to OPAC
[SIGNED-OFF] Bug 16243: Changes LESS opac.less > to opac.css
Bug 16243: Add reference manager software (Mendeley and EasyBib) to OPAC
Bug 16243: Changes LESS opac.less > to opac.css
Bug 16243: Add reference manager software (Mendeley and EasyBib) to OPAC
Bug 16243: Changes LESS opac.less > to opac.css
Bug 16243: (follow-up) fix utf8 problems
Bug 16243: (follow-up) Fix QA comments
Bug 16243: Changes LESS opac.less > to opac.css

Description Héctor Eduardo Castro Avalos 2016-04-11 19:53:31 UTC
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/>
Comment 1 Héctor Eduardo Castro Avalos 2016-04-11 21:50:25 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2016-04-11 21:53:35 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2016-04-12 14:42:28 UTC
Hector: Did you forget to change status ?
Comment 4 Héctor Eduardo Castro Avalos 2016-04-12 15:14:05 UTC
(In reply to Marcel de Rooy from comment #3)
> Hector: Did you forget to change status ?

Hi Marcel, I'm working on it needs some improves yet

Regards
Comment 5 Héctor Eduardo Castro Avalos 2016-04-12 17:41:15 UTC Comment hidden (obsolete)
Comment 6 Héctor Eduardo Castro Avalos 2016-04-12 17:44:37 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2016-04-12 23:40:31 UTC
This seems to be working well. One question:

Is necessary to add the Mendeley JavaScript file to the DOM rather than simply including it directly, enclosed in a check on the system preference? Is there a functional benefit to doing they way you do?

I'm marking this as Failed QA for one small thing:

If you want to use the Mendeley image in the OPAC you should add that file to Koha rather than linking to a resource on Mendely's servers. Linking is risky because the resource could be moved, and it will generate mixed-content warnings for OPACs running over SSL.
Comment 8 Héctor Eduardo Castro Avalos 2016-04-13 17:21:33 UTC Comment hidden (obsolete)
Comment 9 Héctor Eduardo Castro Avalos 2016-04-15 21:36:15 UTC Comment hidden (obsolete)
Comment 10 Héctor Eduardo Castro Avalos 2016-04-15 21:40:02 UTC
Hi Owen I have changed the bug according your comment but also I've been added EasyBib to the options. A new syspref has been introduced 'OpacManagerReference'

This is just for record results. I'll work in basket, detail record and list as soon as possible, please test

Regards
Comment 11 Héctor Eduardo Castro Avalos 2016-04-19 03:18:30 UTC Comment hidden (obsolete)
Comment 12 Héctor Eduardo Castro Avalos 2016-04-19 03:22:54 UTC Comment hidden (obsolete)
Comment 13 Héctor Eduardo Castro Avalos 2016-04-19 03:28:00 UTC
Hi All

I finished up and bug is ready to be tested.

Regards
Comment 14 Héctor Eduardo Castro Avalos 2016-04-19 14:59:15 UTC Comment hidden (obsolete)
Comment 15 Héctor Eduardo Castro Avalos 2016-04-19 14:59:25 UTC Comment hidden (obsolete)
Comment 16 Héctor Eduardo Castro Avalos 2016-04-19 15:01:33 UTC
Patches rebased about mistake fixed.
Comment 17 Héctor Eduardo Castro Avalos 2016-04-25 15:38:16 UTC
Comment on attachment 50419 [details] [review]
Bug 16243: Changes LESS opac.less > to opac.css

Obsolete due commit 024b57814dd5f70971efe495d1a7ace5923f067d in bug 16220
Comment 18 Héctor Eduardo Castro Avalos 2016-04-25 15:40:47 UTC Comment hidden (obsolete)
Comment 19 Héctor Eduardo Castro Avalos 2016-04-25 15:46:02 UTC Comment hidden (obsolete)
Comment 20 Bernardo Gonzalez Kriegel 2016-04-30 17:36:03 UTC Comment hidden (obsolete)
Comment 21 Bernardo Gonzalez Kriegel 2016-04-30 17:36:11 UTC Comment hidden (obsolete)
Comment 22 Héctor Eduardo Castro Avalos 2016-06-06 19:11:06 UTC
Still applies...
Comment 23 Jonathan Druart 2016-06-06 19:50:02 UTC
(In reply to Héctor Eduardo Castro Avalos from comment #22)
> Still applies...

No need to CC QAers, the bug report is in the Signed Off queue, it's where we are looking at.
Comment 24 Héctor Eduardo Castro Avalos 2016-06-06 20:24:11 UTC
(In reply to Jonathan Druart from comment #23)
> (In reply to Héctor Eduardo Castro Avalos from comment #22)
> > Still applies...
> 
> No need to CC QAers, the bug report is in the Signed Off queue, it's where
> we are looking at.

Sorry for my mistake, Jonathan. I didn't know.
Comment 25 Héctor Eduardo Castro Avalos 2016-07-07 20:40:20 UTC Comment hidden (obsolete)
Comment 26 Héctor Eduardo Castro Avalos 2016-07-07 20:40:35 UTC Comment hidden (obsolete)
Comment 27 Katrin Fischer 2016-09-18 23:13:30 UTC
Some first notes about this:

In general:
1) EasyBib has a LOT of advertising on the website. Personally I am not sure about promoting this one in Koha. I hadn't run into it before today - maybe others know more about it?

2) I am not sure about the use of the icons - they don't look quite right. 
Maybe because of their strong color that might clash in some layouts. Not a blocker.

Result list:
2) The EasyBib function on the result list does not work for me. The list is always empty, even if I have selected the whole result list first.
3) It would be good if we could show an alert if nothing has been selected, similar to the one for adding to the cart or list.

Detail page:
5) It looks like EasyBib is turning umlauts into gibberish. Example: Zürich >  Zürich. Strangely, this only seems to happen on the details page. 'Zürich' is the place of publication in my example record.

6) Saving to Mendeley tries to save a 'website' instead of the bibliographic data. I tried several records.

Cart:
Seems to work ok.

Lists:
7) Can't save to Mendeley - it tries to save the 'website' here as well.
Comment 28 Katrin Fischer 2016-09-18 23:28:51 UTC
Some additional note after talking about this on IRC:

We link to other proprietary websites and services as well, so I think as long as EasyBib is strictly optional, that's alright.

To achieve that, please change the code so that the preference is used, but only the code for the selected services is activated.
[% IF (.... EasyBib ...) %] or similar.
Comment 29 Héctor Eduardo Castro Avalos 2016-09-19 17:30:08 UTC
(In reply to Katrin Fischer from comment #27)

Hi katrin, thanks to QAing.


> 2) I am not sure about the use of the icons - they don't look quite right. 
> Maybe because of their strong color that might clash in some layouts. Not a
> blocker.

I continue keeping the icons, because opac.less and opac.css. But if you really think this not fit well, I can remove those icons. I put the icons, because patrons are familiar with the icons.

> Result list:
> 2) The EasyBib function on the result list does not work for me. The list is
> always empty, even if I have selected the whole result list first.
> 3) It would be good if we could show an alert if nothing has been selected,
> similar to the one for adding to the cart or list.

This problems are present maybe because there was a CONFLICT MERGE.

> Detail page:
> 5) It looks like EasyBib is turning umlauts into gibberish. Example: Zürich
> >  Zürich. Strangely, this only seems to happen on the details page.
> 'Zürich' is the place of publication in my example record.

I will fix this up in a follow-up

> 6) Saving to Mendeley tries to save a 'website' instead of the bibliographic
> data. I tried several records.
> 
> Cart:
> Seems to work ok.
> 
> Lists:
> 7) Can't save to Mendeley - it tries to save the 'website' here as well.

Ahh..... Sorry my mistake.

Mandeley take the data from OpenURl COinS (Z39.88), please set  COinSinOPACResults to "Include"... I've forgot about this.


(In reply to Katrin Fischer from comment #28)
> To achieve that, please change the code so that the preference is used, but
> only the code for the selected services is activated.
> [% IF (.... EasyBib ...) %] or similar.

I really make this with:
[% IF Koha.Preference( 'OpacReferenceManager' ) %]

Comments 7 and 10 explain it.
Comment 30 Katrin Fischer 2016-09-19 17:34:43 UTC
Hi Hector, just a quick comment to the last part: The preference is checked, of course, but if you activate Mendeley, you will also have the references to EasyBib in the source code - it would be cleaner to avoid this.
Comment 31 Katrin Fischer 2016-09-19 17:36:18 UTC
If it depends on COinSinOPACResults I think it would be good to note that in the preference and check in the templates - for the result lists where this happens we can check both preferences to avoid running into my problem. It will also allow users to use the feature with COinSinOPACResults  turned off.
Comment 32 Héctor Eduardo Castro Avalos 2016-09-19 17:41:42 UTC
Created attachment 55701 [details] [review]
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
- Set  COinSinOPACResults to "Include"
- 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
      Patch rebase due JS translation mistake

Sponsored-by: Universidad de El Salvador

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works following test plan.
No errors
Comment 33 Héctor Eduardo Castro Avalos 2016-09-19 17:42:05 UTC Comment hidden (obsolete)
Comment 34 Héctor Eduardo Castro Avalos 2016-09-19 17:43:37 UTC
Created attachment 55703 [details] [review]
Bug 16243: (follow-up) fix utf8 problems

Fix utf8 problems in opac record details, MARC View and ISBD
Comment 35 Héctor Eduardo Castro Avalos 2016-09-19 17:44:44 UTC
I keep Signed-off since minor changes in follow-up
Comment 36 Héctor Eduardo Castro Avalos 2016-09-19 17:53:02 UTC
Hi Katrin

(In reply to Katrin Fischer from comment #30)
> Hi Hector, just a quick comment to the last part: The preference is checked,
> of course, but if you activate Mendeley, you will also have the references
> to EasyBib in the source code - it would be cleaner to avoid this.

Ok let me improve this

(In reply to Katrin Fischer from comment #31)
> If it depends on COinSinOPACResults I think it would be good to note that in
> the preference and check in the templates - for the result lists where this
> happens we can check both preferences to avoid running into my problem. It
> will also allow users to use the feature with COinSinOPACResults  turned off.

You're right. I will do the necessary to change this.

Thanks too much
Comment 37 Héctor Eduardo Castro Avalos 2016-09-20 15:16:55 UTC
Created attachment 55719 [details] [review]
Bug 16243: (follow-up) Fix QA comments

Fix the following QA comments:
- Avoid source code not selected
- Note added to syspref to clarify the use of COinSinOPACResults turned off
- Avoid source code in OPAC search result when COinSinOPACResults
  is turned off.

Sponsored-by: Universidad de El Salvador
Comment 38 Héctor Eduardo Castro Avalos 2016-09-20 15:25:58 UTC
Hi Katrin

Just one comment: I face problems with RIS format and COinS, this problems happen when you try to save other resources different than books, i.e., continue resoruces, DVD, sound recordings, etc. Koha does not have enough support to those resources.

I think IMHO this needs to be fixed in a separate bug. What do you think?
Comment 39 Héctor Eduardo Castro Avalos 2016-09-23 21:23:45 UTC
Hi Katrin

OpenURL problem is solve in Bug 8995 with status signed-off
Comment 40 Héctor Eduardo Castro Avalos 2016-09-23 21:36:22 UTC
(In reply to Héctor Eduardo Castro Avalos from comment #39)

> OpenURL problem is solve in Bug 8995 with status signed-off

Bugs 9606, 16245 and 7989 for problems faces with RIS
Comment 41 Héctor Eduardo Castro Avalos 2016-10-21 16:43:37 UTC
Created attachment 56727 [details] [review]
Bug 16243: Changes LESS opac.less > to opac.css

Add changes LESS opac.less > to opac.css for Reference Manager Software
(Mendeley and EasyBib)

Sponsored-by: Universidad de El Salvador

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No errors

NOTE: Patch rebased to avoid merge conflict
Comment 42 Tomás Cohen Arazi 2017-09-19 13:40:09 UTC
Sysprefs should be inserted alphabetically sorted.
Comment 43 Hugo Agud 2018-03-13 09:47:43 UTC
<h1>Something went wrong !</h1>Applying: Bug 16243: Add reference manager software (Mendeley and EasyBib) to OPAC
.git/rebase-apply/patch:60: trailing whitespace.
              choices:
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
M       installer/data/mysql/sysprefs.sql
M       koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
M       koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
M       koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc
M       koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-ISBDdetail.tt
M       koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt
M       koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt
M       koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
M       koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
M       koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
M       koha-tmpl/opac-tmpl/bootstrap/less/opac.less
M       opac/opac-downloadcart.pl
.git/rebase-apply/patch:60: trailing whitespace.
              choices:
warning: 1 line adds whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging opac/opac-downloadcart.pl
Auto-merging koha-tmpl/opac-tmpl/bootstrap/less/opac.less
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/less/opac.less
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-ISBDdetail.tt
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
Auto-merging installer/data/mysql/sysprefs.sql
error: Failed to merge in the changes.
Patch failed at 0001 Bug 16243: Add reference manager software (Mendeley and EasyBib) to OPAC
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run git bz apply --continue.
If you would prefer to skip this patch, instead run git bz apply --skip.
To restore the original branch and stop patching run git bz apply --abort.
Bug 16243 - Add reference manager software (Mendeley and EasyBib) to OPAC

55701 - Bug 16243: Add reference manager software (Mendeley and EasyBib) to OPAC
55703 - Bug 16243: (follow-up) fix utf8 problems
55719 - Bug 16243: (follow-up) Fix QA comments
56727 - Bug 16243: Changes LESS opac.less > to opac.css

Apply? [(y)es, (n)o, (i)nteractive] Patch left in /tmp/Bug-16243-Add-reference-manager-software-Mendeley--kZMAox.patch .
Comment 44 Tomás Cohen Arazi 2022-05-26 12:23:28 UTC
Hi, Hector. Is this work still current? (meaning it is worth resurrecting).
Comment 45 Anke Bruns 2022-06-02 10:10:57 UTC
Hi, if this is still current, can I suggest resp. ask things here?

1. Can it be made possible to show an OpenURL window (e.g. SFX) as a popup instead of the same - or a new - browser tab or window?

2: Can it be made possible to activate an OpenURL button or link for titles without any items? I.e. by using 942$c additionally to (or instead of) the item type in the item? This would be useful for e-books or e-journals if the library has full text access e.g. via institutional or national license but no specific item information in the library, and thus in Koha.
Comment 46 Katrin Fischer 2022-06-25 12:06:48 UTC
(In reply to Anke from comment #45)
> Hi, if this is still current, can I suggest resp. ask things here?
> 
> 1. Can it be made possible to show an OpenURL window (e.g. SFX) as a popup
> instead of the same - or a new - browser tab or window?
> 
> 2: Can it be made possible to activate an OpenURL button or link for titles
> without any items? I.e. by using 942$c additionally to (or instead of) the
> item type in the item? This would be useful for e-books or e-journals if the
> library has full text access e.g. via institutional or national license but
> no specific item information in the library, and thus in Koha.

Hi Anke, I think these are good questions, but not sure you'll get any reply here. Maybe try the mailing list or filing as separate bugs depending on Bug 8995?