From 85b1d6d55839017e75beede2f9829d4f4ba9e7ee Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Fri, 7 Oct 2011 11:56:29 +1300 Subject: [PATCH] Bug 6636 - add 'powered by Koha' text to OPAC footer Signed-off-by: Robin Sheat Signed-off-by: Paul Poulain QA control: added () inside 2 [% IF %] Signed-off-by: Chris Cormack --- C4/Auth.pm | 1 + installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 ++++++ .../en/modules/admin/preferences/opac.pref | 7 ++++++ koha-tmpl/opac-tmpl/prog/en/css/opac.css | 12 ++++++++++ .../prog/en/includes/opac-bottom.inc | 23 ++++++++++++------- 6 files changed, 43 insertions(+), 8 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 721176959a..47a8b8279c 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -435,6 +435,7 @@ sub get_template_and_user { opac_limit_override => $opac_limit_override, OpacBrowser => C4::Context->preference("OpacBrowser"), OpacCloud => C4::Context->preference("OpacCloud"), + OpacKohaUrl => C4::Context->preference("OpacKohaUrl"), OpacMainUserBlock => "" . C4::Context->preference("OpacMainUserBlock"), OpacNav => "" . C4::Context->preference("OpacNav"), OpacPasswordChange => C4::Context->preference("OpacPasswordChange"), diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index b874ae0524..69c79be231 100755 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -319,3 +319,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn | a|a d', NULL, NULL, 'Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 792787c1e8..1676fd9d23 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4452,6 +4452,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do(qq|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','0',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL)|); + print "Upgrade to $DBversion done (Add syspref 'OpacKohaUrl')\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS 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 8bbf692f0d..8d6974ee32 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 @@ -85,6 +85,13 @@ OPAC: yes: Show no: "Don't show" - the name of the patron that has an item checked out on item detail pages on the OPAC. + - + - pref: OpacKohaUrl + default: 0 + choices: + yes: Show + no: "Don't show" + - "'Powered by Koha' text on OPAC footer." - - pref: OpacHighlightedWords choices: diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 09ed022150..665d1436c4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -2047,3 +2047,15 @@ div.bibmessage { background-color : #ffffb0; border-radius : 5px; padding : 3px; #renewall_link { background-image : url(../../images/checks.png); } + +div.koha_url { + border-top: none !important; +} +span.koha_url { + position: absolute; + right: 0; +} +a.koha_url { + text-decoration:none; + color: #666666; +} diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc index c76d85cb9a..59188ef45c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc @@ -1,14 +1,15 @@ - [% IF ( opaccredits ) %]
[% opaccredits %]
[% END %] -[% IF ( opaclanguagesdisplay ) %] -[% IF ( languages_loop ) %] + +[% IF ( opaclanguagesdisplay || OpacKohaUrl ) %] +
+[% IF ( languages_loop && opaclanguagesdisplay ) %] [% UNLESS ( one_language_enabled ) %] -
Languages: + Languages: [% FOREACH languages_loo IN languages_loop %] [% IF ( languages_loo.group_enabled ) %] [% IF ( languages_loo.plural ) %] @@ -22,14 +23,13 @@ [% ELSE %]
  • [% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %] ([% sublanguages_loo.rfc4646_subtag %])
  • [% END %] - [% END %] + [% END %] [% END %]
    - [% ELSE %] - [% IF ( languages_loo.group_enabled ) %] + [% IF ( languages_loo.group_enabled ) %] [% IF ( languages_loo.current ) %] [% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %] [% ELSE %] @@ -39,9 +39,16 @@ [% END %] [% END %][% UNLESS ( loop.last ) %] | [% END %] [% END %] - [% END %] [% END %] + +[% IF ( OpacKohaUrl ) %] + + Powered by Koha   + +[% END %] + + [% END %] [% IF ( Babeltheque ) %] -- 2.39.5