Bugzilla – Attachment 9994 Details for
Bug 3708
Add another customizable region to the OPAC: right sidebar
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signoff Patch
0001-Bug-3708-Add-another-customizable-region-to-the-OPAC.patch (text/plain), 7.35 KB, created by
Martin Renvoize (ashimema)
on 2012-06-09 09:58:19 UTC
(
hide
)
Description:
Signoff Patch
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2012-06-09 09:58:19 UTC
Size:
7.35 KB
patch
obsolete
>From 68d4b333cf85c6d8f94c6509332cabccfd7836ca Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 29 May 2012 15:54:30 -0400 >Subject: [PATCH] Bug 3708 - Add another customizable region to the OPAC: right sidebar >Content-Type: text/plain; charset="utf-8" > >This patch creates a new system preference, OpacRightSidebar, in >which the librarian can add HTML which will appear on the OPAC >main page under the login form. If the user is logged in the content >will appear in place of the login form. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > 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 | 25 +++++++++---------- > 5 files changed, 28 insertions(+), 13 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index ffee1bb..302178b 100644 >--- a/C4/Auth.pm >+++ b/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"), >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 2ffe2df..e863255 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/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<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('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'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index dbbdee3..3f55a31 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5308,6 +5308,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) >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 e4ea15b..ef763c3 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 > - >+ - "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 >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt >index a89c473..b8680d3 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt >@@ -12,17 +12,14 @@ > <div class="yui-b"> > [% IF ( opacuserlogin ) %] > [% IF ( loggedinusername ) %] >- <div id="loggedin" class="yui-g"> >- <div> >+ <div id="loggedin" class="yui-ge"> > [% ELSE %] >- <div id="notloggedin" class="yui-ge"> >- <div class="yui-u first"> >+ <div id="notloggedin" class="yui-ge"> > [% END %] > [% ELSE %] >- <div id="notloggedin" class="yui-g"> >- <div> >+ <div id="notloggedin" class="yui-ge"> > [% END %] >- >+ <div class="yui-u first"> > [% IF ( koha_news_count ) %] > <div id="news" class="container"> > <table> >@@ -43,11 +40,12 @@ > > </div> > >- [% IF ( opacuserlogin ) %] >+ [% IF ( opacuserlogin || OpacRightSidebar ) %] >+ <div class="yui-u"> >+ [% IF ( opacuserlogin ) %] > [% UNLESS ( loggedinusername ) %] > [% UNLESS ( casAuthentication ) %] >- <div class="yui-u"> >- <div id="login" class="container"> >+ <div id="login" class="container clearfix"> > <form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="auth"> > <input type="hidden" name="koha_login_context" value="opac" /> > <fieldset class="brief"> >@@ -60,11 +58,12 @@ > </fieldset></fieldset> > </form> > </div> >- </div> > [% END %] > [% END %] >- >-[% END %] >+ [% END %] >+ [% IF ( OpacRightSidebar ) %]<div id="opacrightsidebar" class="container">[% OpacRightSidebar %]</div>[% END %] >+ </div> >+ [% END %] > </div> > </div> > </div> >-- >1.7.2.5 >
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 3708
:
1529
|
9841
|
9883
|
9994
|
10233
|
10236