Bugzilla – Attachment 2832 Details for
Bug 1997
sys pref to Edit no results found page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch rebased on HEAD, tested, signed-off and resent
0001-SIGNED-OFF-Bug-1997-new-OPACNoResultsFound-pref.patch (text/plain), 6.80 KB, created by
Katrin Fischer
on 2010-12-11 20:26:29 UTC
(
hide
)
Description:
Patch rebased on HEAD, tested, signed-off and resent
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2010-12-11 20:26:29 UTC
Size:
6.80 KB
patch
obsolete
>From 04042fea6e4eefabda1fcfc579883861a4ee2a95 Mon Sep 17 00:00:00 2001 >From: Nicole Engard <nengard@bywatersolutions.com> >Date: Tue, 11 May 2010 10:59:27 -0400 >Subject: [PATCH 1/2] [SIGNED-OFF] Bug 1997: new OPACNoResultsFound pref >Content-Type: text/plain; charset="utf-8" > >This patch adds a new preference to allow librarians to >add content to the no results found page if they want. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Changed surrounding <p> in template to <div id="noresultsfound"> >Will send follow up patch adding sys pref to translated sql files >--- > installer/data/mysql/en/mandatory/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 11 +++++++++++ > .../prog/en/modules/admin/preferences/opac.pref | 5 +++++ > koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 8 +++++++- > opac/opac-search.pl | 1 + > 5 files changed, 25 insertions(+), 1 deletions(-) > >diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql >index d4fb9a2..be7b6c9 100644 >--- a/installer/data/mysql/en/mandatory/sysprefs.sql >+++ b/installer/data/mysql/en/mandatory/sysprefs.sql >@@ -73,6 +73,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacheader','','Add HTML to be included as a custom header in the OPAC','70|10','Textarea'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opaclayoutstylesheet','opac.css','Enter the name of the layout CSS stylesheet to use in the OPAC','','free'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacMaintenance',0,'If ON, enables maintenance warning in OPAC','','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACNoResultsFound','','Display this HTML when no results are found for a search in the OPAC','70|10','Textarea'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacMainUserBlock','Welcome to Koha...\r\n<hr>','A user-defined block of HTML in the main content area of the opac main page','70|10','Textarea'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacNav','Important links here.','Use HTML tags to add navigational links to the left-hand navigational bar in OPAC','70|10','Textarea'); > 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'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index d093946..e3ee37a 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -3876,6 +3876,17 @@ VALUES > SetVersion ($DBversion); > }; > >+ >+$DBversion = '3.03.00.XXX'; >+if (C4::Context->preference('Version') < TransformToNum($DBversion)){ >+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACNoResultsFound','','Display this HTML when no results are found for a search in the OPAC','70|10','Textarea')"); >+ print "Upgrade to $DBversion done adding syspref OPACNoResultsFound to control what displays when no results are found for a search in the OPAC."; >+ SetVersion ($DBversion); >+} >+ >+=item DropAllForeignKeys($table) >+ >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >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 55560d3..acab30a 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 >@@ -147,6 +147,11 @@ OPAC: > yes: Add > no: "Don't add" > - a library select pulldown menu on the OPAC masthead. >+ - >+ - 'Display this HTML when no results are found for a search in the OPAC:' >+ - pref: OPACNoResultsFound >+ type: textarea >+ class: code > Features: > - > - pref: opacuserlogin >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >index 878a412..236f296 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >@@ -173,7 +173,7 @@ > <!-- TMPL_IF NAME="searchdesc" --><p><!-- TMPL_IF name="total" --><strong>“<!-- TMPL_VAR NAME="query_desc" ESCAPE="HTML"--> <!-- TMPL_VAR NAME="limit_desc" ESCAPE="HTML"-->” </strong>returned <!-- TMPL_VAR NAME="total" ESCAPE="HTML"--> results. <!-- TMPL_IF NAME="related" --> (related searches: <!-- TMPL_LOOP NAME="related" --><!-- TMPL_VAR NAME="related_search" --><!-- /TMPL_LOOP -->). <!-- /TMPL_IF --> > <a href="<!-- TMPL_VAR NAME="OPACBaseURL" -->/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR name="query_cgi" ESCAPE="HTML" --><!-- TMPL_VAR NAME="limit_cgi" ESCAPE="HTML" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" ESCAPE="HTML" --><!-- /TMPL_IF -->&format=rss2"><img src="/opac-tmpl/prog/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" border="0" /></a> > <!-- TMPL_ELSE --> >-<strong>No Result found!</strong> >+<strong>No Results Found!</strong> > <p> > <!-- TMPL_IF NAME="searchdesc" --> > No results match your search for <span style="font-weight: bold;">“<!-- TMPL_VAR NAME="query_desc" ESCAPE="HTML" --> <!-- TMPL_VAR NAME="limit_desc" ESCAPE="HTML"-->”</span> in <!-- TMPL_VAR NAME="LibraryName" --> Catalog. <a href="<!-- TMPL_VAR NAME="OPACBaseURL" -->/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR name="query_cgi" ESCAPE="HTML" --><!-- TMPL_VAR NAME="limit_cgi" ESCAPE="HTML" -->&format=rss2"><img src="/opac-tmpl/prog/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" border="0" /></a> >@@ -181,5 +181,11 @@ > You did not specify any search criteria. > <!-- /TMPL_IF --> > </p> >+<!-- TMPL_IF name="OPACNoResultsFound" --> >+<div id="noresultsfound"> >+<!-- TMPL_VAR NAME="OPACNoResultsFound" --> >+</div> >+<!-- /TMPL_IF --> >+ > </div> > <!-- /TMPL_IF --></p><!-- /TMPL_IF --></div> >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 2bfcb6d..88f3a2f 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -97,6 +97,7 @@ elsif (C4::Context->preference("marcflavour") eq "MARC21" ) { > $template->param('usmarc' => 1); > } > $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); >+$template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') ); > > if (C4::Context->preference('BakerTaylorEnabled')) { > $template->param( >-- >1.7.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 1997
:
453
| 2832 |
2833