Bugzilla – Attachment 11644 Details for
Bug 6494
opacmysummaryhtml on reading history
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 6494 - opacmysummaryhtml on reading history
SIGNED-OFF-Bug-6494---opacmysummaryhtml-on-reading.patch (text/plain), 7.38 KB, created by
Nicole C. Engard
on 2012-08-16 17:12:33 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 6494 - opacmysummaryhtml on reading history
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2012-08-16 17:12:33 UTC
Size:
7.38 KB
patch
obsolete
>From 9dfeaa4914245729cd129d0b9133fc2e1a5a6f32 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 16 Aug 2012 12:53:25 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 6494 - opacmysummaryhtml on reading history > >This patch re-uses code and markup from opac-user.tt & .pl >to place the contents of the opacmysummaryhtml preference >on the circulation history page in exactly the same way >it appears on the "my summary" page. > >The wording of the system preference description has >been modified to reflect this addition. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >Works as advertised. >--- > installer/data/mysql/sysprefs.sql | 2 +- > .../prog/en/modules/admin/preferences/opac.pref | 2 +- > .../prog/en/modules/opac-readingrecord.tt | 6 ++++++ > opac/opac-readingrecord.pl | 11 +++++++++++ > 4 files changed, 19 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index f5a18b2..e17b51f 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -280,7 +280,7 @@ INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanatio > INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'DisplayClearScreenButton', '0', '', 'If set to ON, a clear screen button will appear on the circulation page.', 'YesNo'); > INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('HidePatronName', '0', '', 'If this is switched on, patron''s cardnumber will be shown instead of their name on the holds and catalog screens', 'YesNo'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACSearchForTitleIn','<li><a href="http://worldcat.org/search?q={TITLE}" target="_blank">Other Libraries (WorldCat)</a></li>\n<li><a href="http://www.scholar.google.com/scholar?q={TITLE}" target="_blank">Other Databases (Google Scholar)</a></li>\n<li><a href="http://www.bookfinder.com/search/?author={AUTHOR}&title={TITLE}&st=xl&ac=qr" target="_blank">Online Stores (Bookfinder.com)</a></li>\n<li><a href="http://openlibrary.org/search/?author=({AUTHOR})&title=({TITLE})" target="_blank">Open Library (openlibrary.org)</a></li>','Enter the HTML that will appear in the \'Search for this title in\' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable \'More Searches\' menu.','70|10','Textarea'); >-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACMySummaryHTML','','Enter the HTML that will appear in a column on the \'my profile\' tab when a user is logged in to the OPAC. Enter {BIBLIONUMBER}, {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the HTML. Leave blank to disable.','70|10','Textarea'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACMySummaryHTML','','Enter the HTML that will appear in a column on the \'my summary\' and \'my reading history\' tabs when a user is logged in to the OPAC. Enter {BIBLIONUMBER}, {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the HTML. Leave blank to disable.','70|10','Textarea'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','If OFF the patron details tab in the OPAC is disabled.','','YesNo'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','If OFF the patron fines tab in the OPAC is disabled.','','YesNo'); > INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'If ON, displays the format, audience, type icons in XSLT MARC21 results and display pages.', 'YesNo'); >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 0fe79d4..50abfeb 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 >@@ -199,7 +199,7 @@ OPAC: > type: textarea > class: code > - >- - 'Include a "Links" column on the "my summary" tab when a user is logged in to the OPAC, with the following HTML (leave blank to disable):' >+ - 'Include a "Links" column on the "my summary" and "my reading history" tabs when a user is logged in to the OPAC, with the following HTML (leave blank to disable):' > - '<br />Note: The placeholders {BIBLIONUMBER}, {TITLE}, {ISBN} and {AUTHOR} will be replaced with information from the displayed record.' > - pref: OPACMySummaryHTML > type: textarea >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt >index 8786925..213deeb 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt >@@ -59,6 +59,9 @@ You have never borrowed anything from this library. > <th>Item type</th> > <th>Call no.</th> > <th>Date</th> >+[% IF ( OPACMySummaryHTML ) %] >+<th>Links</th> >+[% END %] > </tr> > > [% FOREACH READING_RECOR IN READING_RECORD %] >@@ -85,6 +88,9 @@ You have never borrowed anything from this library. > <td>[% UNLESS ( noItemTypeImages ) %][% IF ( READING_RECOR.imageurl ) %]<img src="[% READING_RECOR.imageurl %]" alt="" />[% END %][% END %] [% READING_RECOR.description %]</td> > <td>[% READING_RECOR.itemcallnumber %]</td> > <td>[% IF ( READING_RECOR.returndate ) %][% READING_RECOR.returndate | $KohaDates %][% ELSE %]<em>(Checked out)</em>[% END %]</td> >+[% IF ( OPACMySummaryHTML ) %] >+<td>[% READING_RECOR.MySummaryHTML %]</td> >+[% END %] > </tr> > > [% END %] >diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl >index 3e78c9a..0c92de6 100755 >--- a/opac/opac-readingrecord.pl >+++ b/opac/opac-readingrecord.pl >@@ -97,6 +97,16 @@ foreach my $issue (@{$issues} ) { > $line{'description'} = $itemtypes->{ $issue->{'itemtype'} }->{'description'}; > $line{imageurl} = getitemtypeimagelocation( 'opac', $itemtypes->{ $issue->{'itemtype'} }->{'imageurl'} ); > } >+ # My Summary HTML >+ if (my $my_summary_html = C4::Context->preference('OPACMySummaryHTML')){ >+ $line{author} ? $my_summary_html =~ s/{AUTHOR}/$line{author}/g : $my_summary_html =~ s/{AUTHOR}//g; >+ $line{title} =~ s/\/+$//; # remove trailing slash >+ $line{title} =~ s/\s+$//; # remove trailing space >+ $line{title} ? $my_summary_html =~ s/{TITLE}/$line{title}/g : $my_summary_html =~ s/{TITLE}//g; >+ $line{normalized_isbn} ? $my_summary_html =~ s/{ISBN}/$line{normalized_isbn}/g : $my_summary_html =~ s/{ISBN}//g; >+ $line{biblionumber} ? $my_summary_html =~ s/{BIBLIONUMBER}/$line{biblionumber}/g : $my_summary_html =~ s/{BIBLIONUMBER}//g; >+ $line{MySummaryHTML} = $my_summary_html; >+ } > push( @loop_reading, \%line ); > $line{subtitle} = GetRecordValue('subtitle', $record, GetFrameworkCode($issue->{'biblionumber'})); > } >@@ -130,6 +140,7 @@ $template->param( > showfulllink => 1, > readingrecview => 1, > count => scalar @loop_reading, >+ OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0, > ); > > output_html_with_http_headers $query, $cookie, $template->output; >-- >1.7.2.3
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 6494
:
11643
| 11644