Bugzilla – Attachment 85524 Details for
Bug 22311
Add a SysPref to allow adding content to the #moresearches div in the opac
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22311 - Add a SysPref to allow adding content to the #moresearches div in the opac
Bug-22311---Add-a-SysPref-to-allow-adding-content-.patch (text/plain), 4.96 KB, created by
Kyle M Hall (khall)
on 2019-02-22 13:08:56 UTC
(
hide
)
Description:
Bug 22311 - Add a SysPref to allow adding content to the #moresearches div in the opac
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-02-22 13:08:56 UTC
Size:
4.96 KB
patch
obsolete
>From 1d3199d2f7639cd1e4d07106b45dd0b6f54cbff0 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 22 Feb 2019 08:00:33 -0500 >Subject: [PATCH] Bug 22311 - Add a SysPref to allow adding content to the > #moresearches div in the opac > >The idea of this development would be to match the syspref 'OPACSearchForTitleIn' but >for populating the search headers (#moresearches) on the opac page to allow staff to >easily add links without jQuery. > >Test Plan: >1) Apply this patch >2) Run updatedatabase.pl >3) Update the new OpacMoreSearches system preference to include the following line: > <li><a href="https://duckduckgo.com/">Duck Duck Go</a></li> >4) Browse to the OPAC >5) Note your new link displays in the "moresearches" area of the OPAC. >--- > installer/data/mysql/atomicupdate/bug_22311.perl | 10 ++++++++++ > installer/data/mysql/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/opac.pref | 5 +++++ > koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 1 + > 4 files changed, 17 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_22311.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_22311.perl b/installer/data/mysql/atomicupdate/bug_22311.perl >new file mode 100644 >index 0000000000..64527cc76f >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22311.perl >@@ -0,0 +1,10 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES >+ ('OpacMoreSearches', '', NULL, 'Add additional elements to the OPAC more searches bar', 'Textarea') >+ } ); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 22311 - Add a SysPref to allow adding content to the #moresearches div in the opac)\n"; >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index d142b14a0e..2cd0646450 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -380,6 +380,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OpacMaintenanceNotice','','','A user-defined block of HTML to appear on screen when OpacMaintenace is enabled','Textarea'), > ('OpacMainUserBlock','Welcome to Koha...\r\n<hr>','70|10','A user-defined block of HTML in the main content area of the opac main page','Textarea'), > ('OpacMaxItemsToDisplay','50','','Max items to display at the OPAC on a biblio detail','Integer'), >+('OpacMoreSearches', '', NULL, 'Add additional elements to the OPAC more searches bar', 'Textarea'), > ('OPACMySummaryHTML','','70|10','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.','Textarea'), > ('OPACMySummaryNote','','','Note to display on the patron summary page. This note only appears if the patron is connected.','Free'), > ('OpacNav','Important links here.','70|10','Use HTML tags to add navigational links to the left-hand navigational bar in OPAC','Textarea'), >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 da1d86540c..faa090ea70 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 >@@ -249,6 +249,11 @@ OPAC: > - pref: OPACSearchForTitleIn > type: textarea > class: code >+ - >+ - 'Add additional elements to the "More Searches" bar on the OPAC, with the following HTML (leave blank to disable):' >+ - pref: OpacMoreSearches >+ type: textarea >+ class: code > - > - '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.' >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 9466c2d9c6..3aee568cbe 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -284,6 +284,7 @@ > <li><a href="/cgi-bin/koha/opac-suggestions.pl">Purchase suggestions</a></li> > [% END %] > [% END %] >+ [% Koha.Preference('OpacMoreSearches') | $raw %] > </ul> > </div> <!-- /#moresearches --> > </div> <!-- /.row-fluid --> >-- >2.17.2 (Apple Git-113)
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 22311
:
85009
|
85524
|
86581
|
87569