@@ -, +, @@
right sidebar
---
C4/Auth.pm | 2 ++
installer/data/mysql/sysprefs.sql | 1 +
installer/data/mysql/updatedatabase.pl | 8 +++++++
.../prog/en/modules/admin/preferences/opac.pref | 5 +++++
koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt | 23 ++++++++++----------
5 files changed, 27 insertions(+), 12 deletions(-)
--- a/C4/Auth.pm
+++ a/C4/Auth.pm
@@ -426,6 +426,7 @@ sub get_template_and_user {
OpacKohaUrl => C4::Context->preference("OpacKohaUrl"),
OpacMainUserBlock => "" . C4::Context->preference("OpacMainUserBlock"),
OpacNav => "" . C4::Context->preference("OpacNav"),
+ OpacRightSidebar => "" . C4::Context->preference("OpacRightSidebar"),
OpacNavBottom => "" . C4::Context->preference("OpacNavBottom"),
OpacPasswordChange => C4::Context->preference("OpacPasswordChange"),
OPACPatronDetails => C4::Context->preference("OPACPatronDetails"),
@@ -962,6 +963,7 @@ sub checkauth {
LibraryName => C4::Context->preference("LibraryName"),
opacuserlogin => C4::Context->preference("opacuserlogin"),
OpacNav => C4::Context->preference("OpacNav"),
+ OpacRightSidebar => C4::Context->preference("OpacRightSidebar"),
OpacNavBottom => C4::Context->preference("OpacNavBottom"),
opaccredits => C4::Context->preference("opaccredits"),
OpacFavicon => C4::Context->preference("OpacFavicon"),
--- a/installer/data/mysql/sysprefs.sql
+++ a/installer/data/mysql/sysprefs.sql
@@ -82,6 +82,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('OpacRightSidebar','','Show the following HTML in the right hand column of the main page under the main login form','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');
--- a/installer/data/mysql/updatedatabase.pl
+++ a/installer/data/mysql/updatedatabase.pl
@@ -5307,6 +5307,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
+
+$DBversion = "3.09.00.XXX";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OpacRightSidebar', '', '70|10', 'Show the following HTML in the right hand column of the main page under the main login form', 'Textarea');");
+ print "Upgrade to $DBversion done (Add customizable OpacRightSidebar region to the OPAC main page)\n";
+ SetVersion ($DBversion);
+}
+
=head1 FUNCTIONS
=head2 TableExists($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
@@ -165,6 +165,11 @@ OPAC:
type: textarea
class: code
-
+ - "Show the following HTML in the right hand column of the main page under the main login form:"
+ - pref: OpacRightSidebar
+ 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
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt
@@ -12,17 +12,14 @@
[% IF ( opacuserlogin ) %]
[% IF ( loggedinusername ) %]
-
-
+
[% ELSE %]
-
-
+
[% END %]
[% ELSE %]
-
-
+
[% END %]
-
+
[% IF ( koha_news_count ) %]
@@ -43,10 +40,11 @@
- [% IF ( opacuserlogin ) %]
+ [% IF ( opacuserlogin || OpacRightSidebar ) %]
+
+ [% IF ( opacuserlogin ) %]
[% UNLESS ( loggedinusername ) %]
[% UNLESS ( casAuthentication ) %]
-
[% END %]
[% END %]
-
-[% END %]
+ [% END %]
+ [% IF ( OpacRightSidebar ) %][% END %]
+
+ [% END %]
--