[Koha-patches] [PATCH] [Bug 6636] add 'powered by Koha' text to OPAC footer
James, Mason
mtj at kohaaloha.com
Wed Jul 27 04:06:49 CEST 2011
---
C4/Auth.pm | 1 +
installer/data/mysql/en/mandatory/sysprefs.sql | 1 +
.../prog/en/modules/admin/preferences/opac.pref | 7 +++++++
.../opac-tmpl/prog/en/includes/opac-bottom.inc | 18 +++++++++++++-----
4 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/C4/Auth.pm b/C4/Auth.pm
index f580e53..ca09fc3 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -434,6 +434,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/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql
index 0abf9d8..efb2a9b 100755
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -314,3 +314,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',NULL,NULL,NULL);
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 f4be568..485ec2c 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
@@ -86,6 +86,13 @@ OPAC:
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:
yes: Highlight
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 c76d85c..fe81cc3 100644
--- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc
+++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc
@@ -1,10 +1,10 @@
-
[% IF ( opaccredits ) %]
<div class="ft">
[% opaccredits %]
</div>
[% END %]
</div>
+
[% IF ( opaclanguagesdisplay ) %]
[% IF ( languages_loop ) %]
[% UNLESS ( one_language_enabled ) %]
@@ -22,14 +22,13 @@
[% ELSE %]
<li><a href="/cgi-bin/koha/opac-changelanguage.pl?language=[% sublanguages_loo.rfc4646_subtag %]"> [% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %] ([% sublanguages_loo.rfc4646_subtag %])</a></li>
[% END %]
- [% END %]
+ [% END %]
[% END %]
</ul>
</div>
</div>
-
[% 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 +38,18 @@
[% END %]
[% END %][% UNLESS ( loop.last ) %] | [% END %]
[% END %]
+[% IF ( OpacKohaUrl ) %]
+<span id="kohaurl" style="position: absolute; right: 0;">
+<a STYLE="text-decoration:none; color: #666666;" href="http://www.koha-community.org">Powered by <strong>Koha</strong></a> </span>
+ [% END %]
</div>
- [% END %]
[% END %]
+ [% END %]
+[% ELSIF ( OpacKohaUrl ) %]
+ <div id="changelanguage" class="ft" style="border-top: none !important">
+<span id="kohaurl" style="position: absolute; right: 0;">
+<a STYLE="text-decoration:none; color: #666666;" href="http://www.koha-community.org">Powered by <strong>Koha</strong></a> </span>
+ </div>
[% END %]
[% IF ( Babeltheque ) %]
--
1.7.1
More information about the Koha-patches
mailing list