@@ -, +, @@
OpacNav
Patron links
OpacNavBottom
1 Apply this patch
2 For RM, modify kohaversion.pl and updatedatabase.pl appropriately
3 Test that OPAC pages are displayed as before, OpacNav on the left
4 Test OPAC patron pages: OpacNav is as before displayed after patron
links
5 Split OpacNav between itself and OpacNavBottom
6 Patron pages display patron links between OpacNav and OpacNavBottom
---
C4/Auth.pm | 2 ++
installer/data/mysql/sysprefs.sql | 1 +
installer/data/mysql/updatedatabase.pl | 8 ++++++++
.../prog/en/modules/admin/preferences/opac.pref | 5 +++++
.../opac-tmpl/prog/en/includes/navigation.inc | 7 ++++++-
.../opac-tmpl/prog/en/modules/opac-account.tt | 3 +--
.../opac-tmpl/prog/en/modules/opac-messaging.tt | 3 +--
koha-tmpl/opac-tmpl/prog/en/modules/opac-passwd.tt | 3 +--
.../opac-tmpl/prog/en/modules/opac-privacy.tt | 3 +--
.../prog/en/modules/opac-readingrecord.tt | 3 +--
.../prog/en/modules/opac-search-history.tt | 6 ++----
.../opac-tmpl/prog/en/modules/opac-shelves.tt | 3 +--
.../opac-tmpl/prog/en/modules/opac-suggestions.tt | 3 +--
koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt | 3 +--
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 3 +--
.../opac-tmpl/prog/en/modules/opac-userupdate.tt | 3 +--
16 files changed, 34 insertions(+), 25 deletions(-)
--- a/C4/Auth.pm
+++ a/C4/Auth.pm
@@ -437,6 +437,7 @@ sub get_template_and_user {
OpacCloud => C4::Context->preference("OpacCloud"),
OpacMainUserBlock => "" . C4::Context->preference("OpacMainUserBlock"),
OpacNav => "" . C4::Context->preference("OpacNav"),
+ OpacNavBottom => "" . C4::Context->preference("OpacNavBottom"),
OpacPasswordChange => C4::Context->preference("OpacPasswordChange"),
OPACPatronDetails => C4::Context->preference("OPACPatronDetails"),
OPACPrivacy => C4::Context->preference("OPACPrivacy"),
@@ -956,6 +957,7 @@ sub checkauth {
LibraryName => C4::Context->preference("LibraryName"),
opacuserlogin => C4::Context->preference("opacuserlogin"),
OpacNav => C4::Context->preference("OpacNav"),
+ OpacNavBottom => C4::Context->preference("OpacNavBottom"),
opaccredits => C4::Context->preference("opaccredits"),
OpacFavicon => C4::Context->preference("OpacFavicon"),
opacreadinghistory => C4::Context->preference("opacreadinghistory"),
--- a/installer/data/mysql/sysprefs.sql
+++ a/installer/data/mysql/sysprefs.sql
@@ -81,6 +81,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
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('OpacMainUserBlock','Welcome to Koha...\r\n
','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('OpacNavBottom','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('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('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');
--- a/installer/data/mysql/updatedatabase.pl
+++ a/installer/data/mysql/updatedatabase.pl
@@ -4447,6 +4447,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
}
+$DBversion = "3.05.00.XXX";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacNavBottom','','Links after OpacNav links','70|10','Textarea')");
+ print "Upgrade to $DBversion done (add OpacNavBottom syspref (enh 6825): if appropriate, you can split OpacNav into OpacNav and OpacNavBottom)\n";
+ SetVersion($DBversion);
+}
+
+
=head1 FUNCTIONS
=head2 DropAllForeignKeys($table)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -143,6 +143,11 @@ OPAC:
type: textarea
class: code
-
+ - "Show the following HTML on the left hand column of the main page and patron account on the OPAC, after OpacNav, and before patron account links if available:"
+ - pref: OpacNavBottom
+ type: textarea
+ class: code
+ -
- "Include the following HTML in the header of all pages in the OPAC:"
- pref: opacheader
type: textarea
--- a/koha-tmpl/opac-tmpl/prog/en/includes/navigation.inc
+++ a/koha-tmpl/opac-tmpl/prog/en/includes/navigation.inc
@@ -1, +1,6 @@
-[% OpacNav %]
+[% OpacNav %]
+[% IF IsPatronPage %]
+[% INCLUDE usermenu.inc %]
+[% END %]
+[% OpacNavBottom %]
+
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tt
@@ -54,8 +54,7 @@
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tt
@@ -115,8 +115,7 @@
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-passwd.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-passwd.tt
@@ -54,8 +54,7 @@
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tt
@@ -64,8 +64,7 @@
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt
@@ -95,8 +95,7 @@ You have never borrowed anything from this library.
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tt
@@ -82,13 +82,11 @@
[% IF ( OpacNav ) %]
[% ELSIF ( loggedinusername ) %]
[% ELSE %]
[% END %]
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt
@@ -601,8 +601,7 @@ $(function() {
[% IF ( OpacNav||loggedinusername ) %]
- [% INCLUDE 'navigation.inc' %]
- [% INCLUDE 'usermenu.inc' %]
+ [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
[% END %]
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt
@@ -212,8 +212,7 @@ $.tablesorter.addParser({
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt
@@ -131,8 +131,7 @@
[% IF ( OpacNav||loggedinusername ) %]
[% END %]
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
@@ -423,8 +423,7 @@ $.tablesorter.addParser({
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt
@@ -180,8 +180,7 @@
--