Bugzilla – Attachment 5364 Details for
Bug 6165
OPACResultsSidebar system preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Enh-6165-Add-OPACResultsSidebar-system-preference.patch (text/plain), 4.77 KB, created by
Ian Walls
on 2011-09-08 21:26:20 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Ian Walls
Created:
2011-09-08 21:26:20 UTC
Size:
4.77 KB
patch
obsolete
>From 05b65a7dcd363cb010efd8b343c3c4bde64aaf1c Mon Sep 17 00:00:00 2001 >From: Ian Walls <ian.walls@bywatersolutions.com> >Date: Thu, 8 Sep 2011 17:15:39 -0400 >Subject: [PATCH] Enh 6165: Add OPACResultsSidebar system preference > >Adds a system preference for displaying content under the "Refine your Search" menu >on OPAC search results. Arbitrary HTML can be added, like OpacNav, opacheader, opaccredits >and other such system preferences >--- > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 7 +++++++ > .../prog/en/modules/admin/preferences/opac.pref | 5 +++++ > .../opac-tmpl/prog/en/includes/opac-facets.inc | 5 +++++ > opac/opac-search.pl | 1 + > 5 files changed, 19 insertions(+), 0 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 8407505..79d4893 100755 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -85,6 +85,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacPasswordChange',1,'If ON, enables patron-initiated password change in OPAC (disable it when using LDAP auth)',NULL,'YesNo'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacPrivacy', '0', 'if ON, allows patrons to define their privacy rules (reading history)',NULL,'YesNo'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacreadinghistory',1,'If ON, enables display of Patron Circulation History in OPAC','','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACResultsSidebar','','Define HTML to be included on the search results page, underneath the facets sidebar','70|10','Textarea'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacsmallimage','','Enter a complete URL to an image to replace the default Koha logo','','free'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacstylesheet','','Enter a complete URL to use an alternate layout stylesheet in OPAC','','free'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacthemes','prog','Define the current theme for the OPAC interface.','','Themes'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index bdfc9ac..afdd954 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4439,6 +4439,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion($DBversion); > } > >+$DBversion = "3.05.00.XXX"; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACResultsSidebar','','Define HTML to be included on the search results page, underneath the facets sidebar','70|10','Textarea')"); >+ print "Upgrade to $DBversion done (add OPACResultsSidebar syspref (enh 6165))\n"; >+ SetVersion($DBversion); >+} >+ > > =head1 FUNCTIONS > >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 4a7c652..8bbf692 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 >@@ -165,6 +165,11 @@ OPAC: > type: textarea > class: code > - >+ - "Include the following HTML under the facets in OPAC search results:" >+ - pref: OPACResultsSidebar >+ type: textarea >+ class: code >+ - > - pref: OpacAddMastheadLibraryPulldown > choices: > yes: Add >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc >index 7a2b743..4e6c935 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc >@@ -25,5 +25,10 @@ > [% END %] > </ul> > </div> >+[% IF ( OPACResultsSidebar ) %] >+<div id="opacresultssidebar"> >+[% OPACResultsSidebar %] >+</div> >+[% END %] > [% END %] > [% END %] >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 8f6b67a..dfe4d74 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -405,6 +405,7 @@ if (C4::Context->preference('OpacSuppression')) { > } > > $template->param ( LIMIT_INPUTS => \@limit_inputs ); >+$template->param ( OPACResultsSidebar => C4::Context->preference('OPACResultsSidebar')); > > ## II. DO THE SEARCH AND GET THE RESULTS > my $total = 0; # the total results for the whole set >-- >1.7.4.1 >
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 6165
:
5364
|
5365