[Bug 5671] New: Add a column of custom HTML to "my summary"
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Summary: Add a column of custom HTML to "my summary" Change sponsored?: Sponsored Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: OPAC AssignedTo: magnus@enger.priv.no ReportedBy: magnus@enger.priv.no QAContact: koha-bugs@lists.koha-community.org Estimated Hours: 0.0 Deadline: 2011-03-01 Created attachment 3040 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3040 Screenshot showing the desired functionality A client would like to be able to display custom HTML (specifically a link called "Share on Facebook") in a new column on the "my summary" tab in the OPAC. The rationale for this is that the user will be highly motivated to tell others about a book when they are about to renew the loan. It should work similar to the current OPACSearchForTitleIn syspref, with placeholders for relevant pieces of information. See the wiki for further details: http://wiki.koha-community.org/wiki/Add_a_column_of_custom_HTML_to_%22my_sum... This enhancement is sponsored by The Halland libraries, Sweden. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com --- Comment #1 from Nicole C. Engard <nengard@gmail.com> 2011-01-31 14:44:07 UTC --- I love it!! :) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #2 from Jane Wagner <jwagner@ptfs.com> 2011-03-30 13:34:17 UTC --- I think there could be wider application if the variables were available in other places, such as on record display, lists, cart. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #3 from Magnus Enger <magnus@enger.priv.no> 2011-03-31 17:15:54 UTC --- Created attachment 3580 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3580 Proposed patch The code can be seen running on http://head.bibkat.no/ - log in as demo with username demo. The OPACMySummaryHTML hasa been left blank as default, so only those libraries the want the functionality have to worry about it. Here is a value for OPACMySummaryHTML that should display all the avalable variables, as well as an example of a link to Facebook (replace example.com with the domain name used by your OPAC): <p><a href="http://www.facebook.com/sharer.php?u=http://example.com/cgi-bin/koha/opac-detail.pl?biblionumber={BIBLIONUMBER}">Share on Facebook</a> <br />TITLE: {TITLE} <br />AUTHOR: {AUTHOR} <br />ISBN: {ISBN} <br />BIBLIONUMBER: {BIBLIONUMBER} <br />CONTROLNUMBER: {CONTROLNUMBER}</p> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #4 from Magnus Enger <magnus@enger.priv.no> 2011-03-31 17:22:21 UTC --- (In reply to comment #2)
I think there could be wider application if the variables were available in other places, such as on record display, lists, cart.
I agree completely, but do not have the time to do anything about it now. I can imagine a number of sysprefs that would allow libraries to "inject" HTML all over the opac - e.g. in detail view: above the items, below the items, in different spots in the right hand column etc. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #5 from Ian Walls <ian.walls@bywatersolutions.com> 2011-03-31 17:36:52 UTC --- The patch attached does not perform the database update on my system; had to remove the escaped single quotes around "my profile"... Also, the actual name of the system preferences, OPACMySummaryHTML, is not what's in the update message: OPACMyProfileHTML. The patch applies, but when logging into my account in the OPAC, I find the Checkouts/Overdues/Fines tabs broken. It may be my data, but {CONTROLNUMBER is not parsed}; it remains {CONTROLNUMBER} -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #6 from Magnus Enger <magnus@enger.priv.no> 2011-03-31 17:46:23 UTC --- (In reply to comment #5)
The patch attached does not perform the database update on my system; had to remove the escaped single quotes around "my profile"... Also, the actual name of the system preferences, OPACMySummaryHTML, is not what's in the update message: OPACMyProfileHTML.
The patch applies, but when logging into my account in the OPAC, I find the Checkouts/Overdues/Fines tabs broken.
It may be my data, but {CONTROLNUMBER is not parsed}; it remains {CONTROLNUMBER}
Thanks for testing, Ian. I definitely messed some things up. Revised patch coming! -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #7 from Nicole C. Engard <nengard@gmail.com> 2011-03-31 17:46:46 UTC --- Created attachment 3582 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3582 patch removed the tabs from the summary It looks like applying this patch removes the tabs from the summary page -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #8 from Nicole C. Engard <nengard@gmail.com> 2011-03-31 17:49:59 UTC --- What is 'controlnumber'? I thought it would be the bib number so I tried to create a twitter link (http://twitter.com/about/resources/tweetbutton) and on the page it appeared like this: http://twitter.com/share?_=1301593733583&count=vertical&text=Nicole%27s%20Library%20Catalog%20%E2%80%BA%20Library%20Home%20for%20Nicole%20Engard&url=http%3A%2F%2Flocalhost-opac%3A8000%2Fcgi-bin%2Fkoha%2Fopac-detail.pl%3Fbiblionumber%3D%7BCONTROLNUMBER%7D Note the controlnumber text in there. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Failed QA -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #9 from Nicole C. Engard <nengard@gmail.com> 2011-03-31 17:54:26 UTC --- fyi i'm using FF4 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3580|0 |1 is obsolete| | --- Comment #10 from Magnus Enger <magnus@enger.priv.no> 2011-03-31 19:22:49 UTC --- Created attachment 3583 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3583 Revised patch Removed escaped single quotes from updatedatabase.pl and corrects the description on opac.pref. {CONTROLNUMBER} was not meant to be implemented. Revised test value: <p><a href="http://www.facebook.com/sharer.php?u=http://example.com/cgi-bin/koha/opac-detail.pl?biblionumber={BIBLIONUMBER}">Share on Facebook</a> <br />TITLE: {TITLE} <br />AUTHOR: {AUTHOR} <br />ISBN: {ISBN} <br />BIBLIONUMBER: {BIBLIONUMBER}</p> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Failed QA |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #11 from Magnus Enger <magnus@enger.priv.no> 2011-03-31 19:26:12 UTC --- (In reply to comment #10)
Created attachment 3583 [details] Revised patch
I have looked for the broken tabs in FF 3.6 on Linux and Windows, and FF4 on Mac OS X, but have not been able to reproduce them, either with the the first or the second patch. Will look into that further later. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |claire.hernandez@biblibre.c | |om --- Comment #12 from MJ Ray (software.coop) <mjr@ttllp.co.uk> 2011-04-01 09:42:31 UTC --- This bug is mentioned in: Bug 5671 - Add a column of custom HTML to my summary http://lists.koha-community.org/pipermail/koha-patches/2011-March/014405.htm... Bug 5671 - Revised Patch - Add a column of custom HTML to my summary http://lists.koha-community.org/pipermail/koha-patches/2011-March/014407.htm... --- Comment #13 from claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> 2011-04-04 13:53:13 UTC --- What I did: - git am the patch - resolved conflicts with updatedatabase version (and kohaversion) - add a content syspref with TITLE, AUTHOR, ISBN and BIBLIONUMBER - connect in opac with a used and see checkout in "my summary" tab I saw what I put in syspref with good data in Chrome 10.0.6 and FFx 3.6.15 under Linux system without removing tabs display on the left. Seems ok for me. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3583|0 |1 is obsolete| | --- Comment #14 from Magnus Enger <magnus@enger.priv.no> 2011-04-04 14:12:32 UTC --- Created attachment 3630 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3630 This revised patch should fix the problem with missing tabs on My Summary There was a JavaScript error that was causing the tabs on "my summary" to (sometimes?) disappear. This revised patch should fix the JS error and restor the tabs. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Patch Status|Signed Off |Patch Pushed --- Comment #15 from Chris Cormack <chris@bigballofwax.co.nz> 2011-04-09 07:24:05 UTC --- Pushed, please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |rel_3_4 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #16 from Nicole C. Engard <nengard@gmail.com> 2011-04-18 16:43:34 UTC --- I can't seem to get this working since switching to Template Toolkit ... can anyone fix or confirm? I'm on Mac and FF4 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #17 from Magnus Enger <magnus@enger.priv.no> 2011-04-18 19:47:40 UTC --- Created attachment 3948 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3948 Fines messed up, Links missing I'm probably seeing the same as Nicole, see the attached screenshot from FF4 on Mac. Same thing in Safari on Mac. The fines column is messed up and Links are missing. The contents of OPACMySummaryHTML does not seem to affect this, however. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #18 from Magnus Enger <magnus@enger.priv.no> 2011-04-18 20:20:16 UTC --- I see a couple of problems: In koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt, *html should be *HTML: 266 [% IF ( OPACMySummaryhtml ) %] 267 <td>[% MySummaryhtml %]</td> 268 [% END %] In opac/opac-user.pl, normalized_isbn and MySummaryHTML are both added to $issue after it has been pushed onto @issuedat, which is what gets assigned to the ISSUES template variable: 161 $issue->{date_due} = format_date($issue->{date_due}); 162 push @issuedat, $issue; 163 $count++; 164 165 my $isbn = GetNormalizedISBN($issue->{'isbn'}); 166 $issue->{normalized_isbn} = $isbn; 167 168 # My Summary HTML 169 if (my $my_summary_html = C4::Context->preference('OPACMySummaryHTML')){ ... 176 $issue->{MySummaryHTML} = $my_summary_html; ... 180 $template->param( ISSUES => \@issuedat ); But fixing both of these does not fix the "My Summary" page... Will look some more tomorrow... -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 --- Comment #19 from Magnus Enger <magnus@enger.priv.no> 2011-04-19 08:33:19 UTC --- Created attachment 3949 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3949 Followup patch, fixing missing Links column The missing fines was due to me testing on an installation with not-quite-uptodate Norwegian templates, when I switched to English they showed just fine. The missing Links were due to OPACMySummaryHTML/MySummaryHTML being spelled as OPACMySummaryhtml/MySummaryhtml, and MySummaryHTML not being tied to issues with ISSUE.MySummaryHTML. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Patch Pushed |Needs Signoff Severity|enhancement |normal -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Patch Pushed --- Comment #20 from Chris Cormack <chris@bigballofwax.co.nz> 2011-04-20 00:01:45 UTC --- Follow up patch pushed please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Viktor Sarge <viktor.sarge@regionhalland.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |viktor.sarge@regionhalland. | |se --- Comment #21 from Viktor Sarge <viktor.sarge@regionhalland.se> 2011-06-07 12:32:47 UTC --- (In reply to comment #20)
Follow up patch pushed please test
Works fine for me. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5671 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org